This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Saturday 13 August 2005 12:16 am, Dan Kegel wrote: > Mike Frysinger wrote: > >>Have you read the last paragraph of > >>http://kegel.com/crosstool/crosstool-0.38/doc/crosstool-howto.html#canadi > >>an which mentions you need to edit the resulting spec file? > > > > heh, that fixed the issue on my end ... `gcc -print-search-dirs` now > > includes /usr/lib and /lib ... > > > > what about gcc-4.x then ? iirc, they're getting away from external > > spec's, so this wont be fixable in the same way right ? dont quote me on that, i just vaguely remember hearing about it and if i check my local gcc-4.0.0 / gcc-4.0.1 installs, i dont have a 'specs' file like i do with gcc-3.3.[56] and gcc-3.4.[34] ... > I guess it'll take a little looking at the code to see > where it gets the value from now, and fix it there instead. > Anyone feel like looking? (Or asking the experts?) anytime i ask experts i just look like a dumbass :D for those who dont want to read below, the short answer is: gcc-3.x installs a broken specs file but the binary itself is OK which means since gcc-4.x doesnt install a default specs file, it should work even better out of the box ... now on to the brain dump: gcc/gcc.c has this: #ifdef CROSS_COMPILE static const char *cross_compile = "1"; #else static const char *cross_compile = "0"; #endif CROSS_COMPILE comes from gcc/configure.ac: CROSS= AC_SUBST(CROSS) ... if test x$host != x$target then CROSS="-DCROSS_COMPILE" but as we can see, a canadian cross shouldnt trigger this ... nor does it if we run `gcc -dumpspecs` on the target host after deleting the local specs file ... however, the generated gcc/specs file after running `make` certainly has cross_compile set to 1 ... gcc/Makefile.in has this target: # Dump a specs file to make -B./ read these specs over installed ones. $(SPECS): xgcc$(exeext) $(GCC_FOR_TARGET) -dumpspecs > tmp-specs mv tmp-specs $(SPECS) i havent tested this bit, but it sounds like the cross gcc that is being used to build the target gcc is having *its* specs dumped which would explain why the installed specs file reports itself as a cross-compiler ... i guess what this all means is that specs building with gcc-3.x is broken unless we add a small tweak here which would fix tmp-specs before moving it to $(SPECS) ... but since the compiled gcc has the correct value encoded in it, gcc-4.x should be fine -mike ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |