This is the mail archive of the gcc@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]

Re: GCC_NO_EXECUTABLES vs. libtool


On Mon, 28 Mar 2011, Ian Lance Taylor wrote:

> We have several bug reports for 4.6.0 about failures of the form 
> 
> checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
> 
> http://gcc.gnu.org/PR47836
> http://gcc.gnu.org/PR46586
> http://gcc.gnu.org/PR45174
> http://gcc.gnu.org/PR39107
> 
> The problem arising when building a cross-compiler for a GNU/Linux
> target.  Configure scripts like libiberty/configure.ac,
> libquadmath/configure.ac, etc., use GCC_NO_EXECUTABLES.  The
> GCC_NO_EXECUTABLES macro checks whether a link succeeds.  If it does
> not, it sets gcc_no_link.  If a later attempt to run a link test, the
> above error is reported.

Most of the problem is that certain libraries are built when they 
shouldn't be built.

In general link tests *are* required for GNU/Linux targets, because of 
e.g. uClibc configurations where some functions may be disabled and this 
can sometimes only be detected through a link test.  Furthermore, when 
building shared libraries you need a shared libc to link them against, 
which means that in that case link tests will need to work anyway.

For the initial bootstrap for such a target a static-only, C-only compiler 
is built and used for building libc headers and a dummy libc.so.

http://www.eglibc.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/libc/EGLIBC.cross-building?rev=2037

There certainly are issues with the list of libraries to disable in the 
course of such a bootstrap growing over time (with libquadmath, for 
example, being a recent addition, but I think the conclusion was that it 
*should* be built in general even if Fortran isn't being built), and maybe 
there should be special configure options for the initial bootstrap 
compiler (which could also replace the --with-newlib hack).  But some of 
those bug reports refer to target libiberty - which I still maintain 
should never be built by GCC - and some to target zlib, which I think 
should only be relevant when building Java.

-- 
Joseph S. Myers
joseph@codesourcery.com


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