* [ptxdist] [PATCH 1/4] libgmp: fix issue with missing -fPIC
@ 2014-03-21 8:04 Alexander Aring
2014-03-21 8:04 ` [ptxdist] [PATCH 2/4] libgmp: add missing with-gnu-ld Alexander Aring
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Alexander Aring @ 2014-03-21 8:04 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
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.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [ptxdist] [PATCH 2/4] libgmp: add missing with-gnu-ld
2014-03-21 8:04 [ptxdist] [PATCH 1/4] libgmp: fix issue with missing -fPIC Alexander Aring
@ 2014-03-21 8:04 ` Alexander Aring
2014-03-21 8:34 ` Michael Olbrich
2014-03-21 8:04 ` [ptxdist] [PATCH 3/4] libgmp: remove targetinstall of static lib Alexander Aring
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Alexander Aring @ 2014-03-21 8:04 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
rules/libgmp.make | 1 +
1 file changed, 1 insertion(+)
diff --git a/rules/libgmp.make b/rules/libgmp.make
index cf36ece..6da2010 100644
--- a/rules/libgmp.make
+++ b/rules/libgmp.make
@@ -40,6 +40,7 @@ LIBGMP_AUTOCONF := \
$(CROSS_AUTOCONF_USR) \
--$(call ptx/endis, PTXCONF_LIBGMP_SHARED)-shared \
--$(call ptx/endis, PTXCONF_LIBGMP_STATIC)-static \
+ --with-gnu-ld \
--with-pic
# ----------------------------------------------------------------------------
--
1.9.1
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* [ptxdist] [PATCH 3/4] libgmp: remove targetinstall of static lib
2014-03-21 8:04 [ptxdist] [PATCH 1/4] libgmp: fix issue with missing -fPIC Alexander Aring
2014-03-21 8:04 ` [ptxdist] [PATCH 2/4] libgmp: add missing with-gnu-ld Alexander Aring
@ 2014-03-21 8:04 ` Alexander Aring
2014-03-21 8:04 ` [ptxdist] [PATCH 4/4] libgmp: remove LIBGMP_STATIC menu entry Alexander Aring
2014-03-21 8:31 ` [ptxdist] [PATCH 1/4] libgmp: fix issue with missing -fPIC Michael Olbrich
3 siblings, 0 replies; 9+ messages in thread
From: Alexander Aring @ 2014-03-21 8:04 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
There is no runtime need for a static library.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
rules/libgmp.make | 3 ---
1 file changed, 3 deletions(-)
diff --git a/rules/libgmp.make b/rules/libgmp.make
index 6da2010..2a1e8be 100644
--- a/rules/libgmp.make
+++ b/rules/libgmp.make
@@ -59,9 +59,6 @@ $(STATEDIR)/libgmp.targetinstall:
ifdef PTXCONF_LIBGMP_SHARED
@$(call install_lib, libgmp, 0, 0, 0644, libgmp)
endif
-ifdef PTXCONF_LIBGMP_STATIC
- @$(call install_copy, libgmp, 0, 0, 0644, -, /usr/lib/libgmp.la)
-endif
@$(call install_finish, libgmp)
@$(call touch)
--
1.9.1
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* [ptxdist] [PATCH 4/4] libgmp: remove LIBGMP_STATIC menu entry
2014-03-21 8:04 [ptxdist] [PATCH 1/4] libgmp: fix issue with missing -fPIC Alexander Aring
2014-03-21 8:04 ` [ptxdist] [PATCH 2/4] libgmp: add missing with-gnu-ld Alexander Aring
2014-03-21 8:04 ` [ptxdist] [PATCH 3/4] libgmp: remove targetinstall of static lib Alexander Aring
@ 2014-03-21 8:04 ` Alexander Aring
2014-03-21 8:33 ` Michael Olbrich
2014-03-21 8:31 ` [ptxdist] [PATCH 1/4] libgmp: fix issue with missing -fPIC Michael Olbrich
3 siblings, 1 reply; 9+ messages in thread
From: Alexander Aring @ 2014-03-21 8:04 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
We can have a option like "--disable-shared --disable-static" which
builds a static library for me. This option makes no sense, instead
doing a dependency switch on LIBGMP_SHARED by doing ptx/disen in the
make rule.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
rules/libgmp.in | 7 -------
rules/libgmp.make | 2 +-
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/rules/libgmp.in b/rules/libgmp.in
index b7127f3..4872dcb 100644
--- a/rules/libgmp.in
+++ b/rules/libgmp.in
@@ -19,11 +19,4 @@ config LIBGMP_SHARED
help
Create a shared library and install it into /usr/lib
-config LIBGMP_STATIC
- bool
- prompt "Create static link library"
- help
- Create a static link library and install it into /usr/lib.
- Normally not needed.
-
endif
diff --git a/rules/libgmp.make b/rules/libgmp.make
index 2a1e8be..feaa52e 100644
--- a/rules/libgmp.make
+++ b/rules/libgmp.make
@@ -39,7 +39,7 @@ 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/disen, PTXCONF_LIBGMP_SHARED)-static \
--with-gnu-ld \
--with-pic
--
1.9.1
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [PATCH 1/4] libgmp: fix issue with missing -fPIC
2014-03-21 8:04 [ptxdist] [PATCH 1/4] libgmp: fix issue with missing -fPIC Alexander Aring
` (2 preceding siblings ...)
2014-03-21 8:04 ` [ptxdist] [PATCH 4/4] libgmp: remove LIBGMP_STATIC menu entry Alexander Aring
@ 2014-03-21 8:31 ` Michael Olbrich
2014-03-21 8:55 ` Alexander Aring
3 siblings, 1 reply; 9+ messages in thread
From: Michael Olbrich @ 2014-03-21 8:31 UTC (permalink / raw)
To: ptxdist
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 <alex.aring@gmail.com>
> ---
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [PATCH 4/4] libgmp: remove LIBGMP_STATIC menu entry
2014-03-21 8:04 ` [ptxdist] [PATCH 4/4] libgmp: remove LIBGMP_STATIC menu entry Alexander Aring
@ 2014-03-21 8:33 ` Michael Olbrich
0 siblings, 0 replies; 9+ messages in thread
From: Michael Olbrich @ 2014-03-21 8:33 UTC (permalink / raw)
To: ptxdist
On Fri, Mar 21, 2014 at 09:04:24AM +0100, Alexander Aring wrote:
> We can have a option like "--disable-shared --disable-static" which
> builds a static library for me. This option makes no sense, instead
> doing a dependency switch on LIBGMP_SHARED by doing ptx/disen in the
> make rule.
No, remove both options and always use the shared lib.
Michael
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
> rules/libgmp.in | 7 -------
> rules/libgmp.make | 2 +-
> 2 files changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/rules/libgmp.in b/rules/libgmp.in
> index b7127f3..4872dcb 100644
> --- a/rules/libgmp.in
> +++ b/rules/libgmp.in
> @@ -19,11 +19,4 @@ config LIBGMP_SHARED
> help
> Create a shared library and install it into /usr/lib
>
> -config LIBGMP_STATIC
> - bool
> - prompt "Create static link library"
> - help
> - Create a static link library and install it into /usr/lib.
> - Normally not needed.
> -
> endif
> diff --git a/rules/libgmp.make b/rules/libgmp.make
> index 2a1e8be..feaa52e 100644
> --- a/rules/libgmp.make
> +++ b/rules/libgmp.make
> @@ -39,7 +39,7 @@ 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/disen, PTXCONF_LIBGMP_SHARED)-static \
> --with-gnu-ld \
> --with-pic
>
> --
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [PATCH 2/4] libgmp: add missing with-gnu-ld
2014-03-21 8:04 ` [ptxdist] [PATCH 2/4] libgmp: add missing with-gnu-ld Alexander Aring
@ 2014-03-21 8:34 ` Michael Olbrich
2014-03-21 8:53 ` Alexander Aring
0 siblings, 1 reply; 9+ messages in thread
From: Michael Olbrich @ 2014-03-21 8:34 UTC (permalink / raw)
To: ptxdist
On Fri, Mar 21, 2014 at 09:04:22AM +0100, Alexander Aring wrote:
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
> rules/libgmp.make | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/rules/libgmp.make b/rules/libgmp.make
> index cf36ece..6da2010 100644
> --- a/rules/libgmp.make
> +++ b/rules/libgmp.make
> @@ -40,6 +40,7 @@ LIBGMP_AUTOCONF := \
> $(CROSS_AUTOCONF_USR) \
> --$(call ptx/endis, PTXCONF_LIBGMP_SHARED)-shared \
> --$(call ptx/endis, PTXCONF_LIBGMP_STATIC)-static \
> + --with-gnu-ld \
Is something broken without this?
Michael
> --with-pic
>
> # ----------------------------------------------------------------------------
> --
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [PATCH 2/4] libgmp: add missing with-gnu-ld
2014-03-21 8:34 ` Michael Olbrich
@ 2014-03-21 8:53 ` Alexander Aring
0 siblings, 0 replies; 9+ messages in thread
From: Alexander Aring @ 2014-03-21 8:53 UTC (permalink / raw)
To: ptxdist
Hi Michael,
On Fri, Mar 21, 2014 at 09:34:24AM +0100, Michael Olbrich wrote:
> On Fri, Mar 21, 2014 at 09:04:22AM +0100, Alexander Aring wrote:
> > Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> > ---
> > rules/libgmp.make | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/rules/libgmp.make b/rules/libgmp.make
> > index cf36ece..6da2010 100644
> > --- a/rules/libgmp.make
> > +++ b/rules/libgmp.make
> > @@ -40,6 +40,7 @@ LIBGMP_AUTOCONF := \
> > $(CROSS_AUTOCONF_USR) \
> > --$(call ptx/endis, PTXCONF_LIBGMP_SHARED)-shared \
> > --$(call ptx/endis, PTXCONF_LIBGMP_STATIC)-static \
> > + --with-gnu-ld \
>
> Is something broken without this?
>
no I just see this always on other rules and ptxdist use normally OSELAS
Toolchain which contains the gnu linker.
I can drop this if you want.
- Alex
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ptxdist] [PATCH 1/4] libgmp: fix issue with missing -fPIC
2014-03-21 8:31 ` [ptxdist] [PATCH 1/4] libgmp: fix issue with missing -fPIC Michael Olbrich
@ 2014-03-21 8:55 ` Alexander Aring
0 siblings, 0 replies; 9+ messages in thread
From: Alexander Aring @ 2014-03-21 8:55 UTC (permalink / raw)
To: ptxdist
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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-03-21 8:55 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-21 8:04 [ptxdist] [PATCH 1/4] libgmp: fix issue with missing -fPIC Alexander Aring
2014-03-21 8:04 ` [ptxdist] [PATCH 2/4] libgmp: add missing with-gnu-ld Alexander Aring
2014-03-21 8:34 ` Michael Olbrich
2014-03-21 8:53 ` Alexander Aring
2014-03-21 8:04 ` [ptxdist] [PATCH 3/4] libgmp: remove targetinstall of static lib Alexander Aring
2014-03-21 8:04 ` [ptxdist] [PATCH 4/4] libgmp: remove LIBGMP_STATIC menu entry Alexander Aring
2014-03-21 8:33 ` Michael Olbrich
2014-03-21 8:31 ` [ptxdist] [PATCH 1/4] libgmp: fix issue with missing -fPIC Michael Olbrich
2014-03-21 8:55 ` Alexander Aring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox