All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/gettext-tiny: fix build of libintl.a
@ 2019-03-31 15:34 Yann E. MORIN
  2019-03-31 18:56 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Yann E. MORIN @ 2019-03-31 15:34 UTC (permalink / raw)
  To: buildroot

Since libintl.a can be pulled in during the build of other shared libs,
it must be compiled with -fPIC, which is what gettext-tiny's Makefile
would do.

Since we provide our own CFLAGS, they override those in the Makefile.

Fix that by ensurign that -fPIC is used when building the static
library.

Fixes:
    http://autobuild.buildroot.org/results/a38/a3800fd4ef2536cc2b82d38ea752baa2b227bc64/

Also, since GETTEXT_TINY_OPTS is used only once and contains a single
definition, get rid of it altogether.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Vadim Kochan <vadim4j@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/gettext-tiny/gettext-tiny.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/gettext-tiny/gettext-tiny.mk b/package/gettext-tiny/gettext-tiny.mk
index 3fe2de30b6..c9052d0d7c 100644
--- a/package/gettext-tiny/gettext-tiny.mk
+++ b/package/gettext-tiny/gettext-tiny.mk
@@ -9,7 +9,6 @@ GETTEXT_TINY_SITE = $(call github,sabotage-linux,gettext-tiny,$(GETTEXT_TINY_VER
 GETTEXT_TINY_LICENSE = MIT, GPL-3.0+ (extra gettext)
 GETTEXT_TINY_INSTALL_STAGING = YES
 GETTEXT_TINY_LICENSE_FILES = LICENSE extra/COPYING
-GETTEXT_TINY_OPTS = LIBINTL=NOOP
 
 GETTEXT_TINY_PROVIDES = gettext
 
@@ -56,7 +55,8 @@ endif
 define HOST_GETTEXT_TINY_BUILD_CMDS
 	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
 		$(HOST_CONFIGURE_OPTS) \
-		$(GETTEXT_TINY_OPTS)
+		CFLAGS="$(HOST_CFLAGS) -fPIC" \
+		LIBINTL=NOOP
 
 	cp $(@D)/extra/gettextize.in $(@D)/gettextize
 
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] package/gettext-tiny: fix build of libintl.a
  2019-03-31 15:34 [Buildroot] [PATCH] package/gettext-tiny: fix build of libintl.a Yann E. MORIN
@ 2019-03-31 18:56 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2019-03-31 18:56 UTC (permalink / raw)
  To: buildroot

On Sun, 31 Mar 2019 17:34:29 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Since libintl.a can be pulled in during the build of other shared libs,
> it must be compiled with -fPIC, which is what gettext-tiny's Makefile
> would do.
> 
> Since we provide our own CFLAGS, they override those in the Makefile.
> 
> Fix that by ensurign that -fPIC is used when building the static
> library.
> 
> Fixes:
>     http://autobuild.buildroot.org/results/a38/a3800fd4ef2536cc2b82d38ea752baa2b227bc64/
> 
> Also, since GETTEXT_TINY_OPTS is used only once and contains a single
> definition, get rid of it altogether.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Vadim Kochan <vadim4j@gmail.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  package/gettext-tiny/gettext-tiny.mk | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-31 18:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-31 15:34 [Buildroot] [PATCH] package/gettext-tiny: fix build of libintl.a Yann E. MORIN
2019-03-31 18:56 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.