This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Update of Hurd/i386 configuration
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Update of Hurd/i386 configuration
- From: Mark Kettenis <kettenis at wins dot uva dot nl>
- Date: Sun, 6 Jun 1999 22:22:34 +0200 (CEST)
- CC: hurd-maintainers at gnu dot org
Hi,
This patch updates the support for egcs/gcc on the Hurd. It would be
nice if this could be included in the gcc-2.95 release, since it makes
gcc on i386-*-gnu* much more consistent with the other i386 ports,
especially i386-*-linux-gnu.
Mark
Fri Jun 4 00:28:48 1999 Mark Kettenis <kettenis@gnu.org>
* config/gnu.h (LIB_SPEC): Add support for -mieee-fp.
* config/i386/gnu.h: Include <gnu.h> right after <i386/linux.h>,
such that we can override its definitions if necessary.
(CPP_SPEC): New define. Support processor specific predefines via
%(cpp_cpu).
(CC1_SPEC): New define. Support processor specific compiler
options via %(cc1_cpu).
(STARTFILE_SPEC): New define. Use crt0.o instead of crt1.o for
-static.
Index: egcs/gcc/config/gnu.h
===================================================================
RCS file: /var/cvsroot/egcs/gcc/config/gnu.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 gnu.h
--- gnu.h 1999/05/13 13:32:05 1.1.1.1
+++ gnu.h 1999/05/30 14:56:09
@@ -6,7 +6,8 @@
/* Default C library spec. Use -lbsd-compat for gcc -bsd. */
#undef LIB_SPEC
-#define LIB_SPEC "%{bsd:-lbsd-compat} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+#define LIB_SPEC "%{bsd:-lbsd-compat} %{mieee-fp:-lieee} \
+ %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
/* Standard include directory. In GNU, "/usr" is a four-letter word. */
#undef STANDARD_INCLUDE_DIR
Index: egcs/gcc/config/i386/gnu.h
===================================================================
RCS file: /var/cvsroot/egcs/gcc/config/i386/gnu.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 gnu.h
--- gnu.h 1999/05/13 13:32:09 1.1.1.1
+++ gnu.h 1999/06/06 15:01:42
@@ -3,13 +3,22 @@
/* This does it mostly for us. */
#include <i386/linux.h>
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Di386 -Acpu(i386) -Amachine(i386) \
--Dunix -Asystem(unix) -DMACH -Asystem(mach) -D__GNU__ -Asystem(gnu)"
+/* Get machine-independent configuration parameters for the GNU system. */
+#include <gnu.h>
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i386 GNU)");
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-D__ELF__ -D__i386__ -DMACH -Asystem(mach) \
+ -Dunix -Asystem(unix) -Asystem(posix) -D__GNU__ -Asystem(gnu)"
+
+#undef CPP_SPEC
+#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}"
+
+#undef CC1_SPEC
+#define CC1_SPEC "%(cc1_cpu)"
+
#undef LINK_SPEC
#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
%{!shared: \
@@ -17,7 +26,11 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so}} \
%{static:-static}}"
-
-/* Get machine-independent configuration parameters for the GNU system. */
-#include <gnu.h>
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+ "%{!shared: \
+ %{!static: \
+ %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
+ %{static:crt0.o%s}} \
+ crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"