It is my Request for Enhancement that the 'Configury' detect if
there is enough elf support to build gcc - in a similar manner that
gmp, mpfr, PPL and CLooG are tested for.

The configury is waiting until it gets past configuring the gcc directory,
and even detecting that gelf.h is not present, before the build fails. 

This Operating System (Debian GNU/Linux) does have "/usr/include/elf.h"
in a default installation but is 'lacking enough elf' to build without
failing. This should be checked in ../lto_trunk/configure .



# make
...
Configuring stage 1 in ./gcc
configure: creating cache ./config.cache
checking build system type... x86_64-unknown-linux-gnu
...
checking for pthread.h... yes
checking for libelf.h... no
checking for libelf/libelf.h... no
checking for gelf.h... no
checking for libelf/gelf.h... no
checking for CHAR_BIT... yes
...


make[3]: Entering directory `/usr/src/lto_build/lto-plugin'
if /bin/sh ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"LTO\ plugin\
for\ ld\" -DPACKAGE_TARNAME=\"lto-plugin\" -DPACKAGE_VERSION=\"0.1\"
-DPACKAGE_STRING=\"LTO\ plugin\ for\ ld\ 0.1\" -DPACKAGE_BUGREPORT=\"\"
-DPACKAGE=\"lto-plugin\" -DVERSION=\"0.1\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I.
-I../../lto_trunk/lto-plugin  -I../../lto_trunk/lto-plugin/../include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -Wall -Werror -g
-fkeep-inline-functions -MT lto-plugin.lo -MD -MP -MF ".deps/lto-plugin.Tpo" -c
-o lto-plugin.lo ../../lto_trunk/lto-plugin/lto-plugin.c; \
        then mv -f ".deps/lto-plugin.Tpo" ".deps/lto-plugin.Plo"; else rm -f
".deps/lto-plugin.Tpo"; exit 1; fi
libtool: compile:  gcc "-DPACKAGE_NAME=\"LTO plugin for ld\""
-DPACKAGE_TARNAME=\"lto-plugin\" -DPACKAGE_VERSION=\"0.1\"
"-DPACKAGE_STRING=\"LTO plugin for ld 0.1\"" -DPACKAGE_BUGREPORT=\"\"
-DPACKAGE=\"lto-plugin\" -DVERSION=\"0.1\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I.
-I../../lto_trunk/lto-plugin -I../../lto_trunk/lto-plugin/../include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Werror -g
-fkeep-inline-functions -MT lto-plugin.lo -MD -MP -MF .deps/lto-plugin.Tpo -c
../../lto_trunk/lto-plugin/lto-plugin.c  -fPIC -DPIC -o .libs/lto-plugin.o
../../lto_trunk/lto-plugin/lto-plugin.c:56:4: error: #error "gelf.h not
available"
../../lto_trunk/lto-plugin/lto-plugin.c:170: error: expected ‘=’, ‘,’, ‘;’,
‘asm’ or ‘__attribute__’ before ‘*’ token
...
../../lto_trunk/lto-plugin/lto-plugin.c:619: error: ‘EV_NONE’ undeclared (first
use in this function)
make[3]: *** [lto-plugin.lo] Error 1
make[3]: Leaving directory `/usr/src/lto_build/lto-plugin'
make[2]: *** [all-stage1-lto-plugin] Error 2
make[2]: Leaving directory `/usr/src/lto_build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/usr/src/lto_build'
make: *** [all] Error 2

# ls -l /usr/include/elf.h 
-rw-r--r-- 1 root root 110896 2009-01-04 10:10 /usr/include/elf.h

# ls -l /usr/include/gelf.h 
ls: cannot access /usr/include/gelf.h: No such file or directory

# locate gelf.h
(Nothing printed)

# locate elf.h
/usr/include/elf.h
/usr/include/linux/elf.h
/usr/include/sys/elf.h


# gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=gcc/xgcc
Target: x86_64-unknown-linux-gnu
Configured with: ../lto_trunk/configure --prefix=/usr/local/lto
--enable-languages=lto,c++ --enable-stage1-checking=all
--enable-checking=release
Thread model: posix
gcc version 4.4.0 20090218 (experimental) [lto revision 144454] (lto merged
with rev 144262)


-- 
           Summary: [lto] revision 144454 - Configure should check for elf
                    support (similar to gmp/mpfr/PPL/CLooG)
           Product: gcc
           Version: lto
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rob1weld at aol dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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

Reply via email to