Fix in-tree libelf parallel build

Alexandre Oliva aoliva@redhat.com
Thu Jun 10 10:42:00 GMT 2010


The test for libelf featuers in gcc/configure.ac doesn't take into
acount the possibility that the libelf to be used might be the one in
the build tree.  The toplevel one does.

This results in a problem if you're running a parallel build that
configures gcc before building libelf: toplevel will assume libelf is
fine, but GCC will misdetect HAVE_ELF_GETSHDRSTRNDX if you have an old
version of libelf installed, and then lto-elf.c will fail to compile in
stage2, at the elf_getshstrndx call, because the declaration is marked
as deprecated in the new libelf headers.

This patch arranges for us to build the build-tree libelf before
configuring the gcc subdir, so that we don't depend on lucky chance to
have it already in place by the time of the gcc configure tests.

I'm checking it in shortly.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto-libelf-in-build.patch
Type: text/x-diff
Size: 2641 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100610/4b06feb1/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer


More information about the Gcc-patches mailing list