17.3.2011 12:58, David Paterson kirjoitti:
I'm currently rebuilding using the methods you recommended, and so far it's working fine... :-)
It seems that preinstalling the target headers into the '$prefix/$target/include' and putting them to be seen also in '$prefix/$target/sys-include' (the GCC build expects to see them there for investigation) is always obligatory! If putting only the 'newlib' and 'libgloss' among the GCC sources, the C library will be built but for instance the GCC's own 'limits.h' will not be fixed to include the newlib's 'limits.h'. Don't ask me why the GCC build expects the target headers in '$prefix/$target/sys-include' and not in the assumed '$prefix/$target/include' for where the newlib install will put the final headers... I have never got any answer to this insanity. The '--with-headers=' will copy the pointed headers into the '$prefix/$target/sys-include' and if one uses this to copy the generic newlib headers there, the result will be totally wrong :( When using the compiler the '$prefix/$target/sys-include' will be searched before the '$prefix/$target/include' for headers and the possibly changed target-specific newlib headers will never be found! So I suggest manual copying with 'cp -r' and a symlink... Or knowing that what the '--with-headers=' copied, must be removed after the GCC installation!