From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1WQurh-0002iE-NS for ptxdist@pengutronix.de; Fri, 21 Mar 2014 09:31:45 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1WQurh-0000eE-LV for ptxdist@pengutronix.de; Fri, 21 Mar 2014 09:31:45 +0100 Date: Fri, 21 Mar 2014 09:31:45 +0100 From: Michael Olbrich Message-ID: <20140321083145.GJ23331@pengutronix.de> References: <1395389064-5802-1-git-send-email-alex.aring@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1395389064-5802-1-git-send-email-alex.aring@gmail.com> Subject: Re: [ptxdist] [PATCH 1/4] libgmp: fix issue with missing -fPIC Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Fri, Mar 21, 2014 at 09:04:21AM +0100, Alexander Aring wrote: > While compiling nettle which depends on libgmp I got the following > linking error: > > .../sysroot-target/usr/lib/libgmp.a(mp_get_fns.o): relocation > R_ARM_THM_MOVW_ABS_NC against `__gmp_allocate_func' can not be used when > making a shared object; recompile with -fPIC > .../sysroot-target/usr/lib/libgmp.a: error adding symbols: Bad value > > This patch adds a "--with-pic" to the configure argument to solve this > problem. I'd rather you remove the LIBGMP_STATIC option. The shared library is always PIC. Michael > Signed-off-by: Alexander Aring > --- > rules/libgmp.make | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/rules/libgmp.make b/rules/libgmp.make > index 8e3b356..cf36ece 100644 > --- a/rules/libgmp.make > +++ b/rules/libgmp.make > @@ -39,7 +39,8 @@ LIBGMP_ENV := $(CROSS_ENV) > LIBGMP_AUTOCONF := \ > $(CROSS_AUTOCONF_USR) \ > --$(call ptx/endis, PTXCONF_LIBGMP_SHARED)-shared \ > - --$(call ptx/endis, PTXCONF_LIBGMP_STATIC)-static > + --$(call ptx/endis, PTXCONF_LIBGMP_STATIC)-static \ > + --with-pic > > # ---------------------------------------------------------------------------- > # Target-Install > -- > 1.9.1 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de