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 <[email protected]> > --- > 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 > [email protected] > -- 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 [email protected]
