diff options
author | pho <pho@pkgsrc.org> | 2014-05-15 12:04:41 +0000 |
---|---|---|
committer | pho <pho@pkgsrc.org> | 2014-05-15 12:04:41 +0000 |
commit | 9c49a91add7818c94b64faf337aa1b5379c6f4f8 (patch) | |
tree | ac8b2b331ca2acbea0c31d49dec4c72f66a806cb | |
parent | 6abb9f63a2a6af30bdfa54abcba01c8360b2959c (diff) | |
download | pkgsrc-9c49a91add7818c94b64faf337aa1b5379c6f4f8.tar.gz |
PR pkg/48740 - Fix problems on Darwin
Makefile:
See ${WRKSRC}/libgcc/config/t-slibgcc-darwin: It uses strip(1) to
create a stub library, not just to remove symbols, so we must not
let strip(1) be a no-op regardless of ${INSTALL_UNSTRIPPED} or the
build fails for missing files.
patches/patch-ac:
Remove the whitespace between $(LINKER_RPATH_FLAG) and the path.
Otherwise the flag may be misinterpreted by linker (e.g. Apple's ld)
patches/patch-libgcc_config_t-slibgcc-darwin:
If we don't install libgcc_s.10.[45].dylib, our gcc links binaries
with *both* /usr/lib/libgcc_s.1.dylib and
${GCC_PREFIX}/lib/libgcc_s.1.dylib, which is certainly a bad thing.
-rw-r--r-- | lang/gcc46/Makefile | 9 | ||||
-rw-r--r-- | lang/gcc46/distinfo | 5 | ||||
-rw-r--r-- | lang/gcc46/patches/patch-ac | 4 | ||||
-rw-r--r-- | lang/gcc46/patches/patch-libgcc_config_t-slibgcc-darwin | 26 |
4 files changed, 39 insertions, 5 deletions
diff --git a/lang/gcc46/Makefile b/lang/gcc46/Makefile index 5f3def343d7..2b318d2fa38 100644 --- a/lang/gcc46/Makefile +++ b/lang/gcc46/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.24 2014/01/25 13:38:47 ryoon Exp $ +# $NetBSD: Makefile,v 1.25 2014/05/15 12:04:41 pho Exp $ DISTNAME= gcc-${GCC_VERSION} PKGNAME= gcc46-${GCC_VERSION} @@ -79,6 +79,13 @@ MAKE_ENV+= ac_cv_func_clock_gettime=yes .if ${OPSYS} == "Linux" CONFIGURE_ARGS+= --disable-libquadmath --disable-libquadmath-support .endif +.if ${OPSYS} == "Darwin" +# See ${WRKSRC}/libgcc/config/t-slibgcc-darwin: It uses strip(1) to +# create a stub library, not just to remove symbols, so we must not +# let strip(1) be a no-op regardless of ${INSTALL_UNSTRIPPED} or the +# build fails for missing files. +CONFIGURE_ARGS+= STRIP_FOR_TARGET=${TOOLS_PLATFORM.strip} +.endif CONFIGURE_ENV+= CONFIG_SHELL=${CONFIG_SHELL} diff --git a/lang/gcc46/distinfo b/lang/gcc46/distinfo index 61448c846ee..9e26a61a05a 100644 --- a/lang/gcc46/distinfo +++ b/lang/gcc46/distinfo @@ -1,11 +1,11 @@ -$NetBSD: distinfo,v 1.15 2014/03/29 20:50:03 ryoon Exp $ +$NetBSD: distinfo,v 1.16 2014/05/15 12:04:41 pho Exp $ SHA1 (gcc-4.6.4.tar.bz2) = 63933a8a5cf725626585dbba993c8b0f6db1335d RMD160 (gcc-4.6.4.tar.bz2) = 6a58b053812cf75622bc4579e020cd9471f46916 Size (gcc-4.6.4.tar.bz2) = 72006076 bytes SHA1 (patch-aa) = 8bb19e38cacf5dbf9e9f3cac71211d52ec8358c3 SHA1 (patch-ab) = f25d0b276041e57dcfb00638bc4232b4e0f5abb6 -SHA1 (patch-ac) = 0f708412670eca90c2c8e3fa675cffb14be768cd +SHA1 (patch-ac) = 1317d68b9c682384622bbc322c1b8a75db74ae79 SHA1 (patch-ad) = b5e17219e7b7ba158b9f3e1a67e155fb158b4484 SHA1 (patch-af) = e4e194ef29924eb986536972c5f5e9f37d98eba3 SHA1 (patch-ag) = 1753d08075de8527d8f14afc3df4afeacb10d507 @@ -44,6 +44,7 @@ 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-libgcc_config_t-slibgcc-darwin) = 2ddda2dd979f27c623e47db70c5abb3befdb68c9 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-ac b/lang/gcc46/patches/patch-ac index 6f69378232b..78610c9a488 100644 --- a/lang/gcc46/patches/patch-ac +++ b/lang/gcc46/patches/patch-ac @@ -1,4 +1,4 @@ -$NetBSD: patch-ac,v 1.3 2012/04/17 08:24:54 wiz Exp $ +$NetBSD: patch-ac,v 1.4 2014/05/15 12:04:41 pho Exp $ Add gcc libdir to a programs rpath so that _this gcc's_ support libraries are found. @@ -9,7 +9,7 @@ are found. # Language-independent files. DRIVER_DEFINES = \ -+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG) $(exec_prefix)/lib\"" \ ++ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(exec_prefix)/lib\"" \ -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \ -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \ -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \ diff --git a/lang/gcc46/patches/patch-libgcc_config_t-slibgcc-darwin b/lang/gcc46/patches/patch-libgcc_config_t-slibgcc-darwin new file mode 100644 index 00000000000..3097b1a704d --- /dev/null +++ b/lang/gcc46/patches/patch-libgcc_config_t-slibgcc-darwin @@ -0,0 +1,26 @@ +$NetBSD: patch-libgcc_config_t-slibgcc-darwin,v 1.1 2014/05/15 12:04:41 pho Exp $ + +If we don't install libgcc_s.10.[45].dylib, our gcc links binaries +with *both* /usr/lib/libgcc_s.1.dylib and +${GCC_PREFIX}/lib/libgcc_s.1.dylib, which is certainly a bad thing. + +The problem was already reported to the upstream but it caught +seemingly no attention: +http://gcc.gnu.org/ml/gcc-help/2010-07/msg00164.html + +--- libgcc/config/t-slibgcc-darwin.orig 2010-02-02 08:18:48.000000000 +0000 ++++ libgcc/config/t-slibgcc-darwin +@@ -26,13 +26,7 @@ SHLIB_MKMAP = $(gcc_srcdir)/mkmap-flat.a + SHLIB_MKMAP_OPTS = -v leading_underscore=1 + SHLIB_MAPFILES += $(gcc_srcdir)/libgcc-std.ver $(gcc_srcdir)/libgcc-libsystem.ver + +-# we're only going to build the stubs if the target slib is /usr/lib +-# there is no other case in which they're useful in a live system. +-ifeq (/usr/lib,$(shlib_slibdir)) + LGCC_STUBS = libgcc_s.10.4.dylib libgcc_s.10.5.dylib +-else +-LGCC_STUBS = +-endif + + LGCC_FILES = libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT) + LGCC_FILES += $(LGCC_STUBS) |