summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2014-11-28 09:57:32 +0000
committerobache <obache@pkgsrc.org>2014-11-28 09:57:32 +0000
commitea69833418653b9baa057f3e1f5046d41f832aeb (patch)
treed4f0f68ccf664d6cd34a6f5e78dabf60ce4731a6
parent9e13f1f098586f58ef129fc260db9fbd34c24aba (diff)
downloadpkgsrc-ea69833418653b9baa057f3e1f5046d41f832aeb.tar.gz
Bump PKGREVISION.
* Fixes regressions, revive parts removed at "Fix build under OpenBSD/amd64 5.5" * Drop default behaviour changes and local features from OpenBSD ports, it break other platforms, at least, NetBSD-6.0/i386. * Remove needless patches after "Restore monolithic gcc48 and gcc48-libs".
-rw-r--r--lang/gcc48/Makefile5
-rw-r--r--lang/gcc48/distinfo39
-rw-r--r--lang/gcc48/patches/patch-boehm-gc_dyn__load.c14
-rw-r--r--lang/gcc48/patches/patch-gcc_Makefile.in30
-rw-r--r--lang/gcc48/patches/patch-gcc_c-family_c-format.c34
-rw-r--r--lang/gcc48/patches/patch-gcc_c-family_c.opt30
-rw-r--r--lang/gcc48/patches/patch-gcc_c_c-decl.c13
-rw-r--r--lang/gcc48/patches/patch-gcc_common.opt99
-rw-r--r--lang/gcc48/patches/patch-gcc_config.gcc94
-rw-r--r--lang/gcc48/patches/patch-gcc_config_i386_i386.c31
-rw-r--r--lang/gcc48/patches/patch-gcc_configure23
-rw-r--r--lang/gcc48/patches/patch-gcc_defaults.h15
-rw-r--r--lang/gcc48/patches/patch-gcc_flags.h16
-rw-r--r--lang/gcc48/patches/patch-gcc_fortran_f95-lang.c6
-rw-r--r--lang/gcc48/patches/patch-gcc_gcc.c13
-rw-r--r--lang/gcc48/patches/patch-gcc_go_go-lang.c6
-rw-r--r--lang/gcc48/patches/patch-gcc_java_lang.c6
-rw-r--r--lang/gcc48/patches/patch-gcc_lto_lto.c6
-rw-r--r--lang/gcc48/patches/patch-gcc_opts.c52
-rw-r--r--lang/gcc48/patches/patch-gcc_toplev.c13
-rw-r--r--lang/gcc48/patches/patch-libgcc_config.host10
-rw-r--r--lang/gcc48/patches/patch-libgcc_libgcc2.c6
-rw-r--r--lang/gcc48/patches/patch-libiberty_cp-demangle.c17
-rw-r--r--lang/gcc48/patches/patch-libjava_configure26
-rw-r--r--lang/gcc48/patches/patch-libjava_prims.cc9
25 files changed, 221 insertions, 392 deletions
diff --git a/lang/gcc48/Makefile b/lang/gcc48/Makefile
index 49c80931315..9a6c0bbe979 100644
--- a/lang/gcc48/Makefile
+++ b/lang/gcc48/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2014/10/31 14:22:20 ryoon Exp $
+# $NetBSD: Makefile,v 1.18 2014/11/28 09:57:32 obache Exp $
GCC_PKGNAME= gcc48
.include "version.mk"
@@ -8,7 +8,7 @@ PKGNAME= ${GCC_PKGNAME}-${GCC48_DIST_VERSION}
## When bumping the PKGREVISION of this package the PKGREVISION of
## lang/gcc48-libs needs to be bump to be at least 1 more than the
## PKGREVISION of this package!
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC48_DIST_VERSION}/}
EXTRACT_SUFX= .tar.bz2
@@ -32,6 +32,7 @@ CONFIGURE_DIRS= ${OBJDIR}
CONFIGURE_SCRIPT= ../${DISTNAME}/configure
GCC_SUBPREFIX= ${GCC_PKGNAME}
GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX}
+GCC_TARGET_MACHINE?= ${MACHINE_GNU_PLATFORM}
GNU_CONFIGURE_PREFIX= ${GCC_PREFIX}
INFO_FILES= yes
diff --git a/lang/gcc48/distinfo b/lang/gcc48/distinfo
index eaa3139b9d9..da35005a2c1 100644
--- a/lang/gcc48/distinfo
+++ b/lang/gcc48/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.18 2014/10/31 14:22:20 ryoon Exp $
+$NetBSD: distinfo,v 1.19 2014/11/28 09:57:32 obache Exp $
SHA1 (gcc-4.8.3.tar.bz2) = da0a2b9ec074f2bf624a34f3507f812ebb6e4dce
RMD160 (gcc-4.8.3.tar.bz2) = 2c7214ff607cbe822282c04d1d6f9fea765c82c5
Size (gcc-4.8.3.tar.bz2) = 86126808 bytes
SHA1 (patch-boehm-gc_configure) = 4ab0772cede9d4bef0c7eab412359f0700195135
-SHA1 (patch-boehm-gc_dyn__load.c) = 48fa440a1b5c05835550c12039739feb35b8927b
+SHA1 (patch-boehm-gc_dyn__load.c) = 2b0c076d5fe62097af3828886af10fc005e6293b
SHA1 (patch-boehm-gc_include_gc__config.h.in) = cbd88100e8fb371d3d42c531658ce467c823498e
SHA1 (patch-boehm-gc_include_gc__config__macros.h) = 0edc157309687c793f5ebb6acaf747f209848a6b
SHA1 (patch-boehm-gc_include_gc__pthread__redirects.h) = 5df4e69665bc69c4a53f80361ed84bc7b7ef7b6f
@@ -19,13 +19,10 @@ SHA1 (patch-fixincludes_inclhack.def) = 577021b838b64ff987e28b0017afb3b05e28458f
SHA1 (patch-gcc-config-vax-constraints.md) = e6cea7a5334b5b124ca3e8b62eba45423e788e55
SHA1 (patch-gcc-config-vax-vax.c) = 02e389ec418a0fee1431ecd61d65b7f8d7629785
SHA1 (patch-gcc-config-vax-vax.md) = e06696be85641cbe9131ecc10bb28c45a465916d
-SHA1 (patch-gcc_Makefile.in) = 3706889f55dac4f2847301340d95fc11645108eb
+SHA1 (patch-gcc_Makefile.in) = bcfadba42212126f80a3558eab7e5a44cabfb49d
SHA1 (patch-gcc_builtins.c) = 67c66568237b68b22ba99bc76336e001e1634925
-SHA1 (patch-gcc_c-family_c-format.c) = b4893ae251b5b936026bd7cc28b9a8ec29af42cb
-SHA1 (patch-gcc_c-family_c.opt) = 175b3029cac6b7c04a54dcc52c1e832f83b8beff
-SHA1 (patch-gcc_c_c-decl.c) = a6f6d483390beae6d6d983963086e4287c2258c4
-SHA1 (patch-gcc_common.opt) = 31d062306ef6bbeebd85ee6e06c563a006a64aca
-SHA1 (patch-gcc_config.gcc) = 300ccd9dae0e185d43f705f4e9252244ac84117a
+SHA1 (patch-gcc_c-family_c-format.c) = 485ebb16ff3c0c785678326ff4d622c865849850
+SHA1 (patch-gcc_config.gcc) = 1a697bcc295c40bc1bbed6295f53854d56df9f93
SHA1 (patch-gcc_config.host) = 1b1e11cd199eb93f49443d51c0063b09b7327858
SHA1 (patch-gcc_config_dragonfly-stdint.h) = 740dc819b446d5f1476506322c4b280ffdb5a6c0
SHA1 (patch-gcc_config_dragonfly.h) = 82f549cdc7543b4bf413a44d481ef42b10f59c82
@@ -33,7 +30,6 @@ SHA1 (patch-gcc_config_dragonfly.opt) = 92f615c73c2e94664bae5b5935ab8b09bca15f73
SHA1 (patch-gcc_config_exec-stack.h) = 8135806e88c1b136038bb240958a4435b4e0bbe3
SHA1 (patch-gcc_config_host-netbsd.c) = 8f13b09dd7006d456cd1c66e895be504e9537880
SHA1 (patch-gcc_config_i386_dragonfly.h) = 0d3f785434c02beb9c4561fe59842a970e8f7896
-SHA1 (patch-gcc_config_i386_i386.c) = e787cda58beb2908f5656ccab0fde7f2d6d48037
SHA1 (patch-gcc_config_i386_openbsd.h) = df5b85b5957392138f99085bd8ebeb923e37e9e7
SHA1 (patch-gcc_config_i386_openbsdelf.h) = 74498a1bd7c339c90b847740d3c474ad3ca4a956
SHA1 (patch-gcc_config_netbsd-stdint.h) = 025fc883101a187e84ed4c0772406720d645d550
@@ -42,43 +38,38 @@ SHA1 (patch-gcc_config_openbsd.h) = 0090d48281c4973a18e8a70b2be9d2e999cca0a6
SHA1 (patch-gcc_config_openbsd.opt) = 08b01bc4d7e171c3ee2ce5638a5859cff50c8ff8
SHA1 (patch-gcc_config_sol2.h) = de6455ee88f281737501287759b7a83b8db05398
SHA1 (patch-gcc_config_x-netbsd) = 6dc3d78e26df62054ea29f98ca51592858e671e3
-SHA1 (patch-gcc_configure) = 868f4a55d5f6066852e054a334203213a06d49ca
-SHA1 (patch-gcc_defaults.h) = e0e7d489e06fc642e669c5a834838e704a262d75
-SHA1 (patch-gcc_flags.h) = 7301be3bf7bafd52cb99e7d9c722fc0715a3dde3
-SHA1 (patch-gcc_fortran_f95-lang.c) = 98eb68f444544ac55dea5635458bc20c73a50a49
-SHA1 (patch-gcc_gcc.c) = 4524424a24ddf57dfddbe87bf8adf6785198130f
+SHA1 (patch-gcc_configure) = dcb136061bf36428d75b834ca53f0840a67ef186
+SHA1 (patch-gcc_fortran_f95-lang.c) = 8dc0a1728fd0521caf71a4f5c2eb938340f20efa
SHA1 (patch-gcc_ggc-common.c) = fa577bc25260d7e6304f166686ba51c0b677d7f6
SHA1 (patch-gcc_ginclude_stddef.h) = 220ec23aecffca81337ae4c06afc18051da89b9a
-SHA1 (patch-gcc_go_go-lang.c) = 2e546c645b82a0ace4635aaaba692f2174bddaca
-SHA1 (patch-gcc_java_lang.c) = 81a38b32519b5a6509635491cda9aea7b9740541
-SHA1 (patch-gcc_lto_lto.c) = 6cde32d8f318dbb55fd4774eab239989624ddff5
-SHA1 (patch-gcc_opts.c) = da9be731d227e4bbc11ba21c1f45ad38ec30d7f0
+SHA1 (patch-gcc_go_go-lang.c) = dbef7b86ccbf657356412a2420d98725d53eb356
+SHA1 (patch-gcc_java_lang.c) = 781c8f70241df0e5cfb1c69beb755bee14a6c54e
+SHA1 (patch-gcc_lto_lto.c) = cc7fdf396c238785141e0ffc8ca8f62a91640f58
SHA1 (patch-gcc_system.h) = 4c959a6b1c4d524cbdf44cfb80f0e5758ec20783
SHA1 (patch-gcc_testsuite_g++.dg_eh_unwind-direct.C) = fd85ccee102e9618a8010d2dcbb2d9916b28f1cc
SHA1 (patch-gcc_testsuite_gcc.dg_format_format.h) = 5bb7af9f355dcd80bfaf4a206d86e4badd4d4b4d
-SHA1 (patch-gcc_toplev.c) = 4f08e99b5cf6960e33cb91f171c9065555ed844a
SHA1 (patch-include_libiberty.h) = ad2c64e9a14405c89b02ff68811b1c889405d0a1
SHA1 (patch-libffi_configure) = b7cc1c187b2e0c1dea42509612b4d9ddf9d27daf
SHA1 (patch-libffi_include_Makefile.in) = 7c3208b1b05c33d9be48683ff5146adbe2bf92a1
SHA1 (patch-libgcc_Makefile.in) = 547d0a22c5d14e41ebeb6197bc3ed1d24ad63475
-SHA1 (patch-libgcc_config.host) = 0eead41f6a01cbe2b9c6d0f64ee4441841cef521
+SHA1 (patch-libgcc_config.host) = 3e22c191f08021fff085dcf9f3186734e6c010c6
SHA1 (patch-libgcc_config_i386_dragonfly-unwind.h) = 9d77252dd982495e90f95b82706bab29e581df9f
SHA1 (patch-libgcc_config_t-slibgcc-sld) = 1b3ae1dc03eaad16a51311049ffc9e42c44dfcbc
SHA1 (patch-libgcc_crtstuff.c) = 88500ea895cd683608f8f2b7177149f11947e3b4
-SHA1 (patch-libgcc_libgcc2.c) = c3a1f3a6db9a4591a0858f84b963247634b0dac3
+SHA1 (patch-libgcc_libgcc2.c) = 6dc6284c59ffaf457bec8ae9734e6087008107a5
SHA1 (patch-libgcc_unwind-dw2-fde-dip.c) = 770f04f3cbeb0d794fa297b328f06f6e687419c0
SHA1 (patch-libgfortran_configure) = e466dd7637d7ba61b23c5f24e4497da46e56d60a
SHA1 (patch-libgo_Makefile.in) = 612987541f745c7be6835ce7fb7119884db294c3
SHA1 (patch-libgo_config_libtool.m4) = d62f00eae3bbd89a878eaf4e0b995ac482a39992
SHA1 (patch-libgo_config_ltmain.sh) = 703a27554e479cc2e48410a6bb0e5f5b4be2c150
SHA1 (patch-libgomp_configure) = 8527167e1f08ac7e64277ac0d22532dd59394b64
-SHA1 (patch-libiberty_cp-demangle.c) = 2444346cd054f787dcc9704ee9be6acca9b835a3
+SHA1 (patch-libiberty_cp-demangle.c) = 4f9a29efadd5dedd1de796c58389f9ed8b62ab74
SHA1 (patch-libjava_boehm.cc) = b18bc9d410a62543583c77e011f50b86f41ca18a
-SHA1 (patch-libjava_configure) = 22bf1c472d4b5a823df85307371e50d3f7d89184
+SHA1 (patch-libjava_configure) = ddf1388e14c3ff83efdd7ba4a40609b275f7d922
SHA1 (patch-libjava_configure.host) = 194b88bfe2c2ed24fd7bc5b6b84c70d7329bf1b2
SHA1 (patch-libjava_contrib_rebuild-gcj-db.in) = bb01d738fc7db05046ae37e8ade32574de1d8297
SHA1 (patch-libjava_libltdl_configure) = aed53e3063685d16a9dbd4c494e40be2a2ecede4
-SHA1 (patch-libjava_prims.cc) = ce9160f122885a72850df43134ebe4587b59637d
+SHA1 (patch-libjava_prims.cc) = b6007bfa5700046ca0e31de44539c5a8ccaede68
SHA1 (patch-libmudflap_mf-runtime.h) = efb0687749fbd8d71e75542a36392d51805c2cc8
SHA1 (patch-libsanitizer_configure.tgt) = a56ba5e2dc6bc413e80358353af16e6910b0e106
SHA1 (patch-libstdc++-v3_config_locale_dragonfly_c__locale.cc) = 5c0ccc6b90e3508b03ed399e8e9e300a6aa9cbb7
diff --git a/lang/gcc48/patches/patch-boehm-gc_dyn__load.c b/lang/gcc48/patches/patch-boehm-gc_dyn__load.c
index 373a2121a36..63beb02da5b 100644
--- a/lang/gcc48/patches/patch-boehm-gc_dyn__load.c
+++ b/lang/gcc48/patches/patch-boehm-gc_dyn__load.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-boehm-gc_dyn__load.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
+$NetBSD: patch-boehm-gc_dyn__load.c,v 1.2 2014/11/28 09:57:32 obache Exp $
--- boehm-gc/dyn_load.c.orig 2012-11-04 22:56:02.000000000 +0000
+++ boehm-gc/dyn_load.c
@@ -10,18 +10,20 @@ $NetBSD: patch-boehm-gc_dyn__load.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
!(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
!defined(DARWIN)
--> We only know how to find data segments of dynamic libraries for the
-@@ -100,9 +101,9 @@
+@@ -100,9 +101,12 @@
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
+ (defined(OPENBSD) && defined(__ELF__)) || \
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
# include <stddef.h>
--# include <elf.h>
++#ifndef OPENBSD
+ # include <elf.h>
++#endif
# include <link.h>
#endif
-@@ -116,7 +117,7 @@
+@@ -116,7 +120,7 @@
# define ElfW(type) Elf64_##type
# endif
# else
@@ -30,7 +32,7 @@ $NetBSD: patch-boehm-gc_dyn__load.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
# if ELFSIZE == 32
# define ElfW(type) Elf32_##type
# else
-@@ -365,6 +366,7 @@ void GC_register_dynamic_libraries()
+@@ -365,6 +369,7 @@ void GC_register_dynamic_libraries()
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
@@ -38,7 +40,7 @@ $NetBSD: patch-boehm-gc_dyn__load.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
-@@ -476,6 +478,10 @@ GC_bool GC_register_main_static_data()
+@@ -476,6 +481,10 @@ GC_bool GC_register_main_static_data()
#define HAVE_DL_ITERATE_PHDR
#endif
diff --git a/lang/gcc48/patches/patch-gcc_Makefile.in b/lang/gcc48/patches/patch-gcc_Makefile.in
index a22e9c60d7d..06c9e22d5aa 100644
--- a/lang/gcc48/patches/patch-gcc_Makefile.in
+++ b/lang/gcc48/patches/patch-gcc_Makefile.in
@@ -1,41 +1,15 @@
-$NetBSD: patch-gcc_Makefile.in,v 1.3 2014/04/22 20:46:41 ryoon Exp $
+$NetBSD: patch-gcc_Makefile.in,v 1.4 2014/11/28 09:57:32 obache Exp $
Add gcc libdir to a programs rpath so that _this gcc's_ support libraries
are found.
--- gcc/Makefile.in.orig 2013-07-08 09:14:34.000000000 +0000
+++ gcc/Makefile.in
-@@ -1733,8 +1733,11 @@ rest.encap: lang.rest.encap
- # This is what is made with the host's compiler
- # whether making a cross compiler or not.
- native: config.status auto-host.h build-@POSUB@ $(LANGUAGES) \
-- $(EXTRA_PROGRAMS) $(COLLECT2) lto-wrapper$(exeext) \
-- gcc-ar$(exeext) gcc-nm$(exeext) gcc-ranlib$(exeext)
-+ $(EXTRA_PROGRAMS) $(COLLECT2)
-+
-+ifeq ($(enable_lto),yes)
-+native: lto-wrapper$(exeext) gcc-ar$(exeext) gcc-nm$(exeext) gcc-ranlib$(exeext)
-+endif
-
- ifeq ($(enable_plugin),yes)
- native: gengtype$(exeext)
@@ -2027,6 +2030,7 @@ prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_
# Language-independent files.
DRIVER_DEFINES = \
-+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(prefix)//lib/%M $(LINKER_RPATH_FLAG)$(libdir)/%M \"" \
++ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(prefix)/@GCC_TARGET_MACHINE@/lib/%M $(LINKER_RPATH_FLAG)$(libdir)/%M \"" \
-DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \
-DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
-DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \
-@@ -4556,7 +4560,10 @@ maintainer-clean:
- # broken is small.
- install: install-common $(INSTALL_HEADERS) \
- install-cpp install-man install-info install-@POSUB@ \
-- install-driver install-lto-wrapper install-gcc-ar
-+ install-driver
-+ifeq ($(enable_lto),yes)
-+install: install-lto-wrapper install-gcc-ar
-+endif
-
- ifeq ($(enable_plugin),yes)
- install: install-plugin
diff --git a/lang/gcc48/patches/patch-gcc_c-family_c-format.c b/lang/gcc48/patches/patch-gcc_c-family_c-format.c
index a5310b910ca..9b4b74248c3 100644
--- a/lang/gcc48/patches/patch-gcc_c-family_c-format.c
+++ b/lang/gcc48/patches/patch-gcc_c-family_c-format.c
@@ -1,27 +1,22 @@
-$NetBSD: patch-gcc_c-family_c-format.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
+$NetBSD: patch-gcc_c-family_c-format.c,v 1.2 2014/11/28 09:57:32 obache Exp $
--- gcc/c-family/c-format.c.orig 2013-01-10 20:38:27.000000000 +0000
+++ gcc/c-family/c-format.c
-@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3.
+@@ -38,6 +38,9 @@ along with GCC; see the file COPYING3.
format_type_error. Target-specific format types do not have
matching enum values. */
enum format_type { printf_format_type, asm_fprintf_format_type,
++#ifdef __OpenBSD__
+ kprintf_format_type, syslog_format_type,
++#endif
gcc_diag_format_type, gcc_tdiag_format_type,
gcc_cdiag_format_type,
gcc_cxxdiag_format_type, gcc_gfc_format_type,
-@@ -51,6 +52,7 @@ typedef struct function_format_info
- unsigned HOST_WIDE_INT first_arg_num; /* number of first arg (zero for varargs) */
- } function_format_info;
-
-+
- static bool decode_format_attr (tree, function_format_info *, int);
- static int decode_format_type (const char *);
-
-@@ -417,6 +419,15 @@ static const format_length_info gcc_diag
+@@ -417,6 +420,17 @@ static const format_length_info gcc_diag
{ NO_FMT, NO_FMT, 0 }
};
++#ifdef __OpenBSD__
+static const format_length_info kprintf_length_specs[] =
+{
+ { "h", FMT_LEN_h, STD_C89, NO_FMT, 0 },
@@ -30,22 +25,16 @@ $NetBSD: patch-gcc_c-family_c-format.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
+ { "L", FMT_LEN_L, STD_C89, NO_FMT, 0 },
+ { NO_FMT, NO_FMT, 0 }
+};
++#endif
+
/* The custom diagnostics all accept the same length specifiers. */
#define gcc_tdiag_length_specs gcc_diag_length_specs
#define gcc_cdiag_length_specs gcc_diag_length_specs
-@@ -597,7 +608,6 @@ static const format_flag_pair strfmon_fl
- { 0, 0, 0, 0 }
- };
-
--
- static const format_char_info print_char_table[] =
- {
- /* C89 conversion specifiers. */
-@@ -641,6 +651,44 @@ static const format_char_info asm_fprint
+@@ -641,6 +655,46 @@ static const format_char_info asm_fprint
{ NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
};
++#ifdef __OpenBSD__
+static const format_char_info kprint_char_table[] =
+{
+ /* C89 conversion specifiers. */
@@ -83,14 +72,16 @@ $NetBSD: patch-gcc_c-family_c-format.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
+ { "m", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "", NULL },
+ { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
+};
++#endif
+
static const format_char_info gcc_diag_char_table[] =
{
/* C89 conversion specifiers. */
-@@ -817,6 +865,18 @@ static const format_kind_info format_typ
+@@ -817,6 +871,20 @@ static const format_kind_info format_typ
'w', 0, 'p', 0, 'L', 0,
NULL, NULL
},
++#ifdef __OpenBSD__
+ { "kprintf", kprintf_length_specs, kprint_char_table, " +#0-'I", NULL,
+ printf_flag_specs, printf_flag_pairs,
+ FMT_FLAG_ARG_CONVERT|FMT_FLAG_DOLLAR_MULTIPLE|FMT_FLAG_USE_DOLLAR|FMT_FLAG_EMPTY_PREC_OK,
@@ -103,6 +94,7 @@ $NetBSD: patch-gcc_c-family_c-format.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
+ 'w', 0, 'p', 0, 'L', 0,
+ &integer_type_node, &integer_type_node
+ },
++#endif
{ "gcc_diag", gcc_diag_length_specs, gcc_diag_char_table, "q+#", NULL,
gcc_diag_flag_specs, gcc_diag_flag_pairs,
FMT_FLAG_ARG_CONVERT,
diff --git a/lang/gcc48/patches/patch-gcc_c-family_c.opt b/lang/gcc48/patches/patch-gcc_c-family_c.opt
deleted file mode 100644
index 89efbe1fdfa..00000000000
--- a/lang/gcc48/patches/patch-gcc_c-family_c.opt
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD: patch-gcc_c-family_c.opt,v 1.1 2014/05/31 13:06:25 ryoon Exp $
-
---- gcc/c-family/c.opt.orig 2014-04-07 06:40:18.000000000 +0000
-+++ gcc/c-family/c.opt
-@@ -618,13 +618,9 @@ C ObjC C++ ObjC++ Var(warn_pointer_arith
- Warn about function pointer arithmetic
-
- Wpointer-sign
--C ObjC Var(warn_pointer_sign) Warning LangEnabledBy(C ObjC,Wall)
-+C ObjC Var(warn_pointer_sign) Warning LangEnabledBy(C ObjC,Wpedantic)
- Warn when a pointer differs in signedness in an assignment
-
--Wpointer-sign
--C ObjC LangEnabledBy(C ObjC,Wpedantic)
--;
--
- Wpointer-to-int-cast
- C ObjC Var(warn_pointer_to_int_cast) Init(1) Warning
- Warn when a pointer is cast to an integer of a different size
-@@ -1172,6 +1168,10 @@ fthreadsafe-statics
- C++ ObjC++ Optimization Var(flag_threadsafe_statics) Init(1)
- -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics
-
-+ftrampolines
-+Common Var(flag_trampolines)
-+Allows trampolines
-+
- funsigned-bitfields
- C ObjC C++ ObjC++ Var(flag_signed_bitfields, 0)
- When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
diff --git a/lang/gcc48/patches/patch-gcc_c_c-decl.c b/lang/gcc48/patches/patch-gcc_c_c-decl.c
deleted file mode 100644
index 47bd4f187b7..00000000000
--- a/lang/gcc48/patches/patch-gcc_c_c-decl.c
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-gcc_c_c-decl.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
-
---- gcc/c/c-decl.c.orig 2014-04-10 07:54:08.000000000 +0000
-+++ gcc/c/c-decl.c
-@@ -4859,6 +4859,8 @@ warn_variable_length_array (tree name, t
- "variable length array is used");
- }
- }
-+ if (warn_variable_decl)
-+ warning (OPT_Wvariable_decl, "variable-sized array %qE", name);
- }
-
- /* Given declspecs and a declarator,
diff --git a/lang/gcc48/patches/patch-gcc_common.opt b/lang/gcc48/patches/patch-gcc_common.opt
deleted file mode 100644
index 862543b74a1..00000000000
--- a/lang/gcc48/patches/patch-gcc_common.opt
+++ /dev/null
@@ -1,99 +0,0 @@
-$NetBSD: patch-gcc_common.opt,v 1.1 2014/05/31 13:06:25 ryoon Exp $
-
---- gcc/common.opt.orig 2013-03-14 09:13:36.000000000 +0000
-+++ gcc/common.opt
-@@ -572,6 +572,10 @@ Wlarger-than=
- Common RejectNegative Joined UInteger Warning
- -Wlarger-than=<number> Warn if an object is larger than <number> bytes
-
-+Wstack-larger-than-
-+Common RejectNegative Joined UInteger
-+-Wstack-larger-than-<number> Warn if a function is using more than <number> bytes of stack space for its local variables.
-+
- Wunsafe-loop-optimizations
- Common Var(warn_unsafe_loop_optimizations) Warning
- Warn if the loop cannot be optimized due to nontrivial assumptions.
-@@ -636,7 +640,7 @@ Common Var(warn_suggest_attribute_noretu
- Warn about functions which might be candidates for __attribute__((noreturn))
-
- Wsystem-headers
--Common Var(warn_system_headers) Warning
-+Common Var(warn_system_headers) Init(1) Warning
- Do not suppress warnings from system headers
-
- Wtrampolines
-@@ -691,6 +695,10 @@ Wunused-variable
- Common Var(warn_unused_variable) Warning EnabledBy(Wunused)
- Warn when a variable is unused
-
-+Wvariable-decl
-+Common Var(warn_variable_decl)
-+Warn about variable-sized declarations
-+
- Wcoverage-mismatch
- Common Var(warn_coverage_mismatch) Init(1) Warning
- Warn in case profiles in -fprofile-use do not match
-@@ -798,7 +806,7 @@ fabi-version=
- Common Joined RejectNegative UInteger Var(flag_abi_version) Init(2)
-
- faggressive-loop-optimizations
--Common Report Var(flag_aggressive_loop_optimizations) Optimization Init(1)
-+Common Report Var(flag_aggressive_loop_optimizations) Optimization
- Aggressively optimize loops using language constraints
-
- falign-functions
-@@ -995,7 +1003,7 @@ Common Report Var(flag_delete_dead_excep
- Delete dead instructions that may throw exceptions
-
- fdelete-null-pointer-checks
--Common Report Var(flag_delete_null_pointer_checks) Init(1) Optimization
-+Common Report Var(flag_delete_null_pointer_checks)
- Delete useless null pointer checks
-
- fdevirtualize
-@@ -1247,7 +1255,7 @@ Enable guessing of branch probabilities
- ; On SVR4 targets, it also controls whether or not to emit a
- ; string identifying the compiler.
- fident
--Common Report Var(flag_no_ident,0)
-+Common Report Var(flag_no_ident,0) Init(1)
- Process #ident directives
-
- fif-conversion
-@@ -1599,7 +1607,7 @@ Common Report Var(flag_pic,2) Negative(f
- Generate position-independent code if possible (large mode)
-
- fPIE
--Common Report Var(flag_pie,2) Negative(fpic)
-+Common Report Var(flag_pie,2) Negative(fpic) Init(PIE_DEFAULT)
- Generate position-independent code for executables if possible (large mode)
-
- fpic
-@@ -1902,7 +1910,7 @@ Common RejectNegative Joined Var(common_
- -fstack-limit-symbol=<name> Trap if the stack goes past symbol <name>
-
- fstack-protector
--Common Report Var(flag_stack_protect, 1)
-+Common Report Var(flag_stack_protect, 1) Init(-1)
- Use propolice as a stack protection method
-
- fstack-protector-all
-@@ -2307,7 +2315,7 @@ Common JoinedOrMissing Negative(gdwarf-)
- Generate debug information in COFF format
-
- gdwarf-
--Common Joined UInteger Var(dwarf_version) Init(4) Negative(gstabs)
-+Common Joined UInteger Var(dwarf_version) Init(2) Negative(gstabs)
- Generate debug information in DWARF v2 (or later) format
-
- ggdb
-@@ -2393,6 +2401,9 @@ Driver
- nodefaultlibs
- Driver
-
-+nopie
-+Driver
-+
- nostartfiles
- Driver
-
diff --git a/lang/gcc48/patches/patch-gcc_config.gcc b/lang/gcc48/patches/patch-gcc_config.gcc
index fb40d27b482..90f611d2235 100644
--- a/lang/gcc48/patches/patch-gcc_config.gcc
+++ b/lang/gcc48/patches/patch-gcc_config.gcc
@@ -1,8 +1,43 @@
-$NetBSD: patch-gcc_config.gcc,v 1.2 2014/05/31 13:06:25 ryoon Exp $
+$NetBSD: patch-gcc_config.gcc,v 1.3 2014/11/28 09:57:32 obache Exp $
--- gcc/config.gcc.orig 2014-05-06 15:29:04.000000000 +0000
+++ gcc/config.gcc
-@@ -712,6 +712,14 @@ case ${target} in
+@@ -625,6 +625,26 @@ case ${target} in
+ # need_64bit_hwint=yes # system compiler has this for all arch!
+ use_gcc_stdint=wrap
+ ;;
++*-*-dragonfly*)
++ gas=yes
++ gnu_ld=yes
++ tmake_file="t-slibgcc"
++ case ${enable_threads} in
++ "" | yes | posix)
++ thread_file='posix'
++ ;;
++ no | gnat | single)
++ # Let these no-posix thread selections fail through if required
++ ;;
++ *)
++ echo 'Unknown thread configuration for DragonFly BSD'
++ exit 1
++ ;;
++ esac
++ extra_options="$extra_options rpath.opt dragonfly.opt"
++ default_use_cxa_atexit=yes
++ use_gcc_stdint=wrap
++ ;;
+ *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
+ extra_options="$extra_options gnu-user.opt"
+ gas=yes
+@@ -684,6 +704,7 @@ case ${target} in
+ target_has_targetcm=yes
+ ;;
+ *-*-netbsd*)
++ use_gcc_stdint=wrap
+ tmake_file="t-slibgcc"
+ gas=yes
+ gnu_ld=yes
+@@ -712,6 +733,14 @@ case ${target} in
default_use_cxa_atexit=yes
;;
esac
@@ -17,7 +52,7 @@ $NetBSD: patch-gcc_config.gcc,v 1.2 2014/05/31 13:06:25 ryoon Exp $
;;
*-*-openbsd*)
tmake_file="t-openbsd"
-@@ -851,7 +859,7 @@ alpha*-*-netbsd*)
+@@ -851,7 +880,7 @@ alpha*-*-netbsd*)
alpha/elf.opt"
;;
alpha*-*-openbsd*)
@@ -26,7 +61,7 @@ $NetBSD: patch-gcc_config.gcc,v 1.2 2014/05/31 13:06:25 ryoon Exp $
tm_file="elfos.h alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
extra_options="${extra_options} openbsd.opt alpha/elf.opt"
# default x-alpha is only appropriate for dec-osf.
-@@ -1070,6 +1078,7 @@ hppa*-*-linux*)
+@@ -1070,6 +1099,7 @@ hppa*-*-linux*)
;;
hppa*-*-openbsd*)
target_cpu_default="MASK_PA_11"
@@ -34,7 +69,39 @@ $NetBSD: patch-gcc_config.gcc,v 1.2 2014/05/31 13:06:25 ryoon Exp $
tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h \
pa/pa-openbsd.h pa/pa32-regs.h pa/pa32-openbsd.h"
tmake_file="${tmake_file} pa/t-openbsd"
-@@ -1245,6 +1254,7 @@ i[34567]86-*-openbsd2.*|i[34567]86-*open
+@@ -1222,6 +1252,14 @@ x86_64-*-rdos*)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rdos.h i386/rdos64.h"
+ tmake_file="i386/t-i386elf t-svr4"
+ ;;
++i[34567]86-*-dragonfly*)
++ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h dragonfly.h dragonfly-stdint.h i386/dragonfly.h"
++ tmake_file="${tmake_file} i386/t-ctstuff"
++ ;;
++x86_64-*-dragonfly*)
++ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h dragonfly.h dragonfly-stdint.h i386/x86-64.h i386/dragonfly.h"
++ tmake_file="${tmake_file} i386/t-ctstuff"
++ ;;
+ i[34567]86-*-freebsd*)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
+ ;;
+@@ -1229,12 +1267,14 @@ x86_64-*-freebsd*)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
+ ;;
+ i[34567]86-*-netbsdelf*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h netbsd-stdint.h"
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
++ tmake_file="${tmake_file} i386/t-crtstuff"
+ ;;
+ x86_64-*-netbsd*)
+- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h"
++ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h netbsd-stdint.h"
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
++ tmake_file="${tmake_file} i386/t-crtstuff"
+ ;;
+ i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
+ tm_file="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h"
+@@ -1245,6 +1285,7 @@ i[34567]86-*-openbsd2.*|i[34567]86-*open
use_collect2=yes
;;
i[34567]86-*-openbsd*)
@@ -42,7 +109,7 @@ $NetBSD: patch-gcc_config.gcc,v 1.2 2014/05/31 13:06:25 ryoon Exp $
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
extra_options="${extra_options} openbsd.opt"
-@@ -1252,6 +1262,7 @@ i[34567]86-*-openbsd*)
+@@ -1252,6 +1293,7 @@ i[34567]86-*-openbsd*)
gnu_ld=yes
;;
x86_64-*-openbsd*)
@@ -50,7 +117,7 @@ $NetBSD: patch-gcc_config.gcc,v 1.2 2014/05/31 13:06:25 ryoon Exp $
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/x86-64.h i386/openbsdelf.h"
extra_options="${extra_options} openbsd.opt"
-@@ -1981,11 +1992,12 @@ picochip-*)
+@@ -1981,11 +2023,12 @@ picochip-*)
use_gcc_stdint=wrap
tmake_file="picochip/t-picochip t-pnt16-warn"
;;
@@ -68,7 +135,7 @@ $NetBSD: patch-gcc_config.gcc,v 1.2 2014/05/31 13:06:25 ryoon Exp $
powerpc-*-darwin*)
extra_options="${extra_options} rs6000/darwin.opt"
case ${target} in
-@@ -2545,6 +2557,7 @@ sparc64-*-netbsd*)
+@@ -2545,6 +2588,7 @@ sparc64-*-netbsd*)
tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64"
;;
sparc64-*-openbsd*)
@@ -76,7 +143,7 @@ $NetBSD: patch-gcc_config.gcc,v 1.2 2014/05/31 13:06:25 ryoon Exp $
tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
extra_options="${extra_options} openbsd.opt"
-@@ -2735,6 +2748,12 @@ case ${target} in
+@@ -2735,6 +2779,12 @@ case ${target} in
arch_without_sse2=yes
arch_without_64bit=yes
;;
@@ -89,3 +156,12 @@ $NetBSD: patch-gcc_config.gcc,v 1.2 2014/05/31 13:06:25 ryoon Exp $
i386-*-*)
arch=i386
cpu=i386
+@@ -3750,6 +3800,8 @@ case ${target} in
+ ;;
+ i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
+ ;;
++ i[34567]86-*-dragonfly* | x86_64-*-dragonfly*)
++ ;;
+ i[34567]86-*-freebsd* | x86_64-*-freebsd*)
+ ;;
+ ia64*-*-linux*)
diff --git a/lang/gcc48/patches/patch-gcc_config_i386_i386.c b/lang/gcc48/patches/patch-gcc_config_i386_i386.c
deleted file mode 100644
index ab13d0eb2b8..00000000000
--- a/lang/gcc48/patches/patch-gcc_config_i386_i386.c
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-gcc_config_i386_i386.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
-
---- gcc/config/i386/i386.c.orig 2014-05-08 19:32:34.000000000 +0000
-+++ gcc/config/i386/i386.c
-@@ -2265,6 +2265,8 @@ struct ix86_frame
- HOST_WIDE_INT reg_save_offset;
- HOST_WIDE_INT sse_reg_save_offset;
-
-+ HOST_WIDE_INT local_size;
-+
- /* When save_regs_using_mov is set, emit prologue using
- move instead of push instructions. */
- bool save_regs_using_mov;
-@@ -8941,6 +8943,7 @@ ix86_compute_frame_layout (struct ix86_f
- HOST_WIDE_INT size = get_frame_size ();
- HOST_WIDE_INT to_allocate;
-
-+ frame->local_size = size;
- frame->nregs = ix86_nsaved_regs ();
- frame->nsseregs = ix86_nsaved_sseregs ();
-
-@@ -10293,6 +10296,9 @@ ix86_expand_prologue (void)
- m->fs.realigned = true;
- }
-
-+ if (warn_stack_larger_than && frame.local_size > stack_larger_than_size)
-+ warning (OPT_Wstack_larger_than_, "stack usage is %ld bytes", frame.local_size);
-+
- int_registers_saved = (frame.nregs == 0);
- sse_registers_saved = (frame.nsseregs == 0);
-
diff --git a/lang/gcc48/patches/patch-gcc_configure b/lang/gcc48/patches/patch-gcc_configure
index 08709e81305..35e2b0395ef 100644
--- a/lang/gcc48/patches/patch-gcc_configure
+++ b/lang/gcc48/patches/patch-gcc_configure
@@ -1,4 +1,4 @@
-$NetBSD: patch-gcc_configure,v 1.2 2014/05/31 13:06:25 ryoon Exp $
+$NetBSD: patch-gcc_configure,v 1.3 2014/11/28 09:57:32 obache Exp $
Add dl_iterate_phdr detection for FreeBSD and DragonFly.
Detection for NetBSD and OpenBSD is added but commented out in case this
@@ -14,3 +14,24 @@ error handling mechanism is activated for these platforms later.
*) gcc_cv_libc_provides_ssp=no ;;
esac
fi
+@@ -26936,6 +26937,20 @@ case "$target" in
+ gcc_cv_target_dl_iterate_phdr=no
+ fi
+ ;;
++ *-*-dragonfly* | *-*-freebsd*)
++ if grep dl_iterate_phdr $target_header_dir/sys/link_elf.h > /dev/null 2>&1; then
++ gcc_cv_target_dl_iterate_phdr=yes
++ else
++ gcc_cv_target_dl_iterate_phdr=no
++ fi
++ ;;
++# *-*-netbsd* | *-*-openbsd*)
++# if grep dl_iterate_phdr $target_header_dir/link_elf.h > /dev/null 2>&1; then
++# gcc_cv_target_dl_iterate_phdr=yes
++# else
++# gcc_cv_target_dl_iterate_phdr=no
++# fi
++# ;;
+ esac
+
+ if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
diff --git a/lang/gcc48/patches/patch-gcc_defaults.h b/lang/gcc48/patches/patch-gcc_defaults.h
deleted file mode 100644
index 3e70fdc3234..00000000000
--- a/lang/gcc48/patches/patch-gcc_defaults.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-gcc_defaults.h,v 1.1 2014/05/31 13:06:25 ryoon Exp $
-
---- gcc/defaults.h.orig 2013-01-10 20:38:27.000000000 +0000
-+++ gcc/defaults.h
-@@ -1404,6 +1404,10 @@ see the files COPYING3 and COPYING.RUNTI
- #define SWITCHABLE_TARGET 0
- #endif
-
-+#ifndef PIE_DEFAULT
-+#define PIE_DEFAULT 0
-+#endif
-+
- #endif /* GCC_INSN_FLAGS_H */
-
- #endif /* ! GCC_DEFAULTS_H */
diff --git a/lang/gcc48/patches/patch-gcc_flags.h b/lang/gcc48/patches/patch-gcc_flags.h
deleted file mode 100644
index 0c61ea430de..00000000000
--- a/lang/gcc48/patches/patch-gcc_flags.h
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-gcc_flags.h,v 1.1 2014/05/31 13:06:25 ryoon Exp $
-
---- gcc/flags.h.orig 2013-01-10 20:38:27.000000000 +0000
-+++ gcc/flags.h
-@@ -25,6 +25,11 @@ along with GCC; see the file COPYING3.
-
- #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS)
-
-+/* Nonzero means warn about any function whose stack usage is larger than N
-+ bytes. The value N is `stack_larger_than_size'. */
-+extern int warn_stack_larger_than;
-+extern HOST_WIDE_INT stack_larger_than_size;
-+
- /* Names of debug_info_type, for error messages. */
- extern const char *const debug_type_names[];
-
diff --git a/lang/gcc48/patches/patch-gcc_fortran_f95-lang.c b/lang/gcc48/patches/patch-gcc_fortran_f95-lang.c
index a5a77102ca8..6e93cfe4b52 100644
--- a/lang/gcc48/patches/patch-gcc_fortran_f95-lang.c
+++ b/lang/gcc48/patches/patch-gcc_fortran_f95-lang.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-gcc_fortran_f95-lang.c,v 1.3 2014/05/31 13:06:25 ryoon Exp $
+$NetBSD: patch-gcc_fortran_f95-lang.c,v 1.4 2014/11/28 09:57:32 obache Exp $
No NetBSD the 'cabs' and 'cabsf' functions are are __RENAME so that
thay have '__c99_' prefixes.
@@ -28,15 +28,17 @@ thay have '__c99_' prefixes.
gfc_define_builtin ("__builtin_copysignl", mfunc_longdouble[1],
BUILT_IN_COPYSIGNL, "copysignl",
-@@ -1069,6 +1078,11 @@ gfc_maybe_initialize_eh (void)
+@@ -1069,6 +1078,13 @@ gfc_maybe_initialize_eh (void)
using_eh_for_cleanups ();
}
++#ifdef __OpenBSD__
+const char *
+fname_as_string(int pretty_p __attribute__((__unused__)))
+{
+ return NULL;
+}
++#endif
#include "gt-fortran-f95-lang.h"
#include "gtype-fortran.h"
diff --git a/lang/gcc48/patches/patch-gcc_gcc.c b/lang/gcc48/patches/patch-gcc_gcc.c
deleted file mode 100644
index b483c0853b1..00000000000
--- a/lang/gcc48/patches/patch-gcc_gcc.c
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-gcc_gcc.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
-
---- gcc/gcc.c.orig 2014-03-23 11:30:57.000000000 +0000
-+++ gcc/gcc.c
-@@ -661,7 +661,7 @@ proper position among the other output f
-
- #ifndef LINK_PIE_SPEC
- #ifdef HAVE_LD_PIE
--#define LINK_PIE_SPEC "%{pie:-pie} "
-+#define LINK_PIE_SPEC "%{pie:-pie} %{p|pg|nopie:-nopie} "
- #else
- #define LINK_PIE_SPEC "%{pie:} "
- #endif
diff --git a/lang/gcc48/patches/patch-gcc_go_go-lang.c b/lang/gcc48/patches/patch-gcc_go_go-lang.c
index ccf79b25bc9..fa99fddd7bc 100644
--- a/lang/gcc48/patches/patch-gcc_go_go-lang.c
+++ b/lang/gcc48/patches/patch-gcc_go_go-lang.c
@@ -1,16 +1,18 @@
-$NetBSD: patch-gcc_go_go-lang.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
+$NetBSD: patch-gcc_go_go-lang.c,v 1.2 2014/11/28 09:57:32 obache Exp $
--- gcc/go/go-lang.c.orig 2013-12-12 02:29:08.000000000 +0000
+++ gcc/go/go-lang.c
-@@ -457,6 +457,12 @@ go_localize_identifier (const char *iden
+@@ -457,6 +457,14 @@ go_localize_identifier (const char *iden
return identifier_to_locale (ident);
}
++#ifdef __OpenBSD__
+const char *
+fname_as_string(int pretty_p __attribute__((__unused__)))
+{
+ return NULL;
+}
++#endif
+
#undef LANG_HOOKS_NAME
#undef LANG_HOOKS_INIT
diff --git a/lang/gcc48/patches/patch-gcc_java_lang.c b/lang/gcc48/patches/patch-gcc_java_lang.c
index 9ceaadb78e9..84799f8e0be 100644
--- a/lang/gcc48/patches/patch-gcc_java_lang.c
+++ b/lang/gcc48/patches/patch-gcc_java_lang.c
@@ -1,15 +1,17 @@
-$NetBSD: patch-gcc_java_lang.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
+$NetBSD: patch-gcc_java_lang.c,v 1.2 2014/11/28 09:57:32 obache Exp $
--- gcc/java/lang.c.orig 2013-01-10 20:38:27.000000000 +0000
+++ gcc/java/lang.c
-@@ -920,4 +920,10 @@ java_eh_personality (void)
+@@ -920,4 +920,12 @@ java_eh_personality (void)
return java_eh_personality_decl;
}
++#ifdef __OpenBSD__
+const char *
+fname_as_string(int pretty_p __attribute__((__unused__)))
+{
+ return NULL;
+}
++#endif
+
#include "gt-java-lang.h"
diff --git a/lang/gcc48/patches/patch-gcc_lto_lto.c b/lang/gcc48/patches/patch-gcc_lto_lto.c
index c0532730c4f..029212dd166 100644
--- a/lang/gcc48/patches/patch-gcc_lto_lto.c
+++ b/lang/gcc48/patches/patch-gcc_lto_lto.c
@@ -1,16 +1,18 @@
-$NetBSD: patch-gcc_lto_lto.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
+$NetBSD: patch-gcc_lto_lto.c,v 1.2 2014/11/28 09:57:32 obache Exp $
--- gcc/lto/lto.c.orig 2013-02-07 18:01:40.000000000 +0000
+++ gcc/lto/lto.c
-@@ -3102,6 +3102,12 @@ read_cgraph_and_symbols (unsigned nfiles
+@@ -3102,6 +3102,14 @@ read_cgraph_and_symbols (unsigned nfiles
all_file_decl_data = NULL;
}
++#ifdef __OpenBSD__
+const char *
+fname_as_string(int pretty_p __attribute__((__unused__)))
+{
+ return NULL;
+}
++#endif
+
/* Materialize all the bodies for all the nodes in the callgraph. */
diff --git a/lang/gcc48/patches/patch-gcc_opts.c b/lang/gcc48/patches/patch-gcc_opts.c
deleted file mode 100644
index 503d81ba216..00000000000
--- a/lang/gcc48/patches/patch-gcc_opts.c
+++ /dev/null
@@ -1,52 +0,0 @@
-$NetBSD: patch-gcc_opts.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
-
---- gcc/opts.c.orig 2014-05-04 07:05:29.000000000 +0000
-+++ gcc/opts.c
-@@ -49,6 +49,9 @@ const char *const debug_type_names[] =
- ((strncmp (prefix, string, sizeof prefix - 1) == 0) \
- ? ((string += sizeof prefix - 1), 1) : 0)
-
-+int warn_stack_larger_than;
-+HOST_WIDE_INT stack_larger_than_size;
-+
- void
- set_struct_debug_option (struct gcc_options *opts, location_t loc,
- const char *spec)
-@@ -468,8 +471,6 @@ static const struct default_options defa
- { OPT_LEVELS_2_PLUS, OPT_fschedule_insns2, NULL, 1 },
- #endif
- { OPT_LEVELS_2_PLUS, OPT_fregmove, NULL, 1 },
-- { OPT_LEVELS_2_PLUS, OPT_fstrict_aliasing, NULL, 1 },
-- { OPT_LEVELS_2_PLUS, OPT_fstrict_overflow, NULL, 1 },
- { OPT_LEVELS_2_PLUS, OPT_freorder_blocks, NULL, 1 },
- { OPT_LEVELS_2_PLUS, OPT_freorder_functions, NULL, 1 },
- { OPT_LEVELS_2_PLUS, OPT_ftree_vrp, NULL, 1 },
-@@ -488,6 +489,7 @@ static const struct default_options defa
- { OPT_LEVELS_2_PLUS, OPT_fhoist_adjacent_loads, NULL, 1 },
-
- /* -O3 optimizations. */
-+ { OPT_LEVELS_3_PLUS, OPT_fstrict_aliasing, NULL, 1 },
- { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 },
- { OPT_LEVELS_3_PLUS, OPT_fpredictive_commoning, NULL, 1 },
- /* Inlining of functions reducing size is a good idea with -Os
-@@ -701,6 +703,8 @@ finish_options (struct gcc_options *opts
-
- if (!opts->x_flag_opts_finished)
- {
-+ if (opts->x_flag_pic || opts->x_profile_flag)
-+ opts->x_flag_pie = 0;
- if (opts->x_flag_pie)
- opts->x_flag_pic = opts->x_flag_pie;
- if (opts->x_flag_pic && !opts->x_flag_pie)
-@@ -1437,6 +1441,11 @@ common_handle_option (struct gcc_options
- opts->x_warn_frame_larger_than = value != -1;
- break;
-
-+ case OPT_Wstack_larger_than_:
-+ stack_larger_than_size = value;
-+ warn_stack_larger_than = stack_larger_than_size != -1;
-+ break;
-+
- case OPT_Wstack_usage_:
- opts->x_warn_stack_usage = value;
- opts->x_flag_stack_usage_info = value != -1;
diff --git a/lang/gcc48/patches/patch-gcc_toplev.c b/lang/gcc48/patches/patch-gcc_toplev.c
deleted file mode 100644
index 8fe28cedb50..00000000000
--- a/lang/gcc48/patches/patch-gcc_toplev.c
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-gcc_toplev.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
-
---- gcc/toplev.c.orig 2013-03-28 08:29:51.000000000 +0000
-+++ gcc/toplev.c
-@@ -1519,6 +1519,8 @@ process_options (void)
-
- /* Targets must be able to place spill slots at lower addresses. If the
- target already uses a soft frame pointer, the transition is trivial. */
-+ if (flag_stack_protect == -1)
-+ flag_stack_protect = FRAME_GROWS_DOWNWARD ? 1 : 0;
- if (!FRAME_GROWS_DOWNWARD && flag_stack_protect)
- {
- warning (0, "-fstack-protector not supported for this target");
diff --git a/lang/gcc48/patches/patch-libgcc_config.host b/lang/gcc48/patches/patch-libgcc_config.host
index 118d8d68c0c..21852511178 100644
--- a/lang/gcc48/patches/patch-libgcc_config.host
+++ b/lang/gcc48/patches/patch-libgcc_config.host
@@ -1,4 +1,4 @@
-$NetBSD: patch-libgcc_config.host,v 1.2 2014/05/31 13:06:25 ryoon Exp $
+$NetBSD: patch-libgcc_config.host,v 1.3 2014/11/28 09:57:32 obache Exp $
--- libgcc/config.host.orig 2014-03-20 16:12:30.000000000 +0000
+++ libgcc/config.host
@@ -39,3 +39,11 @@ $NetBSD: patch-libgcc_config.host,v 1.2 2014/05/31 13:06:25 ryoon Exp $
i[34567]86-*-freebsd*)
tmake_file="${tmake_file} i386/t-freebsd i386/t-crtstuff"
;;
+@@ -1148,6 +1162,7 @@ i[34567]86-*-darwin* | x86_64-*-darwin*
+ i[34567]86-*-gnu* | \
+ i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]* | \
+ i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw* | \
++ i[34567]86-*-dragonfly* | x86_64-*-dragonfly* | \
+ i[34567]86-*-freebsd* | x86_64-*-freebsd* | \
+ i[34567]86-*-openbsd* | x86_64-*-openbsd*)
+ tmake_file="${tmake_file} t-softfp-tf"
diff --git a/lang/gcc48/patches/patch-libgcc_libgcc2.c b/lang/gcc48/patches/patch-libgcc_libgcc2.c
index 2ca89dc2b21..1081a02ec21 100644
--- a/lang/gcc48/patches/patch-libgcc_libgcc2.c
+++ b/lang/gcc48/patches/patch-libgcc_libgcc2.c
@@ -1,12 +1,14 @@
-$NetBSD: patch-libgcc_libgcc2.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
+$NetBSD: patch-libgcc_libgcc2.c,v 1.2 2014/11/28 09:57:32 obache Exp $
--- libgcc/libgcc2.c.orig 2013-02-04 19:06:20.000000000 +0000
+++ libgcc/libgcc2.c
-@@ -2117,6 +2117,7 @@ mprotect (char *addr, int len, int prot)
+@@ -2117,6 +2117,9 @@ mprotect (char *addr, int len, int prot)
#endif /* WINNT && ! __CYGWIN__ */
#ifdef TRANSFER_FROM_TRAMPOLINE
++#ifdef __OpenBSD__
+#include <sys/mman.h>
++#endif
TRANSFER_FROM_TRAMPOLINE
#endif
#endif /* L_trampoline */
diff --git a/lang/gcc48/patches/patch-libiberty_cp-demangle.c b/lang/gcc48/patches/patch-libiberty_cp-demangle.c
index a59f0077df7..5884fbb8bd3 100644
--- a/lang/gcc48/patches/patch-libiberty_cp-demangle.c
+++ b/lang/gcc48/patches/patch-libiberty_cp-demangle.c
@@ -1,22 +1,31 @@
-$NetBSD: patch-libiberty_cp-demangle.c,v 1.1 2014/05/31 13:06:25 ryoon Exp $
+$NetBSD: patch-libiberty_cp-demangle.c,v 1.2 2014/11/28 09:57:32 obache Exp $
+
+* OpenBSD dislike using sprintf(3) and strcpy(3).
--- libiberty/cp-demangle.c.orig 2013-04-03 17:25:03.000000000 +0000
+++ libiberty/cp-demangle.c
-@@ -3736,7 +3736,7 @@ static inline void
+@@ -3736,7 +3736,11 @@ static inline void
d_append_num (struct d_print_info *dpi, long l)
{
char buf[25];
- sprintf (buf,"%ld", l);
++#ifdef __OpenBSD__
+ snprintf (buf, 25, "%ld", l);
++#else
++ sprintf (buf, "%ld", l);
++#endif
d_append_string (dpi, buf);
}
-@@ -5561,7 +5561,7 @@ __cxa_demangle (const char *mangled_name
+@@ -5561,7 +5565,11 @@ __cxa_demangle (const char *mangled_name
{
if (strlen (demangled) < *length)
{
-- strcpy (output_buffer, demangled);
++#ifdef __OpenBSD__
+ strlcpy (output_buffer, demangled, *length);
++#else
+ strcpy (output_buffer, demangled);
++#endif
free (demangled);
demangled = output_buffer;
}
diff --git a/lang/gcc48/patches/patch-libjava_configure b/lang/gcc48/patches/patch-libjava_configure
index cd9dd64989d..0f888408a44 100644
--- a/lang/gcc48/patches/patch-libjava_configure
+++ b/lang/gcc48/patches/patch-libjava_configure
@@ -1,4 +1,4 @@
-$NetBSD: patch-libjava_configure,v 1.3 2014/05/31 13:06:25 ryoon Exp $
+$NetBSD: patch-libjava_configure,v 1.4 2014/11/28 09:57:32 obache Exp $
Detect gethostbyname_r properly.
@@ -17,3 +17,27 @@ See: libjava/contrib/aotcompile.py.in
# FreeBSD >=5.3 implements a model much closer to other modern UNIX
# systems which support threads and -lpthread.
THREADLDFLAGS=-pthread
+@@ -22020,6 +22020,14 @@ do :
+ if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_GETHOSTBYNAME_R 1
++#include <netdb.h>
++int
++main ()
++{
++gethostbyname_r("", 0, 0);
++;
++return 0;
++}
+ _ACEOF
+
+
+@@ -24873,7 +24881,7 @@ $as_echo "Python modules dir: ${python_m
+
+
+ # needed for aot-compile-rpm
+-MAKE=`which make`
++MAKE=${PKGSRC_MAKE}
+
+
+ # Check whether --enable-aot-compile-rpm was given.
diff --git a/lang/gcc48/patches/patch-libjava_prims.cc b/lang/gcc48/patches/patch-libjava_prims.cc
index c0222184706..afcb2e475c0 100644
--- a/lang/gcc48/patches/patch-libjava_prims.cc
+++ b/lang/gcc48/patches/patch-libjava_prims.cc
@@ -1,13 +1,16 @@
-$NetBSD: patch-libjava_prims.cc,v 1.1 2014/05/31 13:06:25 ryoon Exp $
+$NetBSD: patch-libjava_prims.cc,v 1.2 2014/11/28 09:57:32 obache Exp $
--- libjava/prims.cc.orig 2011-11-24 07:18:16.000000000 +0000
+++ libjava/prims.cc
-@@ -1143,7 +1143,7 @@ namespace gcj
+@@ -1143,7 +1143,11 @@ namespace gcj
bool verifyClasses = true;
// Thread stack size specified by the -Xss runtime argument.
-- size_t stack_size = 0;
++#ifdef __OpenBSD__
+ size_t stack_size = 768*1024;
++#else
+ size_t stack_size = 0;
++#endif
// Start time of the VM
jlong startTime = 0;