On 14/06/2006, at 10:47 AM, Mike Stump wrote:
Any suggestions? Does the -isysroot compiler flag fix this sort
of issue? It does not seem to be used in the gcc build.
I'd expect it might. Run with -v and see if isysroot is given to
ld. If not, add -Wl,-isysroot=... to pass it down to ld. In later
compilers, we do this automagically, given -isysroot.
I have written this up on the problem report.
-isysroot causes -isyslibroot to be given to ld. So you cannot add -
Wl,-isyslibroot or the links fail with 'syslibroot multiply defined'
The problem is that CFLAGS are not passed into the build of libgcc.
So unless -DCROSS_COMPILE is in the option list for the compiles
within libgcc --with-sysroot (TARGET_SYSTEM_ROOT) is ignored and
libgcc link fails because there is no code in the linked libSystem
library for the target architecture. So the configure script is the
basic cause of the problem, because it assumes the system libraries
are fat when they are not. I can't see how it hurts to test for fat
libraries instead of assuming their presence.
Bill