cross-compiled gcc-3.4.1 has faulty specs

Martin Schaffner schaffner@gmx.li
Wed Dec 1 22:14:00 GMT 2004


For my lfs-from-osx.txt LFS hint, I've compiled gcc-3.4.1 for 
powerpc-750-linux-gnu with a cross-compiler running on Mac OS X 10.3.5 
(built with crosstool-0.28-rc32), which is itself gcc-3.3.3.

I've configured gcc-3.4.1 like this:
../gcc-3.4.1/configure --prefix=/tools     --libexecdir=/tools/lib 
--with-local-prefix=/tools     --enable-clocale=gnu --enable-shared     
--enable-threads=posix --enable-__cxa_atexit     --enable-languages=c 
--disable-libstdcxx-pch --build=powerpc-apple-darwin7.4.0 
--host=powerpc-750-linux-gnu

When I try to use this cross-built native gcc-3.4.1, it tells me:
gcc: spec failure: unrecogniyed spec option 'v'
gcc: spec failure: unrecogniyed spec option 'v'
gcc: spec failure: unrecogniyed spec option 'p'
gcc: spec failure: unrecogniyed spec option 'P'

This is a snipped from the specs file of the cross-compiled gcc-3.4.1:
*cpp_unique_options:
... %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} 
%{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}} %{!no-gcc:-D__GNUC__=%v1 
-D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3} 
%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs} ...

When I look at gcc.c from gcc-3.3.3, I see:
static const char *cpp_unique_options =
...
%{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*}\
  %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}}\
  %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 
-D__GNUC_PATCHLEVEL__=%v3}\
  %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
...

When I look at gcc.c from gcc-3.4.1, I see:
static const char *cpp_unique_options =
...
  %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*}\
  %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}}\
  %{trigraphs} %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i\
...


It appears that the to create the specs file for the cross-compiled 
gcc-3.4.1, some parts of the specs for gcc-3.3.3 have been copied 
inside (don't know why), even thought they are not valid anymore in 
gcc-3.4.1.

I then tried to fix this by removing the part:
%{!no-gcc:...} %{undef:...}
but then the cross-compiled gcc-3.4.1 just said
Aborted
whenever I try to compile something (preprocessing works fine, though).

Any ideas?

Thanks in advance,
Martin


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list