public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] GNU/Hurd target configuration
@ 2008-10-08 20:23 Thomas Schwinge
  2008-10-09  8:37 ` Paolo Bonzini
  2008-11-10  0:01 ` [PATCH] GNU/Hurd target configuration Thomas Schwinge
  0 siblings, 2 replies; 8+ messages in thread
From: Thomas Schwinge @ 2008-10-08 20:23 UTC (permalink / raw)
  To: gcc-patches, bug-hurd; +Cc: debian-bsd

[-- Attachment #1: Type: text/plain, Size: 6207 bytes --]

Hello!

Here is a patch to bring the target configuration for GNU/Hurd up to a
level so that GCC trunk is buildable for GNU/Hurd again (together with
other patches that are already available or are still to be written; see
my other posts).  This GCC does even ;-) produce working binaries.
Please discuss with the goal to have this eventually committed to the GCC
trunk.

No ChangeLog yet.

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(Revision 140963)
+++ gcc/config.gcc	(Arbeitskopie)
@@ -480,16 +480,28 @@
   esac
   fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h"
   ;;
-*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
-  # Must come before *-*-gnu* (because of *-*-linux-gnu* systems).
+*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu*)
   extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
-  extra_options="${extra_options} linux.opt"
   gas=yes
   gnu_ld=yes
   case ${enable_threads} in
     "" | yes | posix) thread_file='posix' ;;
   esac
   tmake_file="t-slibgcc-elf-ver t-linux"
+  case $target in
+    *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
+      :;;
+    *-*-gnu*)
+      tmake_file="$tmake_file t-gnu";;
+  esac
+  # glibc / uclibc switch.  uclibc isn't usable for GNU/Hurd and neither for
+  # GNU/k*BSD.
+  case $target in
+    *linux*)
+      extra_options="${extra_options} linux.opt";;
+    *)
+      tm_defines="$tm_defines OPTION_GLIBC=1";;
+  esac
   case ${target} in
     *-*-*uclibc*)
       tm_defines="${tm_defines} UCLIBC_DEFAULT=1"
@@ -502,30 +514,6 @@
   default_use_cxa_atexit=yes
   use_gcc_tgmath=no
   ;;
-*-*-gnu*)
-  # On the Hurd, the setup is just about the same on
-  # each different CPU.  The specific machines that we
-  # support are matched above and just set $cpu_type.
-  tm_file="${cpu_type}/gnu.h"
-  extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
-  # GNU tools are the only tools.
-  gas=yes
-  gnu_ld=yes
-  # These details are the same as for Linux.
-  # But here we need a little extra magic.
-  tmake_file="t-slibgcc-elf-ver t-linux t-gnu"
-  case ${target} in
-    alpha*)
-      tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}"
-      ;;
-    i[34567]86-*-*)
-      tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}"
-      ;;
-  esac
-  # Assume that glibc is being used and so __cxa_atexit is provided.
-  default_use_cxa_atexit=yes
-  use_gcc_tgmath=no
-  ;;
 *-*-netbsd*)
   tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd t-libgcc-pic"
   gas=yes
@@ -618,6 +606,7 @@
 	tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee alpha/t-linux"
 	;;
 alpha*-*-gnu*)
+	tm_file="$tm_file alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h alpha/gnu.h"
 	target_cpu_default="MASK_GAS"
 	tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
 	;;
@@ -1085,7 +1075,7 @@
 i[34567]86-*-coff*)
 	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h"
 	;;
-i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu)
+i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu*)
 			# Intel 80386's running GNU/*
 			# with ELF format using glibc 2
 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h"
@@ -1116,6 +1106,7 @@
 		;;
 	i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} i386/linux.h knetbsd-gnu.h i386/knetbsd-gnu.h" ;;
 	i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} i386/linux.h kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
+	i[34567]86-*-gnu*) tm_file="$tm_file i386/linux.h gnu.h i386/gnu.h";;
 	esac
 	tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
 	;;
@@ -1128,8 +1119,6 @@
 	esac
 	tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
 	;;
-i[34567]86-*-gnu*)
-	;;
 i[34567]86-pc-msdosdjgpp*)
 	xm_file=i386/xm-djgpp.h
 	tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h"
Index: gcc/config/i386/gnu.h
===================================================================
--- gcc/config/i386/gnu.h	(Revision 140963)
+++ gcc/config/i386/gnu.h	(Arbeitskopie)
@@ -1,30 +1,17 @@
 /* Configuration for an i386 running GNU with ELF as the target machine.  */
 
+#undef GLIBC_DYNAMIC_LINKER
+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so"
+
 #undef TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (i386 GNU)");
 
-#undef TARGET_OS_CPP_BUILTINS /* config.gcc includes i386/linux.h.  */
-#define TARGET_OS_CPP_BUILTINS()		\
-  do						\
-    {						\
-	HURD_TARGET_OS_CPP_BUILTINS();		\
-    }						\
-  while (0)
-
 #undef CPP_SPEC
 #define CPP_SPEC "%{pthread:-D_REENTRANT} %{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: \
-    %{!static: \
-      %{rdynamic:-export-dynamic} \
-      %{!dynamic-linker:-dynamic-linker /lib/ld.so}} \
-    %{static:-static}}"
-
 #undef	STARTFILE_SPEC
 #if defined HAVE_LD_PIE
 #define STARTFILE_SPEC \
@@ -42,3 +29,8 @@
 
 /* FIXME: Is a Hurd-specific fallback mechanism necessary?  */
 #undef MD_UNWIND_SUPPORT
+
+#ifdef TARGET_LIBC_PROVIDES_SSP
+/* Not supported yet.  */
+#undef TARGET_THREAD_SSP_OFFSET
+#endif
Index: gcc/config/gnu.h
===================================================================
--- gcc/config/gnu.h	(Revision 140963)
+++ gcc/config/gnu.h	(Arbeitskopie)
@@ -12,10 +12,8 @@
 #undef STANDARD_INCLUDE_DIR
 #define STANDARD_INCLUDE_DIR "/include"
 
-/* The system headers under GNU are C++-aware.  */
-#define NO_IMPLICIT_EXTERN_C
-
-#define HURD_TARGET_OS_CPP_BUILTINS()		\
+#undef LINUX_TARGET_OS_CPP_BUILTINS
+#define LINUX_TARGET_OS_CPP_BUILTINS()		\
     do {					\
 	builtin_define ("__gnu_hurd__");	\
 	builtin_define ("__GNU__");		\

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] GNU/Hurd target configuration
  2008-10-08 20:23 [PATCH] GNU/Hurd target configuration Thomas Schwinge
@ 2008-10-09  8:37 ` Paolo Bonzini
  2008-10-09 13:24   ` Thomas Schwinge
  2008-10-10 11:53   ` [PATCH] Add missing copyright and licensing header Thomas Schwinge
  2008-11-10  0:01 ` [PATCH] GNU/Hurd target configuration Thomas Schwinge
  1 sibling, 2 replies; 8+ messages in thread
From: Paolo Bonzini @ 2008-10-09  8:37 UTC (permalink / raw)
  To: gcc-patches; +Cc: debian-bsd, bug-hurd

> Index: gcc/config.gcc
> ===================================================================
> --- gcc/config.gcc	(Revision 140963)
> +++ gcc/config.gcc	(Arbeitskopie)

Ok.

> Index: gcc/config/i386/gnu.h
> ===================================================================
> --- gcc/config/i386/gnu.h	(Revision 140963)
> +++ gcc/config/i386/gnu.h	(Arbeitskopie)
> @@ -1,30 +1,17 @@
>  /* Configuration for an i386 running GNU with ELF as the target machine.  */

Please add the standard header including license info.  I would not be
able to approve it but I don't think anybody cares about Hurd, so ok.

> Index: gcc/config/gnu.h
> ===================================================================
> --- gcc/config/gnu.h	(Revision 140963)
> +++ gcc/config/gnu.h	(Arbeitskopie)

Likewise.

Do you have access to svn?

Paolo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] GNU/Hurd target configuration
  2008-10-09  8:37 ` Paolo Bonzini
@ 2008-10-09 13:24   ` Thomas Schwinge
  2008-10-10 11:53   ` [PATCH] Add missing copyright and licensing header Thomas Schwinge
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas Schwinge @ 2008-10-09 13:24 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: bug-hurd, gcc-patches, debian-bsd

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]

Hello!

On Thu, Oct 09, 2008 at 10:26:48AM +0200, Paolo Bonzini wrote:
> > Index: gcc/config/i386/gnu.h
> > ===================================================================
> > --- gcc/config/i386/gnu.h	(Revision 140963)
> > +++ gcc/config/i386/gnu.h	(Arbeitskopie)
> > @@ -1,30 +1,17 @@
> >  /* Configuration for an i386 running GNU with ELF as the target machine.  */
> 
> Please add the standard header including license info.  I would not be
> able to approve it but I don't think anybody cares about Hurd, so ok.

I'll try to track down the people and the years (from SVN logs) in which
they contributed, and assemble such a header.


> Do you have access to svn?

No.  No active Hurd person currently has such access.


Regards,
 Thomas

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] Add missing copyright and licensing header
  2008-10-09  8:37 ` Paolo Bonzini
  2008-10-09 13:24   ` Thomas Schwinge
@ 2008-10-10 11:53   ` Thomas Schwinge
  2008-11-09 23:03     ` [COMMITTED] " Thomas Schwinge
  1 sibling, 1 reply; 8+ messages in thread
From: Thomas Schwinge @ 2008-10-10 11:53 UTC (permalink / raw)
  To: gcc-patches, Paolo Bonzini

[-- Attachment #1: Type: text/plain, Size: 2936 bytes --]

Hello!

On Thu, Oct 09, 2008 at 10:26:48AM +0200, Paolo Bonzini wrote:
> > Index: gcc/config/i386/gnu.h
> > ===================================================================
> > --- gcc/config/i386/gnu.h	(Revision 140963)
> > +++ gcc/config/i386/gnu.h	(Arbeitskopie)
> > @@ -1,30 +1,17 @@
> >  /* Configuration for an i386 running GNU with ELF as the target machine.  */
> 
> Please add the standard header including license info.  I would not be
> able to approve it but I don't think anybody cares about Hurd, so ok.
> 
> > Index: gcc/config/gnu.h
> > ===================================================================
> > --- gcc/config/gnu.h	(Revision 140963)
> > +++ gcc/config/gnu.h	(Arbeitskopie)
> 
> Likewise.

Here we go:

2008-10-10  Thomas Schwinge  <tschwinge@gnu.org>

	* config/i386/gnu.h: Add copyright and licensing header.
	* config/gnu.h: Likewise.

Index: config/i386/gnu.h
===================================================================
--- config/i386/gnu.h	(Revision 141003)
+++ config/i386/gnu.h	(Arbeitskopie)
@@ -2,2 +2,22 @@
 
+/*
+Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+2005, 2007, 2008 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
 #undef TARGET_VERSION
Index: config/gnu.h
===================================================================
--- config/gnu.h	(Revision 141003)
+++ config/gnu.h	(Arbeitskopie)
@@ -2,2 +2,22 @@
 
+/*
+Copyright (C) 1994, 1995, 1997, 1998, 1999, 2002, 2003, 2004, 2007, 2008 Free
+Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
 /* Provide GCC options for standard feature-test macros.  */


Regards,
 Thomas

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [COMMITTED] Add missing copyright and licensing header
  2008-10-10 11:53   ` [PATCH] Add missing copyright and licensing header Thomas Schwinge
@ 2008-11-09 23:03     ` Thomas Schwinge
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Schwinge @ 2008-11-09 23:03 UTC (permalink / raw)
  To: gcc-patches, Paolo Bonzini

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

Hello!

On Fri, Oct 10, 2008 at 12:06:10PM +0200, I wrote:
> On Thu, Oct 09, 2008 at 10:26:48AM +0200, Paolo Bonzini wrote:
> > > Index: gcc/config/i386/gnu.h
> > > ===================================================================
> > > --- gcc/config/i386/gnu.h	(Revision 140963)
> > > +++ gcc/config/i386/gnu.h	(Arbeitskopie)
> > > @@ -1,30 +1,17 @@
> > >  /* Configuration for an i386 running GNU with ELF as the target machine.  */
> > 
> > Please add the standard header including license info.  I would not be
> > able to approve it but I don't think anybody cares about Hurd, so ok.
> > 
> > > Index: gcc/config/gnu.h
> > > ===================================================================
> > > --- gcc/config/gnu.h	(Revision 140963)
> > > +++ gcc/config/gnu.h	(Arbeitskopie)
> > 
> > Likewise.
> 
> Here we go:
> 
> 2008-10-10  Thomas Schwinge  <tschwinge@gnu.org>
> 
> 	* config/i386/gnu.h: Add copyright and licensing header.
> 	* config/gnu.h: Likewise.

This was acked by Paolo in private email; now installed as rev. 141721.


Regards,
 Thomas

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] GNU/Hurd target configuration
  2008-10-08 20:23 [PATCH] GNU/Hurd target configuration Thomas Schwinge
  2008-10-09  8:37 ` Paolo Bonzini
@ 2008-11-10  0:01 ` Thomas Schwinge
  2008-11-10 12:07   ` Paolo Bonzini
  2008-11-14  0:28   ` Thomas Schwinge
  1 sibling, 2 replies; 8+ messages in thread
From: Thomas Schwinge @ 2008-11-10  0:01 UTC (permalink / raw)
  To: gcc-patches; +Cc: bug-hurd, debian-bsd, Paolo Bonzini

[-- Attachment #1: Type: text/plain, Size: 6998 bytes --]

Hello!

On Wed, Oct 08, 2008 at 10:14:04PM +0200, I wrote:
> Here is a patch to bring the target configuration for GNU/Hurd up to a
> level so that GCC trunk is buildable for GNU/Hurd again

> Please discuss with the goal to have this eventually committed to the GCC
> trunk.

Here it is, reposted.  It has already been acked by Paolo.  This is what
I'm going to install unless someone objects.

Please also tell me whether this could also be installed on the 4.3 and
4.2 branches.

2008-11-09  Thomas Schwinge  <tschwinge@gnu.org>

	* config.gcc (*-*-gnu*): Move Alpha parts into the `alpha*-*-gnu*', x86
	parts into the `i[34567]86-*-linux*' and parts that are independent of
	the processor architecture into the `*-*-linux*' cases.
	(*-*-linux*): Consider `linux.opt' only for Linux-based configurations.
	* config/i386/gnu.h (GLIBC_DYNAMIC_LINKER): Redefine.
	(TARGET_OS_CPP_BUILTINS, LINK_SPEC): Don't redefine.
	[TARGET_LIBC_PROVIDES_SSP] (TARGET_THREAD_SSP_OFFSET): Undefine.
	* config/gnu.h (NO_IMPLICIT_EXTERN_C): Don't redefine.
	(HURD_TARGET_OS_CPP_BUILTINS): Don't define, but instead...
	(LINUX_TARGET_OS_CPP_BUILTINS): Redefine.

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(Revision 140963)
+++ gcc/config.gcc	(Arbeitskopie)
@@ -480,16 +480,28 @@
   esac
   fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h"
   ;;
-*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
-  # Must come before *-*-gnu* (because of *-*-linux-gnu* systems).
+*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu*)
   extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
-  extra_options="${extra_options} linux.opt"
   gas=yes
   gnu_ld=yes
   case ${enable_threads} in
     "" | yes | posix) thread_file='posix' ;;
   esac
   tmake_file="t-slibgcc-elf-ver t-linux"
+  case $target in
+    *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
+      :;;
+    *-*-gnu*)
+      tmake_file="$tmake_file t-gnu";;
+  esac
+  # glibc / uclibc switch.  uclibc isn't usable for GNU/Hurd and neither for
+  # GNU/k*BSD.
+  case $target in
+    *linux*)
+      extra_options="$extra_options linux.opt";;
+    *)
+      tm_defines="$tm_defines OPTION_GLIBC=1";;
+  esac
   case ${target} in
     *-*-*uclibc*)
       tm_defines="${tm_defines} UCLIBC_DEFAULT=1"
@@ -502,30 +514,6 @@
   default_use_cxa_atexit=yes
   use_gcc_tgmath=no
   ;;
-*-*-gnu*)
-  # On the Hurd, the setup is just about the same on
-  # each different CPU.  The specific machines that we
-  # support are matched above and just set $cpu_type.
-  tm_file="${cpu_type}/gnu.h"
-  extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
-  # GNU tools are the only tools.
-  gas=yes
-  gnu_ld=yes
-  # These details are the same as for Linux.
-  # But here we need a little extra magic.
-  tmake_file="t-slibgcc-elf-ver t-linux t-gnu"
-  case ${target} in
-    alpha*)
-      tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}"
-      ;;
-    i[34567]86-*-*)
-      tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}"
-      ;;
-  esac
-  # Assume that glibc is being used and so __cxa_atexit is provided.
-  default_use_cxa_atexit=yes
-  use_gcc_tgmath=no
-  ;;
 *-*-netbsd*)
   tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd t-libgcc-pic"
   gas=yes
@@ -618,6 +606,7 @@
 	tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee alpha/t-linux"
 	;;
 alpha*-*-gnu*)
+	tm_file="$tm_file alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h alpha/gnu.h"
 	target_cpu_default="MASK_GAS"
 	tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
 	;;
@@ -1085,7 +1075,7 @@
 i[34567]86-*-coff*)
 	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h"
 	;;
-i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu)
+i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu*)
 			# Intel 80386's running GNU/*
 			# with ELF format using glibc 2
 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h"
@@ -1116,6 +1106,7 @@
 		;;
 	i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} i386/linux.h knetbsd-gnu.h i386/knetbsd-gnu.h" ;;
 	i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} i386/linux.h kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
+	i[34567]86-*-gnu*) tm_file="$tm_file i386/linux.h gnu.h i386/gnu.h";;
 	esac
 	tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
 	;;
@@ -1128,8 +1119,6 @@
 	esac
 	tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
 	;;
-i[34567]86-*-gnu*)
-	;;
 i[34567]86-pc-msdosdjgpp*)
 	xm_file=i386/xm-djgpp.h
 	tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h"
Index: gcc/config/i386/gnu.h
===================================================================
--- gcc/config/i386/gnu.h	(Revision 140963)
+++ gcc/config/i386/gnu.h	(Arbeitskopie)
@@ -1,30 +1,17 @@
 /* Configuration for an i386 running GNU with ELF as the target machine.  */
 
+#undef GLIBC_DYNAMIC_LINKER
+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so"
+
 #undef TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (i386 GNU)");
 
-#undef TARGET_OS_CPP_BUILTINS /* config.gcc includes i386/linux.h.  */
-#define TARGET_OS_CPP_BUILTINS()		\
-  do						\
-    {						\
-	HURD_TARGET_OS_CPP_BUILTINS();		\
-    }						\
-  while (0)
-
 #undef CPP_SPEC
 #define CPP_SPEC "%{pthread:-D_REENTRANT} %{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: \
-    %{!static: \
-      %{rdynamic:-export-dynamic} \
-      %{!dynamic-linker:-dynamic-linker /lib/ld.so}} \
-    %{static:-static}}"
-
 #undef	STARTFILE_SPEC
 #if defined HAVE_LD_PIE
 #define STARTFILE_SPEC \
@@ -42,3 +29,8 @@
 
 /* FIXME: Is a Hurd-specific fallback mechanism necessary?  */
 #undef MD_UNWIND_SUPPORT
+
+#ifdef TARGET_LIBC_PROVIDES_SSP
+/* Not supported yet.  */
+#undef TARGET_THREAD_SSP_OFFSET
+#endif
Index: gcc/config/gnu.h
===================================================================
--- gcc/config/gnu.h	(Revision 140963)
+++ gcc/config/gnu.h	(Arbeitskopie)
@@ -12,10 +12,8 @@
 #undef STANDARD_INCLUDE_DIR
 #define STANDARD_INCLUDE_DIR "/include"
 
-/* The system headers under GNU are C++-aware.  */
-#define NO_IMPLICIT_EXTERN_C
-
-#define HURD_TARGET_OS_CPP_BUILTINS()		\
+#undef LINUX_TARGET_OS_CPP_BUILTINS
+#define LINUX_TARGET_OS_CPP_BUILTINS()		\
     do {					\
 	builtin_define ("__gnu_hurd__");	\
 	builtin_define ("__GNU__");		\


Regards,
 Thomas

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] GNU/Hurd target configuration
  2008-11-10  0:01 ` [PATCH] GNU/Hurd target configuration Thomas Schwinge
@ 2008-11-10 12:07   ` Paolo Bonzini
  2008-11-14  0:28   ` Thomas Schwinge
  1 sibling, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2008-11-10 12:07 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: gcc-patches, bug-hurd


> Please also tell me whether this could also be installed on the 4.3 and
> 4.2 branches.

No, I don't think so.

Paolo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] GNU/Hurd target configuration
  2008-11-10  0:01 ` [PATCH] GNU/Hurd target configuration Thomas Schwinge
  2008-11-10 12:07   ` Paolo Bonzini
@ 2008-11-14  0:28   ` Thomas Schwinge
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas Schwinge @ 2008-11-14  0:28 UTC (permalink / raw)
  To: gcc-patches; +Cc: Paolo Bonzini, bug-hurd, debian-bsd

[-- Attachment #1: Type: text/plain, Size: 1290 bytes --]

Hello!

On Mon, Nov 10, 2008 at 12:37:22AM +0100, I wrote:
> On Wed, Oct 08, 2008 at 10:14:04PM +0200, I wrote:
> > Here is a patch to bring the target configuration for GNU/Hurd up to a
> > level so that GCC trunk is buildable for GNU/Hurd again
> 
> > Please discuss with the goal to have this eventually committed to the GCC
> > trunk.
> 
> Here it is, reposted.  It has already been acked by Paolo.  This is what
> I'm going to install unless someone objects.

No further discussion happened, so...

> 2008-11-09  Thomas Schwinge  <tschwinge@gnu.org>
> 
> 	* config.gcc (*-*-gnu*): Move Alpha parts into the `alpha*-*-gnu*', x86
> 	parts into the `i[34567]86-*-linux*' and parts that are independent of
> 	the processor architecture into the `*-*-linux*' cases.
> 	(*-*-linux*): Consider `linux.opt' only for Linux-based configurations.
> 	* config/i386/gnu.h (GLIBC_DYNAMIC_LINKER): Redefine.
> 	(TARGET_OS_CPP_BUILTINS, LINK_SPEC): Don't redefine.
> 	[TARGET_LIBC_PROVIDES_SSP] (TARGET_THREAD_SSP_OFFSET): Undefine.
> 	* config/gnu.h (NO_IMPLICIT_EXTERN_C): Don't redefine.
> 	(HURD_TARGET_OS_CPP_BUILTINS): Don't define, but instead...
> 	(LINUX_TARGET_OS_CPP_BUILTINS): Redefine.

... thusly committed and PR target/28102 closed.


Regards,
 Thomas

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-11-13 23:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-08 20:23 [PATCH] GNU/Hurd target configuration Thomas Schwinge
2008-10-09  8:37 ` Paolo Bonzini
2008-10-09 13:24   ` Thomas Schwinge
2008-10-10 11:53   ` [PATCH] Add missing copyright and licensing header Thomas Schwinge
2008-11-09 23:03     ` [COMMITTED] " Thomas Schwinge
2008-11-10  0:01 ` [PATCH] GNU/Hurd target configuration Thomas Schwinge
2008-11-10 12:07   ` Paolo Bonzini
2008-11-14  0:28   ` Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).