This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/14548] building Ada library incorrectly requires collect2 on mingw


------- Additional Comments From ro at techfak dot uni-bielefeld dot de  2004-03-12 22:19 -------
Subject: Re:  building Ada library incorrectly requires collect2 on mingw

pinskia at gcc dot gnu dot org writes:

> Really USE-COLLECT2 should be moved into config.gcc to make this a non-issue.
> Actually it is already in config.gcc:
>         use_collect2=yes
> 
> So mygwin should follow this instead of doing more work.

Unfortunately, this is not enough: use_collect2=yes in config.gcc only
causes the USE_COLLECT2 macro to be defined, which changes the way collect2
works.

collect2 is built because gcc/Makefile.in has

USE_COLLECT2 = collect2$(exeext)

config/i386/t-mingw32 clears that make variable to avoid building collect2
(which doesn't link as described).  This is enough to avoid building
collect2 during make bootstrap.

During make gnatlib_and_tools, collect2 is built nonetheless because the
gnattools target in ada/Make-lang.in depends on $(GCC_PARTS), which
includes $(USE_COLLECT2).  Since ada/Make-lang.in is now included before
the target makefile fragments (i.e. t-mingw32), the default value of
USE_COLLECT2 from Makefile.in is used, leading to the failing attempt to
build collect2.

I agree this is a mess, but don't have a good idea how to avoid this.  It
seems that handling this in config.gcc is better than overriding the make
variable, tough.

	Rainer


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14548


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]