Sync STARTFILE_SPEC, fixes egcc -static producing crashing programs
I don't expect any fallout from this (builtin spec file change only)
OK?
? todo.txt
Index: Makefile
===================================================================
RCS file: /home/vcs/cvs/openbsd/ports/lang/gcc/4.9/Makefile,v
retrieving revision 1.32
diff -u -p -r1.32 Makefile
--- Makefile 29 Jun 2016 16:14:41 -0000 1.32
+++ Makefile 9 Jul 2016 21:41:29 -0000
@@ -4,8 +4,7 @@ ONLY_FOR_ARCHS = amd64 arm hppa i386 mip
DPB_PROPERTIES = parallel
V = 4.9.3
-REVISION = 7
-REVISION-java = 8
+REVISION = 9
FULL_VERSION = $V
FULL_PKGVERSION = $V
Index: patches/patch-gcc_config_alpha_openbsd_h
===================================================================
RCS file:
/home/vcs/cvs/openbsd/ports/lang/gcc/4.9/patches/patch-gcc_config_alpha_openbsd_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-gcc_config_alpha_openbsd_h
--- patches/patch-gcc_config_alpha_openbsd_h 26 Jun 2014 16:30:17 -0000
1.1.1.1
+++ patches/patch-gcc_config_alpha_openbsd_h 9 Jul 2016 21:41:29 -0000
@@ -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
+--- 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
+/* 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() \
Index: patches/patch-gcc_config_i386_openbsdelf_h
===================================================================
RCS file:
/home/vcs/cvs/openbsd/ports/lang/gcc/4.9/patches/patch-gcc_config_i386_openbsdelf_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-gcc_config_i386_openbsdelf_h
--- patches/patch-gcc_config_i386_openbsdelf_h 26 Jun 2014 16:30:17 -0000
1.1.1.1
+++ patches/patch-gcc_config_i386_openbsdelf_h 9 Jul 2016 21:41:29 -0000
@@ -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
+--- 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_openbsde
-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}"
+
Index: patches/patch-gcc_config_mips_openbsd_h
===================================================================
RCS file:
/home/vcs/cvs/openbsd/ports/lang/gcc/4.9/patches/patch-gcc_config_mips_openbsd_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-gcc_config_mips_openbsd_h
--- patches/patch-gcc_config_mips_openbsd_h 26 Jun 2014 16:30:18 -0000
1.1.1.1
+++ patches/patch-gcc_config_mips_openbsd_h 9 Jul 2016 21:41:29 -0000
@@ -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 @@
+--- 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_
+/* 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}"
Index: patches/patch-gcc_config_pa_pa-openbsd_h
===================================================================
RCS file:
/home/vcs/cvs/openbsd/ports/lang/gcc/4.9/patches/patch-gcc_config_pa_pa-openbsd_h,v
retrieving revision 1.1
diff -u -p -r1.1 patch-gcc_config_pa_pa-openbsd_h
--- patches/patch-gcc_config_pa_pa-openbsd_h 3 Feb 2015 20:32:12 -0000
1.1
+++ patches/patch-gcc_config_pa_pa-openbsd_h 9 Jul 2016 21:41:29 -0000
@@ -1,11 +1,22 @@
$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
+--- 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} \
+ %{rdynamic:-export-dynamic} \
%{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}"
Index: patches/patch-gcc_config_rs6000_sysv4_h
===================================================================
RCS file:
/home/vcs/cvs/openbsd/ports/lang/gcc/4.9/patches/patch-gcc_config_rs6000_sysv4_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-gcc_config_rs6000_sysv4_h
--- patches/patch-gcc_config_rs6000_sysv4_h 26 Jun 2014 16:30:17 -0000
1.1.1.1
+++ patches/patch-gcc_config_rs6000_sysv4_h 9 Jul 2016 21:41:29 -0000
@@ -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
+--- 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_
#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_
#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
Index: patches/patch-gcc_config_sparc_openbsd64_h
===================================================================
RCS file:
/home/vcs/cvs/openbsd/ports/lang/gcc/4.9/patches/patch-gcc_config_sparc_openbsd64_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-gcc_config_sparc_openbsd64_h
--- patches/patch-gcc_config_sparc_openbsd64_h 26 Jun 2014 16:30:17 -0000
1.1.1.1
+++ patches/patch-gcc_config_sparc_openbsd64_h 9 Jul 2016 21:41:29 -0000
@@ -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
+--- 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_openbsd
#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_openbsd
%{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}"
Index: patches/patch-gcc_config_sparc_openbsd_h
===================================================================
RCS file:
/home/vcs/cvs/openbsd/ports/lang/gcc/4.9/patches/patch-gcc_config_sparc_openbsd_h,v
retrieving revision 1.1
diff -u -p -r1.1 patch-gcc_config_sparc_openbsd_h
--- patches/patch-gcc_config_sparc_openbsd_h 25 Aug 2014 09:57:04 -0000
1.1
+++ patches/patch-gcc_config_sparc_openbsd_h 9 Jul 2016 21:41:29 -0000
@@ -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 @@
+--- 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
+/* 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}"
+