From ef1e3f3d4bf00f225b8b516b1c923f409ecd70fe Mon Sep 17 00:00:00 2001 From: jperkin Date: Wed, 25 Jul 2012 15:49:34 +0000 Subject: [PATCH] Use correct linker flags on Solaris with GCC. Fixes relocation issues. Bump PKGREVISION. --- textproc/xmlrpc-c/Makefile | 3 ++- textproc/xmlrpc-c/distinfo | 3 ++- textproc/xmlrpc-c/patches/patch-config.mk.in | 27 ++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 textproc/xmlrpc-c/patches/patch-config.mk.in diff --git a/textproc/xmlrpc-c/Makefile b/textproc/xmlrpc-c/Makefile index 157dcc64f1aa..7398807590a5 100644 --- a/textproc/xmlrpc-c/Makefile +++ b/textproc/xmlrpc-c/Makefile @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.24 2012/05/04 11:18:22 adam Exp $ +# $NetBSD: Makefile,v 1.25 2012/07/25 15:49:34 jperkin Exp $ DISTNAME= xmlrpc-c-1.16.41 # the "super stable" branch PKGNAME= ${DISTNAME:S/-c-/-c-ss-/} +PKGREVISION= 1 CATEGORIES= textproc devel MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xmlrpc-c/} EXTRACT_SUFX= .tgz diff --git a/textproc/xmlrpc-c/distinfo b/textproc/xmlrpc-c/distinfo index 91ba9bd21979..46230ec50987 100644 --- a/textproc/xmlrpc-c/distinfo +++ b/textproc/xmlrpc-c/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.23 2012/05/04 11:18:22 adam Exp $ +$NetBSD: distinfo,v 1.24 2012/07/25 15:49:34 jperkin Exp $ SHA1 (xmlrpc-c-1.16.41.tgz) = aee10abad995ff745d10223b7335c374a931aa1f RMD160 (xmlrpc-c-1.16.41.tgz) = ad03272881d55c2e648f93c1c76ba4c4f9f804a2 @@ -10,6 +10,7 @@ SHA1 (patch-ae) = 52f826d292869be44886881c48aa7707a4af2df3 SHA1 (patch-ai) = e7b981f07d4691bbd63bfa80b34b3e1c050c3ad2 SHA1 (patch-aj) = e3ca062349eb7c50cf3d3dc1370744987a0f3bde SHA1 (patch-ak) = 2d0528260b203965e5237f5ca7f9464215283f5c +SHA1 (patch-config.mk.in) = 48c5ead1c6ed9993259188eaac8c2df9c89d2c74 SHA1 (patch-examples_cpp_Makefile) = 3c2ca9b50a587c6a6395aec292ca643605158171 SHA1 (patch-lib_curl__transport_curlmulti.c) = 1cea4c43b1ed3dcf73827afc14d7bb9267371121 SHA1 (patch-lib_curl__transport_curltransaction.c) = 1dcf46c0dd1dd8e7fdfbb6c81e00b326f6d0b1f9 diff --git a/textproc/xmlrpc-c/patches/patch-config.mk.in b/textproc/xmlrpc-c/patches/patch-config.mk.in new file mode 100644 index 000000000000..f02c34ce22d3 --- /dev/null +++ b/textproc/xmlrpc-c/patches/patch-config.mk.in @@ -0,0 +1,27 @@ +$NetBSD: patch-config.mk.in,v 1.1 2012/07/25 15:49:34 jperkin Exp $ + +Do not use -Bdynamic -G when using GCC on Solaris, it creates non-PIC +libraries. + +--- config.mk.in.orig 2012-07-25 15:14:31.150813087 +0000 ++++ config.mk.in 2012-07-25 15:16:38.062750186 +0000 +@@ -187,10 +187,15 @@ + SHLIB_SUFFIX = so + shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN)) + shliblefn = $(1:%=%.$(SHLIB_SUFFIX)) +- # Solaris compiler (Sun C 5.5) can't take multiple ld options as +- # -Wl,-a,-b . Ld sees -a,-b in that case. +- LDFLAGS_SHLIB = -Wl,-Bdynamic -Wl,-G -Wl,-h -Wl,$(SONAME) +- CFLAGS_SHLIB = -Kpic ++ ifeq ($(C_COMPILER_GNU),yes) ++ LDFLAGS_SHLIB = -shared -Wl,-h -Wl,$(SONAME) ++ CFLAGS_SHLIB = -fPIC ++ else ++ # Solaris compiler (Sun C 5.5) can't take multiple ld options as ++ # -Wl,-a,-b . Ld sees -a,-b in that case. ++ LDFLAGS_SHLIB = -Wl,-Bdynamic -Wl,-G -Wl,-h -Wl,$(SONAME) ++ CFLAGS_SHLIB = -Kpic ++ endif + endif + + ifeq ($(patsubst aix%,aix,$(HOST_OS)),aix)