All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vadim Kochan <vadim4j@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] infra/Makefile.in: Fix format_arg issues after bump gettext-tiny to c6dcdcd
Date: Fri,  5 Apr 2019 01:47:00 +0300	[thread overview]
Message-ID: <20190404224700.1346-1-vadim4j@gmail.com> (raw)

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

             reply	other threads:[~2019-04-04 22:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 22:47 Vadim Kochan [this message]
2019-04-04 23:05 ` [Buildroot] [PATCH 1/1] infra/Makefile.in: Fix format_arg issues after bump gettext-tiny to c6dcdcd 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190404224700.1346-1-vadim4j@gmail.com \
    --to=vadim4j@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.