fix-header doesn't appear to be built during a canadian cross, but the install phase tries to install it anyway. Build log excerpt: if [ xstmp-install-fixproto != x ] ; then \ /usr/bin/install -c /bin/sh /tmp/avr-gcc/src/gcc-4.1.2/gcc/../mkinstalldirs \ /tmp/avr-gcc/tmp/ppc/usr/local/avr/libexec/gcc/avr/4.1.2/install-tools/mkinstalldirs ; \ /usr/bin/install -c /tmp/avr-gcc/src/gcc-4.1.2/gcc/fixproto /tmp/avr-gcc/tmp/ppc/usr/local/avr/libexec/gcc/avr/4.1.2/install-tools/fixproto ; \ /usr/bin/install -c build/fix-header \ /tmp/avr-gcc/tmp/ppc/usr/local/avr/libexec/gcc/avr/4.1.2/install-tools/fix-header ; \ else :; fi usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 file2 install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 ... fileN directory install -d [-v] [-g group] [-m mode] [-o owner] directory ... install: build/fix-header: No such file or directory make[3]: *** [install-mkheaders] Error 71 make[2]: *** [install-gcc] Error 2 make[1]: *** [install] Error 2 make: *** [install] Error 2
Created attachment 14119 [details] Full build log Attaching full build log.
Confirmed. # Install supporting files for fixincludes to be run later. install-mkheaders: stmp-int-hdrs $(STMP_FIXPROTO) install-itoolsdirs \ macro_list fixinc_list [snip] if [ x$(STMP_FIXPROTO) != x ] ; then \ $(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \ $(INSTALL_PROGRAM) build/fix-header$(build_exeext) \ $(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \ else :; fi As you can see, fix-header is never built. For reference: toolchain_build_sh4/gcc-4.3.0-final$ gcc/xgcc -v Using built-in specs. Target: sh4-linux-uclibc Configured with: /there.sh/toolchain_build_sh4/gcc-4.3.0/configure --prefix=/usr --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu --target=sh4-linux-uclibc --enable-languages=c,fortran --with-sysroot=/there.sh/build_sh4/staging_dir --with-build-time-tools=/there.sh/build_sh4/staging_dir/usr/sh4-linux-uclibc/bin --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --enable-shared --with-gmp=/there.sh/toolchain_build_sh4/gmp --with-mpfr=/there.sh/toolchain_build_sh4/mpfr --disable-nls --enable-threads --disable-multilib --disable-libgomp --disable-libmudflap --disable-libssp Thread model: posix gcc version 4.3.0 20080118 (experimental) (GCC) Given that i don't build c++, should fix-headers be installed in the first place (for use a different compiler, perhaps)?
fix-proto is never run, it seems: $ grep "stmp-" out.log echo timestamp > stmp-fixinc echo timestamp > stmp-int-hdrs echo timestamp > stmp-install-fixproto if [ xstmp-install-fixproto != x ] ; then \ after fixincludes is run, it seems to update the stamps it feels responsible for: cp /there.sh/toolchain_build_sh4/gcc-4.3.0/gcc/../fixincludes/README-fixinc incl ude-fixed/README chmod a+r include-fixed/README echo timestamp > stmp-int-hdrs echo timestamp > stmp-install-fixproto I'm doing a simple configure;make all; make install
Bruce, Can you please have a look. How is that ment to work?
Assuming build=i386-linux-*, host==target==sh4-linux-*, i.e. cross-compiling a native compiler for SuperH: -) sh*-* forces use_fixproto in config.gcc (why?) See config.gcc: line 2308 -) stmp-install-fixproto: fixproto - The comment above this rule is wrong, fixproto is a shell-script. - this rule doesn't depend on any fix-header, but the stamp is used to unconditionally install fix-header. -) build/fix-header${build_exeext} Tries to compile a binary with mixed build- and host- objects, like (abbreviated): $HOSTCC -DGENERATOR_FILE -o build/fix-header \ build/fix-header.o c-incpath.o cppdefault.o build/scan-decls.o prefix.o \ build/scan.o build/errors.o ../libcpp/libcpp.a ../libiberty/libiberty etc. where build/* is of course incompatible with the other object files. This suggests that use_fixproto resp. stmp-install-fixproto makes only sense for host == build *or* (assuming this is not correct) that we need fix-header for both build and for host (which is currently not implemented AFAICS). Please advise.
fixincludes has nothing to do with fixproto, other than both working with fixing up headers and having names that start with "fix". So, I know little about it and even less about canadian crosses. "fix-header" also starts with "fix", but has a different purpose: gcc/fix-header.c:/* fix-header.c - Make C header file suitable for C++.
I've "fixed" superH locally via \\\\ \\ gcc PR33200 Index: gcc-4.3.0/gcc/config.gcc =================================================================== --- gcc-4.3.0/gcc/config.gcc (revision 131628) +++ gcc-4.3.0/gcc/config.gcc (working copy) @@ -2302,7 +2305,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbian if test x${enable_incomplete_targets} = xyes ; then tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1" fi - use_fixproto=yes + # XXX: why? use_fixproto=yes ;; sh-*-rtemscoff*) tmake_file="sh/t-sh t-rtems sh/t-rtems" until somebody knowledgeable explains how this should be fixed for good.
this has been fixed for gcc-4.4 ... time to close the bug ? http://gcc.gnu.org/viewcvs?view=rev&revision=136783
fix-header has been removed for 4.5, so all bugs relating to it are gone. Most targets no longer use it, a few that used it were removed.