Don't use linux.h for non-Linux targets

Thomas Schwinge thomas@schwinge.name
Tue Apr 26 22:47:00 GMT 2011


Hallo!

First, Joseph, thanks for working on this clean-up!  I'm sorry for the
delay, but I have now reviewed all these patches (including those you
have committed by now); looks all good.


On Tue, 12 Apr 2011 18:37:50 +0000 (UTC), "Joseph S. Myers" <joseph@codesourcery.com> wrote:
> This patch stops targets not using the Linux kernel from using
> linux*.h config headers.  [...]

> 2011-04-12  Joseph Myers  <joseph@codesourcery.com>
> 
> 	* config.gcc (*-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* |
> 	*-*-kopensolaris*-gnu): Don't define SINGLE_LIBC.
> 	(i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu |
> 	i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu,
> 	x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu): Don't use
> 	linux*.h headers.
> 	* config/gnu-user.h (TARGET_C99_FUNCTIONS, TARGET_HAS_SINCOS):
> 	Define.
> 	* config/i386/gnu.h (MD_UNWIND_SUPPORT): Don't undefine.
> 	* config/i386/kfreebsd-gnu.h (MD_UNWIND_SUPPORT): Don't undefine.
> 	* config/i386/knetbsd-gnu.h (MD_UNWIND_SUPPORT): Don't undefine.
> 	* config/i386/kopensolaris-gnu.h (MD_UNWIND_SUPPORT): Don't
> 	undefine.
> 	* config/i386/linux-unwind.h (x86_fallback_frame_state): Don't use
> 	REG_NAME.
> 	* config/i386/linux.h (REG_NAME): Don't define.
> 	* config/i386/linux64.h (REG_NAME): Don't define.
> 	* config/linux.h (TARGET_C99_FUNCTIONS, TARGET_HAS_SINCOS):
> 	Undefine before defining.

Looks good, too.  I have not yet built-tested this (and it's too late by
now), but I'll do that in the next days.


One (minor) additional idea: for clarity, shouldn't it now be possible to
remove any #undef GNU_USER_TARGET_OS_CPP_BUILTINS, #undef
GNU_USER_DYNAMIC_LINKER, #undef GNU_USER_LINK_EMULATION, etc. from
*gnu.h?  I don't expect you to test this; I'll have a look later on.

I'll also test whether gnu.h:LIB_SPEC is still needed, or if the
gnu-user.h definition contains all we need.


Grüße,
 Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110426/a9538c08/attachment.sig>


More information about the Gcc-patches mailing list