This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more infromation.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Fred Anger <anger@triib.com> wrote: > Ok, so I built egcs-1.1.2 on my sunos4 box, and tarred up everything > under $builddir/gcc/include, added /usr/include/sys/sysmacros.h (because > unistd.h needs it), and stuck them all under > /usr/local/sparc-sun-sunos4/include on my linux box, reconfigured using > > --program-prefix="sunos4-" > --target="sparc-sun-sunos4" > --with-headers="/usr/local/sparc-sun-sunos4/include" > > and re-ran the build. You should have tarred all the target system headers and libs and stuck them on your Linux box under '/usr/local/sparc-sun-sunos4/', not only the 'fixed' headers... The legal aspects may say that only those 'copied-by-gcc' may be transferred, but it is another problem... > Now it's complaining about parse errors. > _muldi3 > In file included from ../../../../egcs-1.1.2/gcc/libgcc2.c:41: > include/stdlib.h:43: parse error before `mbstowcs' > include/stdlib.h:43: warning: data definition has no type or storage > class > include/stdlib.h:44: parse error before `wcstombs' > include/stdlib.h:44: warning: data definition has no type or storage > class > > *** lines 43-44 from stdlib.h are below *** > extern size_t mbstowcs _PARAMS((__WCHAR_TYPE__ *, const char *, > __SIZE_TYPE__ )) > ; > extern size_t wcstombs _PARAMS((char *, const __WCHAR_TYPE__ *, > __SIZE_TYPE__ )) > ; The error messages "parse error before `mbstowcs'" and "parse error before `wcstombs'" very clearly say what is wrong -- it doesn't know what the hell the 'size_t' means... It is defined in 'stddef.h', probably in '<sys/types.h>' etc., but why 'stdlib.h' didn't got it defined earlier is a problem for you to track and solve... Ok, that was a joke, I help you a little... My 'sparc-sunos4.1' <stdlib.h> starts as : ---------------- clip ----------------- #ifndef _STDLIB_H #define _STDLIB_H /* @(#)stdlib.h 1.2 89/10/10 SMI; from include/stdlib.h 1.6 */ #include <sys/stdtypes.h> /* to get size_t */ #include <malloc.h> ---------------- clip ----------------- So the <sys/stdtypes.h> should have the 'size_t' definition, just as the comment says... You can continue looking at that... My thought is that the 'fixincludes' fixed something wrong... Anyhow as an general rule the native Linux-headers shouldn't ever be used with a cross-compiler (unless a 'Linux-gnulibc1-to-Linux-gnu' or something)... Cheers, Kai ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |