[Bug bootstrap/43531] New: host files being used during cross compilation

corsepiu at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Mar 26 11:15:00 GMT 2010


with the gcc-4.5-20100325 (and predecessors) I am facing this kind of
builderrors when cross-building:
...
make[4]: Entering directory
`/users/rtems/src/rpms/BUILD/rtems-4.11-h8300-rtems4.11-gcc-4.5.0/build/h8300-rtems4.11/h8300h/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
# Recursively invoke make in the GCC directory to build any
# startfiles (for now).  We must do this just once, passing
# it all the GCC_EXTRA_PARTS as simultaneous goal targets,
# so that rules which cannot execute simultaneously are properly
# serialized.  We indirect through T_TARGET in case any multilib
# directories contain an equals sign, to prevent make from
# interpreting any of the goals as variable assignments.
# We must use cd && make rather than make -C, or else the stage
# number will be embedded in debug information.
T=`${PWDCMD-pwd}`/ \
        && cd ../../.././gcc \
        && make
GCC_FOR_TARGET="/users/rtems/src/rpms/BUILD/rtems-4.11-h8300-rtems4.11-gcc-4.5.0/build/./gcc/xgcc
-B/users/rtems/src/rpms/BUILD/rtems-4.11-h8300-rtems4.11-gcc-4.5.0/build/./gcc/
-B/opt/rtems-4.11/h8300-rtems4.11/bin/ -B/opt/rtems-4.11/h8300-rtems4.11/lib/
-isystem /opt/rtems-4.11/h8300-rtems4.11/include -isystem
/opt/rtems-4.11/h8300-rtems4.11/sys-include   " \
          MULTILIB_CFLAGS="-g -O2 -mh" \
          T=$T \
          T_TARGET="${T}crtbegin.o ${T}crtend.o ${T}crti.o ${T}crtn.o" \
          T_TARGET
make[5]: Entering directory
`/users/rtems/src/rpms/BUILD/rtems-4.11-h8300-rtems4.11-gcc-4.5.0/build/gcc'
/users/rtems/src/rpms/BUILD/rtems-4.11-h8300-rtems4.11-gcc-4.5.0/build/./gcc/xgcc
-B/users/rtems/src/rpms/BUILD/rtems-4.11-h8300-rtems4.11-gcc-4.5.0/build/./gcc/
-B/opt/rtems-4.11/h8300-rtems4.11/bin/ -B/opt/rtems-4.11/h8300-rtems4.11/lib/
-isystem /opt/rtems-4.11/h8300-rtems4.11/include -isystem
/opt/rtems-4.11/h8300-rtems4.11/sys-include    -c  -g -O2  -mh -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H -I. -I.
-I../../gcc-4.5-20100325/gcc -I../../gcc-4.5-20100325/gcc/.
-I../../gcc-4.5-20100325/gcc/../include
-I../../gcc-4.5-20100325/gcc/../libcpp/include 
-I../../gcc-4.5-20100325/gcc/../libdecnumber
-I../../gcc-4.5-20100325/gcc/../libdecnumber/dpd -I../libdecnumber 
-DCLOOG_PPL_BACKEND    \
                ../../gcc-4.5-20100325/gcc/config/h8300/h8300.c -o h8300.o
In file included from ../../gcc-4.5-20100325/gcc/config/h8300/h8300.c:25:0:
../../gcc-4.5-20100325/gcc/system.h:199:22: fatal error: strings.h: No such
file or directory


This error originates from this call to gcc carrying build-host include search
directories in its search path.

This shows in this case, because the build-host has both "strings.h" and
"string.h" while the target only has "string.h" and because the bogus include
search path causes compilation to pull-in a build-host's config.h (from
libcpp).


-- 
           Summary: host files being used during cross compilation
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: corsepiu at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list