Patchwork Clean up i386/gnu.h

login
register
mail settings
Submitter Joseph S. Myers
Date April 11, 2011, 7:28 p.m.
Message ID <Pine.LNX.4.64.1104111926470.32677@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/90638/
State New
Headers show

Comments

Joseph S. Myers - April 11, 2011, 7:28 p.m.
Now that gnu-user*.h and linux*.h config headers have more or less the
proper contents, the next stage in stopping non-Linux-kernel-based
targets from using linux*.h is to get the correct contents into the
headers for the non-Linux-kernel-based targets.  This patch does so
for i386/gnu.h.  GNU_USER_LINK_EMULATION is defined (to the same value
as in i386/linux.h, so just duplicating that definition until this
target stops using i386/linux.h).  CPP_SPEC, duplicating the
i386/gnu-user.h definition, is removed, as is CC1_SPEC (missing
-profile support from the gnu-user version, which should be there
judging by -profile support in other specs).  ENDFILE_SPEC is also
removed; the gnu-user version has additional support for crtfastmath.o
and crtprec*.o and since libgcc/config.host indicates those files get
built for GNU/Hurd, the gnu-user spec that uses those files should be
used for GNU/Hurd.

Tested building cc1 and xgcc for cross to i686-gnu.  OK to commit?

2011-04-11  Joseph Myers  <joseph@codesourcery.com>

	* config/i386/gnu.h (GNU_USER_LINK_EMULATION): Define.
	(CPP_SPEC, CC1_SPEC, ENDFILE_SPEC): Remove.
Richard Henderson - April 11, 2011, 9:16 p.m.
On 04/11/2011 12:28 PM, Joseph S. Myers wrote:
> 	* config/i386/gnu.h (GNU_USER_LINK_EMULATION): Define.
> 	(CPP_SPEC, CC1_SPEC, ENDFILE_SPEC): Remove.

Ok.


r~

Patch

Index: gcc/config/i386/gnu.h
===================================================================
--- gcc/config/i386/gnu.h	(revision 172273)
+++ gcc/config/i386/gnu.h	(working copy)
@@ -20,15 +20,11 @@  You should have received a copy of the G
 along with GCC.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define GNU_USER_LINK_EMULATION "elf_i386"
+
 #undef GNU_USER_DYNAMIC_LINKER
 #define GNU_USER_DYNAMIC_LINKER "/lib/ld.so"
 
-#undef CPP_SPEC
-#define CPP_SPEC "%{pthread:-D_REENTRANT} %{posix:-D_POSIX_SOURCE}"
-
-#undef CC1_SPEC
-#define CC1_SPEC "%(cc1_cpu)"
-
 #undef	STARTFILE_SPEC
 #if defined HAVE_LD_PIE
 #define STARTFILE_SPEC \
@@ -40,10 +36,6 @@  along with GCC.  If not, see <http://www
    crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
 #endif
 
-#undef	ENDFILE_SPEC
-#define ENDFILE_SPEC \
-  "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
-
 /* FIXME: Is a Hurd-specific fallback mechanism necessary?  */
 #undef MD_UNWIND_SUPPORT