[Bug target/28551] libgcc.a being generated in improper format for powerpc-eabi cross
--- Comment #6 from spkelly at andrew dot cmu dot edu 2006-08-01 16:48 --- Okay. I find it a little odd that I was at first still geting the stdlibc++ error when I specified --enable-languages=c (and, for the reference of anyone else, --disable-libssp), but after poking around and remembering to manually specify a local GNU Make 3.81 rather than the older default make, everything appears to have compiled fine. Thanks for the help, even if I do still hold that the cross-compilation methodology is a little roundabout. -- spkelly at andrew dot cmu dot edu changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28551
[Bug target/28551] libgcc.a being generated in improper format for powerpc-eabi cross
--- Comment #5 from spkelly at andrew dot cmu dot edu 2006-07-31 20:30 --- (In reply to comment #4) > http://gcc.gnu.org/simtest-howto.html > Thanks again, but... - make output: [15+ minutes of successful output] checking for shared libgcc... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES. make[1]: *** [configure-target-libstdc++-v3] Error 1 make[1]: Leaving directory `/scratch/spkelly/cross_top/build' make: *** [all] Error 2 - I think that just further proves my point. Running the howto code verbatim, with the exception of substituting "powerpc-eabisim" for "arm-sim", the virtually-guaranteed-to-be-idiot-proof build method, still barfs. For reasons which look to be totally unrelated to the issue I first reported, I'll concede, but there's still something about embedded cross-compilation with gcc that makes the process less than straightforward. I'll twiddle the configure options closer to what I was trying for initially (fewer languages, fewer libs) and see whether that goes cleanly or whether there's still something odd lurking beneath the surface. Or you could just set the bug to WORKSFORME and be done with it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28551
[Bug target/28551] libgcc.a being generated in improper format for powerpc-eabi cross
--- Comment #3 from spkelly at andrew dot cmu dot edu 2006-07-31 18:35 --- I'd really expected to have good news, but even with newlib and gcc rebuilt for powerpc-eabisim, I still get the same error (with and without -msim, which sounds to be the default for *-eabisim anyway). I also found I needed to compile sim-crt0 manually after building gcc for eabisim, unlike with eabi. And now that I think about it, shouldn't output object files be compatible for building provided I keep the same host/build/target, regardless of whether that target is correct for the platform I plan to run on...? (eg, when I originally built for powerpc-eabi, shouldn't the default settings have let me compile programs for ~some~ real powerpc-eabi -mtarget, regardless of whether or not they ran in the simulator?) On the one hand I do feel guilty about getting dev assistance off a bug list when there may not actually be a bug involved. On the other hand, if there isn't a bug but simply so many caveats that one can't sit down, follow stock documentaton and get a working build, that in its self seems to point to a usability issue which could be better addressed. - The new error, as such, with a sim-crt0.o compiled from .../newlib-1.14.0/libgloss/rs6000/sim-crt0.S in the local directory (the 'No such file' error otherwise triggered is useless for telling where it should actually go): powerpc-eabisim-gcc -msim arithtest.c /scratch/spkelly/ppcbin/bin/../lib/gcc/powerpc-eabisim/4.1.1/libgcc.a: could not read symbols: File format not recognized collect2: ld returned 1 exit status - The line used to compile gcc (without errors): ../configure --target=powerpc-eabisim --prefix=/scratch/spkelly/ppcbin/ --disable-threads --disable-shared --enable-languages=c make all-gcc install-gcc -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28551
[Bug target/28551] libgcc.a being generated in improper format for powerpc-eabi cross
--- Comment #2 from spkelly at andrew dot cmu dot edu 2006-07-31 15:11 --- (In reply to comment #1) > If you want to use powerpc-eabi with the simulator, you to configure it as > such. > > powerpc-eabisim is the correct target for the powerpc-eabi simulator. > Will try. Thanks. I figured user error was a likely candidate :) Leaving the bug open ~just in case~ there's something wrong beyond configuration target, but it can probably be considered fixed. I'll update with success/failure once I've recompiled everything. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28551
[Bug bootstrap/28133] Cross-compile of GCC fails with "C compiler cannot create executables" error
--- Comment #3 from spkelly at andrew dot cmu dot edu 2006-07-31 14:51 --- My bug has been further probed, wholely separated from 25035, and submitted independently as http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28551 Don't bother investigating it as part of 25035 or 28133. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28133
[Bug target/28551] New: libgcc.a being generated in improper format for powerpc-eabi cross
71: undefined reference to `__EXCEPT_END__' collect2: ld returned 1 exit status - output with -msim: powerpc-unknown-eabi-gcc -msim arithtest.c /scratch/spkelly/ppcbin/lib/gcc/powerpc-unknown-eabi/4.1.1/libgcc.a: could not read symbols: File format not recognized collect2: ld returned 1 exit status - arithtest.c: int main(){ int a,b,c,d; a=5; b=7; c=a+b; d=a*b; return 0; } -- Summary: libgcc.a being generated in improper format for powerpc- eabi cross Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: spkelly at andrew dot cmu dot edu GCC build triplet: i686-pc-linux-gnu GCC host triplet: powerpc-*-eabi GCC target triplet: powerpc-*-eabi http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28551
[Bug bootstrap/28133] Cross-compile of GCC fails with "C compiler cannot create executables" error
--- Comment #2 from spkelly at andrew dot cmu dot edu 2006-07-28 19:37 --- (In reply to comment #1) > Actually this is a dup of bug 25035. > > *** This bug has been marked as a duplicate of 25035 *** > Actually, I'm getting the same list of errors when trying to build programs ~with~ an i686 to powerpc-eabi cross compiling gcc4.1.1, before and after applying the patch for 25035, and even after rebuilding everything with --disable-libssp. The following output and config.log are from an attempt to build newlib with the successfully-compiled powerpc-*-eabi-gcc (lexically different but functionally identical --host and --target specified to force the newlib configure into recognizing cross-compilation and allowing --with-headers), but the same output happens when attempting to build a 5-line simple arithmetic test app. Not to say this isn't a ~different~ already-known bug, but it doesn't seem to be the 25035 bug. Apologies if I've screwed up the commenting protocol, this is my first time using bugzilla so I don't know how much I can safely write/set/tweak. creating cache ./config.cache checking host system type... powerpc-ibm-eabi checking target system type... powerpc-unknown-eabi checking build system type... i686-pc-linux-gnu checking for a BSD compatible install... /usr/local/bin/install -c checking whether ln works... yes checking whether ln -s works... yes checking for powerpc-ibm-eabi-gnatbind... no checking for gnatbind... no checking whether compiler driver understands Ada... no checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2 checking for correct version of gmp.h... no /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/../../../../powerpc-ibm-eabi/bin/ld: warning: cannot find entry symbol _start; defaulting to 01800074 /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.text+0xc4): In function `__eabi': /scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:232: undefined reference to `__init' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x8):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:146: undefined reference to `__SDATA_START__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0xc):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:148: undefined reference to `__SBSS_END__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x14):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:150: undefined reference to `__SDATA2_START__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x18):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:151: undefined reference to `__SBSS2_END__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x1c):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:152: undefined reference to `__GOT_START__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x28):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:155: undefined reference to `__GOT_END__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x2c):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:156: undefined reference to `__GOT2_START__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x30):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:157: undefined reference to `__GOT2_END__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x34):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:158: undefined reference to `__FIXUP_START__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x38):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:159: undefined reference to `__FIXUP_END__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x3c):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:163: undefined reference to `__CTOR_LIST__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x40):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:164: undefined reference to `__CTOR_END__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x44):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:165: undefined reference to `__DTOR_LIST__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x48):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:166: undefined reference to `__DTOR_END__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x4c):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:167: undefined reference to `__EXCEPT_START__' /scratch/spkelly/ppcbin/lib/gcc/powerpc-ibm-eabi/4.1.1/libgcc.a(eabi.o)(.got2+0x50):/scratch/spkelly/gcc-4.1.1/build/gcc/eabi.S:171: undefined reference to `__EXCEPT_END__' collect2: ld returned 1 exit status *** The command 'powerpc-ibm-eabi-gcc -o conftest -g -O2conft