summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authormaya <maya@pkgsrc.org>2016-09-06 13:57:02 +0000
committermaya <maya@pkgsrc.org>2016-09-06 13:57:02 +0000
commit9e8c47bc563a8354030c3b8ab66ed8dda6a4f64e (patch)
tree182ae094aafcc59173d8d108a7a974d52cb48fc5 /lang
parent24cf244e57b53ba910091499a7a1a8ba5db41cdd (diff)
downloadpkgsrc-9e8c47bc563a8354030c3b8ab66ed8dda6a4f64e.tar.gz
gcc46: use a more reasonable specfile for netbsd
disable libssp on netbsd - it conflicts with native libssp (PR pkg/47213) build fix by using stdarg instead of VA_*, cherry picked from https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=206881 fixes PR pkg/50042 bump PKGREVISION
Diffstat (limited to 'lang')
-rw-r--r--lang/gcc46/Makefile11
-rw-r--r--lang/gcc46/distinfo10
-rw-r--r--lang/gcc46/patches/patch-gcc_config_netbsd.h22
-rw-r--r--lang/gcc46/patches/patch-include_libiberty.h24
-rw-r--r--lang/gcc46/patches/patch-libiberty___doprnt.c25
-rw-r--r--lang/gcc46/patches/patch-libiberty_asprintf.c24
-rw-r--r--lang/gcc46/patches/patch-libiberty_concat.c108
-rw-r--r--lang/gcc46/patches/patch-libiberty_snprintf.c25
-rw-r--r--lang/gcc46/patches/patch-libiberty_vasprintf.c24
-rw-r--r--lang/gcc46/patches/patch-libiberty_vsnprintf.c26
10 files changed, 295 insertions, 4 deletions
diff --git a/lang/gcc46/Makefile b/lang/gcc46/Makefile
index 3e7314feb9d..3fe6e3bfd81 100644
--- a/lang/gcc46/Makefile
+++ b/lang/gcc46/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.31 2016/07/09 06:38:24 wiz Exp $
+# $NetBSD: Makefile,v 1.32 2016/09/06 13:57:02 maya Exp $
DISTNAME= gcc-${GCC_VERSION}
PKGNAME= gcc46-${GCC_VERSION}
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC_VERSION}/}
EXTRACT_SUFX= .tar.bz2
@@ -70,13 +70,18 @@ REPLACE_BASH+= gcc/dbgcnt.def
REPLACE_BASH+= gcc/testsuite/gcc.test-framework/gen_directive_tests
REPLACE_BASH+= libstdc++-v3/scripts/run_doxygen
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-*)
+# on NetBSD, use the native SSP code in libc
+CONFIGURE_ARGS+= --disable-libssp
+.else
+CONFIGURE_ARGS+= --enable-libssp
+.endif
CONFIGURE_ARGS+= --prefix=${GCC_PREFIX:Q}
CONFIGURE_ARGS+= --enable-languages=${LANGS:Q}
CONFIGURE_ARGS+= --enable-shared
CONFIGURE_ARGS+= --enable-long-long
CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q}
-CONFIGURE_ARGS+= --enable-libssp
CONFIGURE_ARGS+= --enable-threads=posix
CONFIGURE_ARGS.NetBSD+= --with-gnu-ld --with-ld=/usr/bin/ld
diff --git a/lang/gcc46/distinfo b/lang/gcc46/distinfo
index 070126d2a7e..1038dc4cbbc 100644
--- a/lang/gcc46/distinfo
+++ b/lang/gcc46/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.20 2015/11/03 22:50:35 agc Exp $
+$NetBSD: distinfo,v 1.21 2016/09/06 13:57:02 maya Exp $
SHA1 (gcc-4.6.4.tar.bz2) = 63933a8a5cf725626585dbba993c8b0f6db1335d
RMD160 (gcc-4.6.4.tar.bz2) = 6a58b053812cf75622bc4579e020cd9471f46916
@@ -35,6 +35,7 @@ SHA1 (patch-gcc_config_i386_i386.c) = 49ba75bb347a9c96606a7bef7e0f972488d881b3
SHA1 (patch-gcc_config_i386_openbsd.h) = 0adb1e531eb9d773cbd6944f279e949e59035bd3
SHA1 (patch-gcc_config_i386_openbsd64.h) = c4fdb98de196702afad36a75886967babf49a55a
SHA1 (patch-gcc_config_i386_openbsdelf.h) = cd7afa938514dc80fb53c683fb089468c935d2ae
+SHA1 (patch-gcc_config_netbsd.h) = 086b593cf9f05e654df9e1a527485ca727ec44cc
SHA1 (patch-gcc_config_openbsd-libpthread.h) = 826aaae4b2dda5a49ec71510f0752aba3c1b0b91
SHA1 (patch-gcc_config_openbsd.h) = a396d14b2df78a4c45d3e51ef7fe960bbc8d5754
SHA1 (patch-gcc_config_t-openbsd) = 662fe8d0c4b58145fb3268bc7ac432a1616c1106
@@ -48,7 +49,14 @@ SHA1 (patch-gcc_lto_lto.c) = 3c7df0691d300d2915388e7ef019b9717a9673d7
SHA1 (patch-gcc_opts.c) = e02ebec8a9de24492a3aba80ee8c742446f2c549
SHA1 (patch-gcc_unwind-dw2-fde-glibc.c) = 704ccc2b1058344586e0ccb8bcd291f41d93ed0a
SHA1 (patch-gcc_unwind-dw2-fde-openbsd.c) = 74b7df494848d8d52e4574bac3fa3742cd3ff0d7
+SHA1 (patch-include_libiberty.h) = 101c12fad8092c7eb7ba41a75ca84f9a8017589b
SHA1 (patch-libgcc_config_t-slibgcc-darwin) = 2ddda2dd979f27c623e47db70c5abb3befdb68c9
+SHA1 (patch-libiberty___doprnt.c) = 20f839e98ca235d5a34adcad6b7ea4a77f06a9e8
+SHA1 (patch-libiberty_asprintf.c) = 39d8ca4c95aa035c4d8e9faba2e5919c13f4444c
+SHA1 (patch-libiberty_concat.c) = 07fe2982d57151579736361ca15f3edd8b0bce69
+SHA1 (patch-libiberty_snprintf.c) = 25e131f8ea4e6f8b567088f653f6a02153aec202
+SHA1 (patch-libiberty_vasprintf.c) = a8c0ec0c3e9dbfcd675a0bb02a89e8c51a885605
+SHA1 (patch-libiberty_vsnprintf.c) = 362ea0ce3f86df6548388878006db4f951aa1f09
SHA1 (patch-libstdc++-v3_config_os_bsd_netbsd_ctype__base.h) = eac78601d0f531c8a49c88eacc59691312f1cf25
SHA1 (patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h) = 830038744cbbb713ecc3f960a9509bef16176db9
SHA1 (patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h) = ce481809b051cb281772a0ad4d561241731f7556
diff --git a/lang/gcc46/patches/patch-gcc_config_netbsd.h b/lang/gcc46/patches/patch-gcc_config_netbsd.h
new file mode 100644
index 00000000000..cfbef89290c
--- /dev/null
+++ b/lang/gcc46/patches/patch-gcc_config_netbsd.h
@@ -0,0 +1,22 @@
+$NetBSD: patch-gcc_config_netbsd.h,v 1.1 2016/09/06 13:57:02 maya Exp $
+
+when using shared, link against libc.
+
+--- gcc/config/netbsd.h.orig 2013-01-10 20:38:27.000000000 +0000
++++ gcc/config/netbsd.h
+@@ -96,6 +96,7 @@ along with GCC; see the file COPYING3.
+ %{!pg:-lposix}} \
+ %{p:-lposix_p} \
+ %{pg:-lposix_p}} \
++ %{shared:-lc} \
+ %{!shared: \
+ %{!symbolic: \
+ %{!p: \
+@@ -109,6 +110,7 @@ along with GCC; see the file COPYING3.
+ %{!pg:-lposix}} \
+ %{p:-lposix_p} \
+ %{pg:-lposix_p}} \
++ %{shared:-lc} \
+ %{!shared: \
+ %{!symbolic: \
+ %{!p: \
diff --git a/lang/gcc46/patches/patch-include_libiberty.h b/lang/gcc46/patches/patch-include_libiberty.h
new file mode 100644
index 00000000000..7628dbb7e32
--- /dev/null
+++ b/lang/gcc46/patches/patch-include_libiberty.h
@@ -0,0 +1,24 @@
+$NetBSD: patch-include_libiberty.h,v 1.1 2016/09/06 13:57:02 maya Exp $
+
+Don't use PARAMS
+cherry picked necessary parts from
+https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=206881
+
+fixes PR pkg/50042
+
+--- include/libiberty.h.orig 2011-01-03 20:52:22.000000000 +0000
++++ include/libiberty.h
+@@ -85,11 +85,11 @@ extern char **dupargv (char **) ATTRIBUT
+
+ /* Expand "@file" arguments in argv. */
+
+-extern void expandargv PARAMS ((int *, char ***));
++extern void expandargv (int *, char ***);
+
+ /* Write argv to an @-file, inserting necessary quoting. */
+
+-extern int writeargv PARAMS ((char **, FILE *));
++extern int writeargv (char **, FILE *);
+
+ /* Return the last component of a path name. Note that we can't use a
+ prototype here because the parameter is declared inconsistently
diff --git a/lang/gcc46/patches/patch-libiberty___doprnt.c b/lang/gcc46/patches/patch-libiberty___doprnt.c
new file mode 100644
index 00000000000..82a85b247e6
--- /dev/null
+++ b/lang/gcc46/patches/patch-libiberty___doprnt.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-libiberty___doprnt.c,v 1.1 2016/09/06 13:57:02 maya Exp $
+
+use stdarg, not VA_* macros.
+cherry picked necessary parts from
+https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=206881
+
+fixes PR pkg/50042
+
+--- libiberty/_doprnt.c.orig 2005-05-10 15:33:18.000000000 +0000
++++ libiberty/_doprnt.c
+@@ -222,11 +222,11 @@ static int
+ checkit (const char* format, ...)
+ {
+ int result;
+- VA_OPEN (args, format);
+- VA_FIXEDARG (args, char *, format);
++ va_list args;
++ va_start (args, format);
+
+ result = _doprnt (format, args, stdout);
+- VA_CLOSE (args);
++ va_end (args);
+
+ return result;
+ }
diff --git a/lang/gcc46/patches/patch-libiberty_asprintf.c b/lang/gcc46/patches/patch-libiberty_asprintf.c
new file mode 100644
index 00000000000..a1d24bf15b3
--- /dev/null
+++ b/lang/gcc46/patches/patch-libiberty_asprintf.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-libiberty_asprintf.c,v 1.1 2016/09/06 13:57:02 maya Exp $
+
+use stdarg, not VA_* macros.
+cherry picked necessary parts from
+https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=206881
+
+fixes PR pkg/50042
+
+--- libiberty/asprintf.c.orig 2005-05-10 15:33:18.000000000 +0000
++++ libiberty/asprintf.c
+@@ -47,10 +47,9 @@ int
+ asprintf (char **buf, const char *fmt, ...)
+ {
+ int status;
+- VA_OPEN (ap, fmt);
+- VA_FIXEDARG (ap, char **, buf);
+- VA_FIXEDARG (ap, const char *, fmt);
++ va_list ap;
++ va_start (ap, fmt);
+ status = vasprintf (buf, fmt, ap);
+- VA_CLOSE (ap);
++ va_end (ap);
+ return status;
+ }
diff --git a/lang/gcc46/patches/patch-libiberty_concat.c b/lang/gcc46/patches/patch-libiberty_concat.c
new file mode 100644
index 00000000000..b937a7e533f
--- /dev/null
+++ b/lang/gcc46/patches/patch-libiberty_concat.c
@@ -0,0 +1,108 @@
+$NetBSD: patch-libiberty_concat.c,v 1.1 2016/09/06 13:57:02 maya Exp $
+
+use stdarg, not VA_* macros.
+cherry picked necessary parts from
+https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=206881
+
+fixes PR pkg/50042
+
+--- libiberty/concat.c.orig 2011-02-03 07:23:20.000000000 +0000
++++ libiberty/concat.c
+@@ -102,11 +90,11 @@ unsigned long
+ concat_length (const char *first, ...)
+ {
+ unsigned long length;
++ va_list args;
+
+- VA_OPEN (args, first);
+- VA_FIXEDARG (args, const char *, first);
++ va_start (args, first);
+ length = vconcat_length (first, args);
+- VA_CLOSE (args);
++ va_end (args);
+
+ return length;
+ }
+@@ -117,13 +105,12 @@ char *
+ concat_copy (char *dst, const char *first, ...)
+ {
+ char *save_dst;
++ va_list args;
+
+- VA_OPEN (args, first);
+- VA_FIXEDARG (args, char *, dst);
+- VA_FIXEDARG (args, const char *, first);
++ va_start (args, first);
+ vconcat_copy (dst, first, args);
+ save_dst = dst; /* With K&R C, dst goes out of scope here. */
+- VA_CLOSE (args);
++ va_end (args);
+
+ return save_dst;
+ }
+@@ -141,10 +128,10 @@ char *libiberty_concat_ptr;
+ char *
+ concat_copy2 (const char *first, ...)
+ {
+- VA_OPEN (args, first);
+- VA_FIXEDARG (args, const char *, first);
++ va_list args;
++ va_start (args, first);
+ vconcat_copy (libiberty_concat_ptr, first, args);
+- VA_CLOSE (args);
++ va_end (args);
+
+ return libiberty_concat_ptr;
+ }
+@@ -153,18 +140,17 @@ char *
+ concat (const char *first, ...)
+ {
+ char *newstr;
++ va_list args;
+
+ /* First compute the size of the result and get sufficient memory. */
+- VA_OPEN (args, first);
+- VA_FIXEDARG (args, const char *, first);
++ va_start (args, first);
+ newstr = XNEWVEC (char, vconcat_length (first, args) + 1);
+- VA_CLOSE (args);
++ va_end (args);
+
+ /* Now copy the individual pieces to the result string. */
+- VA_OPEN (args, first);
+- VA_FIXEDARG (args, const char *, first);
++ va_start (args, first);
+ vconcat_copy (newstr, first, args);
+- VA_CLOSE (args);
++ va_end (args);
+
+ return newstr;
+ }
+@@ -191,22 +177,19 @@ char *
+ reconcat (char *optr, const char *first, ...)
+ {
+ char *newstr;
++ va_list args;
+
+ /* First compute the size of the result and get sufficient memory. */
+- VA_OPEN (args, first);
+- VA_FIXEDARG (args, char *, optr);
+- VA_FIXEDARG (args, const char *, first);
++ va_start (args, first);
+ newstr = XNEWVEC (char, vconcat_length (first, args) + 1);
+- VA_CLOSE (args);
++ va_end (args);
+
+ /* Now copy the individual pieces to the result string. */
+- VA_OPEN (args, first);
+- VA_FIXEDARG (args, char *, optr);
+- VA_FIXEDARG (args, const char *, first);
++ va_start (args, first);
+ vconcat_copy (newstr, first, args);
+ if (optr) /* Done before VA_CLOSE so optr stays in scope for K&R C. */
+ free (optr);
+- VA_CLOSE (args);
++ va_end (args);
+
+ return newstr;
+ }
diff --git a/lang/gcc46/patches/patch-libiberty_snprintf.c b/lang/gcc46/patches/patch-libiberty_snprintf.c
new file mode 100644
index 00000000000..5a8b9771e80
--- /dev/null
+++ b/lang/gcc46/patches/patch-libiberty_snprintf.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-libiberty_snprintf.c,v 1.1 2016/09/06 13:57:02 maya Exp $
+
+use stdarg, not VA_* macros.
+cherry picked necessary parts from
+https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=206881
+
+fixes PR pkg/50042
+
+--- libiberty/snprintf.c.orig 2011-02-03 07:23:20.000000000 +0000
++++ libiberty/snprintf.c
+@@ -53,11 +53,9 @@ int
+ snprintf (char *s, size_t n, const char *format, ...)
+ {
+ int result;
+- VA_OPEN (ap, format);
+- VA_FIXEDARG (ap, char *, s);
+- VA_FIXEDARG (ap, size_t, n);
+- VA_FIXEDARG (ap, const char *, format);
++ va_list ap;
++ va_start (ap, format);
+ result = vsnprintf (s, n, format, ap);
+- VA_CLOSE (ap);
++ va_end (ap);
+ return result;
+ }
diff --git a/lang/gcc46/patches/patch-libiberty_vasprintf.c b/lang/gcc46/patches/patch-libiberty_vasprintf.c
new file mode 100644
index 00000000000..a9e98b5ad22
--- /dev/null
+++ b/lang/gcc46/patches/patch-libiberty_vasprintf.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-libiberty_vasprintf.c,v 1.1 2016/09/06 13:57:02 maya Exp $
+
+use stdarg, not VA_* macros.
+cherry picked necessary parts from
+https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=206881
+
+fixes PR pkg/50042
+
+--- libiberty/vasprintf.c.orig 2011-02-03 07:23:20.000000000 +0000
++++ libiberty/vasprintf.c
+@@ -165,10 +165,10 @@ static void ATTRIBUTE_PRINTF_1
+ checkit (const char *format, ...)
+ {
+ char *result;
+- VA_OPEN (args, format);
+- VA_FIXEDARG (args, const char *, format);
++ va_list args;
++ va_start (args, format);
+ vasprintf (&result, format, args);
+- VA_CLOSE (args);
++ va_end (args);
+
+ if (strlen (result) < (size_t) global_total_width)
+ printf ("PASS: ");
diff --git a/lang/gcc46/patches/patch-libiberty_vsnprintf.c b/lang/gcc46/patches/patch-libiberty_vsnprintf.c
new file mode 100644
index 00000000000..bcba0a20fef
--- /dev/null
+++ b/lang/gcc46/patches/patch-libiberty_vsnprintf.c
@@ -0,0 +1,26 @@
+$NetBSD: patch-libiberty_vsnprintf.c,v 1.1 2016/09/06 13:57:02 maya Exp $
+
+use stdarg, not VA_* macros.
+cherry picked necessary parts from
+https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=206881
+
+fixes PR pkg/50042
+
+--- libiberty/vsnprintf.c.orig 2011-02-03 07:23:20.000000000 +0000
++++ libiberty/vsnprintf.c
+@@ -95,12 +95,10 @@ static int ATTRIBUTE_PRINTF_3
+ checkit (char *s, size_t n, const char *format, ...)
+ {
+ int result;
+- VA_OPEN (ap, format);
+- VA_FIXEDARG (ap, char *, s);
+- VA_FIXEDARG (ap, size_t, n);
+- VA_FIXEDARG (ap, const char *, format);
++ va_list ap;
++ va_start (ap, format);
+ result = vsnprintf (s, n, format, ap);
+- VA_CLOSE (ap);
++ va_end (ap);
+ return result;
+ }
+