All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] infra/Makefile.in: Fix format_arg issues after bump gettext-tiny to c6dcdcd
@ 2019-04-04 22:47 Vadim Kochan
  2019-04-04 23:05 ` Vadim Kochan
  0 siblings, 1 reply; 6+ messages in thread
From: Vadim Kochan @ 2019-04-04 22:47 UTC (permalink / raw)
  To: buildroot

After bump gettext-tiny to c6dcdcd there was change which enabled
gettext's macroses by default in:

    https://github.com/sabotage-linux/gettext-tiny/commit/58187329ad9f00eb8c39379e7ee0b608dd14bab8

it leads libglib2 to fail with format_arg issues. So fix it by disabling
these macroses and use rather external functions which requires linking.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
---
I dont feel like this is a good solution actually. I need to clearly understand
why just using gettext's macrosses does not work for libglib2. But anyway I am
sending this patch to show the possible solution.

 package/Makefile.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/Makefile.in b/package/Makefile.in
index dc818a2c18..c719d39235 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -159,6 +159,9 @@ TARGET_HARDENED += -D_FORTIFY_SOURCE=2
 endif
 
 TARGET_CPPFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
+TARGET_CPPFLAGS += -DLIBINTL_NO_MACROS=1
+endif
 TARGET_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) $(TARGET_HARDENED)
 TARGET_CXXFLAGS = $(TARGET_CFLAGS)
 TARGET_FCFLAGS = $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)
@@ -220,6 +223,9 @@ UNZIP := $(shell which unzip || type -p unzip) -q
 APPLY_PATCHES = PATH=$(HOST_DIR)/bin:$$PATH support/scripts/apply-patches.sh $(if $(QUIET),-s)
 
 HOST_CPPFLAGS  = -I$(HOST_DIR)/include
+ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
+HOST_CPPFLAGS += -DLIBINTL_NO_MACROS=1
+endif
 HOST_CFLAGS   ?= -O2
 HOST_CFLAGS   += $(HOST_CPPFLAGS)
 HOST_CXXFLAGS += $(HOST_CFLAGS)
-- 
2.14.1

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

end of thread, other threads:[~2019-04-07  7:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-04 22:47 [Buildroot] [PATCH 1/1] infra/Makefile.in: Fix format_arg issues after bump gettext-tiny to c6dcdcd Vadim Kochan
2019-04-04 23:05 ` Vadim Kochan
2019-04-06 20:53   ` Yann E. MORIN
2019-04-06 21:05     ` Yann E. MORIN
2019-04-06 21:24       ` Vadim Kochan
2019-04-07  7:01         ` Yann E. MORIN

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.