Sync startfile spec, fixes egcc -static to link against rcrt0

ok stefan@ pascal@ naddy@
This commit is contained in:
tobiasu 2016-07-14 07:22:31 +00:00
parent 6331309983
commit 1a681052d6
8 changed files with 80 additions and 41 deletions

View File

@ -1,11 +1,10 @@
# $OpenBSD: Makefile,v 1.32 2016/06/29 16:14:41 espie Exp $
# $OpenBSD: Makefile,v 1.33 2016/07/14 07:22:31 tobiasu Exp $
ONLY_FOR_ARCHS = amd64 arm hppa i386 mips64 mips64el powerpc sparc sparc64
DPB_PROPERTIES = parallel
V = 4.9.3
REVISION = 7
REVISION-java = 8
REVISION = 9
FULL_VERSION = $V
FULL_PKGVERSION = $V

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-gcc_config_alpha_openbsd_h,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/config/alpha/openbsd.h.orig Thu Jan 10 21:38:27 2013
+++ gcc/config/alpha/openbsd.h Thu Apr 18 20:58:27 2013
$OpenBSD: patch-gcc_config_alpha_openbsd_h,v 1.2 2016/07/14 07:22:31 tobiasu Exp $
--- gcc/config/alpha/openbsd.h.orig Thu Jan 2 23:23:26 2014
+++ gcc/config/alpha/openbsd.h Sat Jul 9 22:13:30 2016
@@ -19,6 +19,28 @@ along with GCC; see the file COPYING3. If not see
/* Controlling the compilation driver. */
@ -21,11 +21,11 @@ $OpenBSD: patch-gcc_config_alpha_openbsd_h,v 1.1.1.1 2014/06/26 16:30:17 pascal
+/* As an elf system, we need crtbegin/crtend stuff. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "\
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
+ crtbegin%O%s} %{shared:crtbeginS%O%s}"
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+ %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+ %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
+
+
/* run-time target specifications */
#define TARGET_OS_CPP_BUILTINS() \

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-gcc_config_i386_openbsdelf_h,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/config/i386/openbsdelf.h.orig Sun Sep 2 16:13:21 2012
+++ gcc/config/i386/openbsdelf.h Fri Oct 12 11:24:33 2012
@@ -97,10 +97,13 @@ along with GCC; see the file COPYING3. If not see
$OpenBSD: patch-gcc_config_i386_openbsdelf_h,v 1.2 2016/07/14 07:22:31 tobiasu Exp $
--- gcc/config/i386/openbsdelf.h.orig Thu Jan 2 23:23:26 2014
+++ gcc/config/i386/openbsdelf.h Fri Jul 8 17:18:50 2016
@@ -97,14 +97,17 @@ along with GCC; see the file COPYING3. If not see
%{shared:-shared} %{R*} \
%{static:-Bstatic} \
%{!static:-Bdynamic} \
@ -10,8 +10,15 @@ $OpenBSD: patch-gcc_config_i386_openbsdelf_h,v 1.1.1.1 2014/06/26 16:30:17 pasca
-dynamic-linker /usr/libexec/ld.so"
#undef STARTFILE_SPEC
+
-#define STARTFILE_SPEC "\
- %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
- crtbegin%O%s} %{shared:crtbeginS%O%s}"
+#define SUBTARGET32_DEFAULT_CPU "i486"
#define STARTFILE_SPEC "\
%{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
crtbegin%O%s} %{shared:crtbeginS%O%s}"
+#define STARTFILE_SPEC "\
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+ %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+ %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-gcc_config_mips_openbsd_h,v 1.1.1.1 2014/06/26 16:30:18 pascal Exp $
--- gcc/config/mips/openbsd.h.orig Fri May 2 12:54:22 2014
+++ gcc/config/mips/openbsd.h Sat May 3 03:53:05 2014
@@ -0,0 +1,225 @@
$OpenBSD: patch-gcc_config_mips_openbsd_h,v 1.2 2016/07/14 07:22:31 tobiasu Exp $
--- gcc/config/mips/openbsd.h.orig Sat Jul 9 22:05:54 2016
+++ gcc/config/mips/openbsd.h Sat Jul 9 22:28:39 2016
@@ -0,0 +1,227 @@
+/* Configuration file for a mips64 OpenBSD target.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
@ -146,7 +146,9 @@ $OpenBSD: patch-gcc_config_mips_openbsd_h,v 1.1.1.1 2014/06/26 16:30:18 pascal E
+/* As an elf system, we need crtbegin/crtend stuff. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "\
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+ %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+ %{!nopie:rcrt0%O%s}}}} \
+ crtbegin%O%s} %{shared:crtbeginS%O%s}"
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-gcc_config_pa_pa-openbsd_h,v 1.1 2015/02/03 20:32:12 pascal Exp $
--- gcc/config/pa/pa-openbsd.h.orig Mon Feb 2 09:25:56 2015
+++ gcc/config/pa/pa-openbsd.h Mon Feb 2 09:26:04 2015
@@ -138,6 +138,7 @@ along with GCC; see the file COPYING3. If not see
$OpenBSD: patch-gcc_config_pa_pa-openbsd_h,v 1.2 2016/07/14 07:22:31 tobiasu Exp $
--- gcc/config/pa/pa-openbsd.h.orig Thu Jan 2 23:23:26 2014
+++ gcc/config/pa/pa-openbsd.h Sat Jul 9 22:26:21 2016
@@ -138,14 +138,15 @@ along with GCC; see the file COPYING3. If not see
%{shared:-shared} %{R*} \
%{static:-Bstatic} \
%{!static:-Bdynamic} \
@ -9,3 +9,14 @@ $OpenBSD: patch-gcc_config_pa_pa-openbsd_h,v 1.1 2015/02/03 20:32:12 pascal Exp
%{assert*} \
-dynamic-linker /usr/libexec/ld.so"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "\
- %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
- crtbegin%O%s} %{shared:crtbeginS%O%s}"
-
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+ %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+ %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-gcc_config_rs6000_sysv4_h,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/config/rs6000/sysv4.h.orig Mon Feb 10 15:46:24 2014
+++ gcc/config/rs6000/sysv4.h Wed Apr 23 12:49:02 2014
$OpenBSD: patch-gcc_config_rs6000_sysv4_h,v 1.2 2016/07/14 07:22:31 tobiasu Exp $
--- gcc/config/rs6000/sysv4.h.orig Thu Jul 24 19:25:19 2014
+++ gcc/config/rs6000/sysv4.h Fri Jul 8 18:18:15 2016
@@ -381,6 +381,7 @@ do { \
asm_fprintf (FILE, "%L%s", PREFIX)
@ -9,7 +9,7 @@ $OpenBSD: patch-gcc_config_rs6000_sysv4_h,v 1.1.1.1 2014/06/26 16:30:17 pascal E
#define GLOBAL_ASM_OP "\t.globl "
/* This says how to output assembler code to declare an
@@ -813,7 +814,7 @@ ncrtn.o%s"
@@ -813,13 +814,14 @@ ncrtn.o%s"
/* OpenBSD support. */
#ifndef LIB_OPENBSD_SPEC
@ -18,7 +18,16 @@ $OpenBSD: patch-gcc_config_rs6000_sysv4_h,v 1.1.1.1 2014/06/26 16:30:17 pascal E
#endif
#ifndef STARTFILE_OPENBSD_SPEC
@@ -836,7 +837,7 @@ ncrtn.o%s"
#define STARTFILE_OPENBSD_SPEC "\
-%{!shared: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}} \
-%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
+%{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+%{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} %{!nopie:rcrt0%O%s}}}} \
+crtbegin%O%s} %{shared:crtbeginS%O%s}"
#endif
#ifndef ENDFILE_OPENBSD_SPEC
@@ -836,7 +838,7 @@ ncrtn.o%s"
#endif
#ifndef CPP_OS_OPENBSD_SPEC

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/config/sparc/openbsd64.h.orig Tue May 21 16:00:41 2013
+++ gcc/config/sparc/openbsd64.h Sat Jun 1 08:55:09 2013
$OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.2 2016/07/14 07:22:31 tobiasu Exp $
--- gcc/config/sparc/openbsd64.h.orig Thu Jan 2 23:23:26 2014
+++ gcc/config/sparc/openbsd64.h Thu Jul 7 21:42:18 2016
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
/* XXX - do we really want HARD_QUAD? */
#undef TARGET_DEFAULT
@ -60,7 +60,7 @@ $OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.1.1.1 2014/06/26 16:30:17 pasca
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 128
@@ -66,6 +76,7 @@ along with GCC; see the file COPYING3. If not see
@@ -66,13 +76,15 @@ along with GCC; see the file COPYING3. If not see
%{shared:-shared} %{R*} \
%{static:-Bstatic} \
%{!static:-Bdynamic} \
@ -68,3 +68,13 @@ $OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.1.1.1 2014/06/26 16:30:17 pasca
%{assert*} \
-dynamic-linker /usr/libexec/ld.so"
/* As an elf system, we need crtbegin/crtend stuff. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "\
- %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
- crtbegin%O%s} %{shared:crtbeginS%O%s}"
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+ %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+ %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-gcc_config_sparc_openbsd_h,v 1.1 2014/08/25 09:57:04 tobiasu Exp $
--- gcc/config/sparc/openbsd.h.orig Thu Aug 21 14:28:30 2014
+++ gcc/config/sparc/openbsd.h Thu Aug 21 14:28:30 2014
@@ -0,0 +1,95 @@
$OpenBSD: patch-gcc_config_sparc_openbsd_h,v 1.2 2016/07/14 07:22:31 tobiasu Exp $
--- gcc/config/sparc/openbsd.h.orig Thu Jul 7 19:09:32 2016
+++ gcc/config/sparc/openbsd.h Thu Jul 7 21:41:00 2016
@@ -0,0 +1,96 @@
+/* Configuration file for sparc OpenBSD target.
+ Copyright (C) 1999, 2005 Free Software Foundation, Inc.
+
@ -89,8 +89,9 @@ $OpenBSD: patch-gcc_config_sparc_openbsd_h,v 1.1 2014/08/25 09:57:04 tobiasu Exp
+/* As an elf system, we need crtbegin/crtend stuff. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "\
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
+ crtbegin%O%s} %{shared:crtbeginS%O%s}"
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+ %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+ %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
+