From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-ee0-x22e.google.com ([2a00:1450:4013:c00::22e]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1WQvF7-00046D-Ue for ptxdist@pengutronix.de; Fri, 21 Mar 2014 09:55:58 +0100 Received: by mail-ee0-f46.google.com with SMTP id t10so1515263eei.5 for ; Fri, 21 Mar 2014 01:55:52 -0700 (PDT) Received: from omega (p20030064AA051101E2CB4EFFFE1BB546.dip0.t-ipconnect.de. [2003:64:aa05:1101:e2cb:4eff:fe1b:b546]) by mx.google.com with ESMTPSA id m8sm10207050eeg.11.2014.03.21.01.55.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Mar 2014 01:55:51 -0700 (PDT) Date: Fri, 21 Mar 2014 09:55:50 +0100 From: Alexander Aring Message-ID: <20140321085548.GB25178@omega> References: <1395389064-5802-1-git-send-email-alex.aring@gmail.com> <20140321083145.GJ23331@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140321083145.GJ23331@pengutronix.de> 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:31:45AM +0100, Michael Olbrich wrote: > 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. > Yea, that would be the alternative. I thought maybe there exist some other non mainline rules which need a static and not a shared lib. Okay, then I drop the static lib thing and always build a shared library this will make the world much easier. - Alex -- ptxdist mailing list ptxdist@pengutronix.de