* [Buildroot] [PATCH 0/2] package/libglib2: fix build with NLS on musl/uclibc (branch yem/meson-per-pkg-flags)
@ 2019-06-11 20:55 Yann E. MORIN
2019-06-11 20:55 ` [Buildroot] [PATCH 1/2] infra/pkg-meson: allow packages to expand their CFLAGS/CXXFLAGS/LDFLAGS Yann E. MORIN
2019-06-11 20:55 ` [Buildroot] [PATCH 2/2] package/libglib2: fix NLS build on musl and uclibc Yann E. MORIN
0 siblings, 2 replies; 7+ messages in thread
From: Yann E. MORIN @ 2019-06-11 20:55 UTC (permalink / raw)
To: buildroot
Hello All!
Under musl or uclibc, we need -lintl when NLS is enabled.
Regards,
Yann E. MORIN.
The following changes since commit 04efb17c863606cdbc2405d01c3d48d6868c5245
package/vlc: bump version to 3.0.7 (2019-06-11 00:54:16 +0200)
are available in the git repository at:
git://git.buildroot.org/~ymorin/git/buildroot.git
for you to fetch changes up to 348952c2f966fb8c1ccb5b18418b3a8596925645
package/libglib2: fix NLS build on musl and uclibc (2019-06-11 22:52:30 +0200)
----------------------------------------------------------------
Yann E. MORIN (2):
infra/pkg-meson: allow packages to expand their CFLAGS/CXXFLAGS/LDFLAGS
package/libglib2: fix NLS build on musl and uclibc
package/libglib2/libglib2.mk | 2 ++
package/pkg-meson.mk | 10 +++++++---
2 files changed, 9 insertions(+), 3 deletions(-)
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] infra/pkg-meson: allow packages to expand their CFLAGS/CXXFLAGS/LDFLAGS
2019-06-11 20:55 [Buildroot] [PATCH 0/2] package/libglib2: fix build with NLS on musl/uclibc (branch yem/meson-per-pkg-flags) Yann E. MORIN
@ 2019-06-11 20:55 ` Yann E. MORIN
2019-06-11 20:57 ` Adam Duskett
2019-06-11 21:00 ` Thomas Petazzoni
2019-06-11 20:55 ` [Buildroot] [PATCH 2/2] package/libglib2: fix NLS build on musl and uclibc Yann E. MORIN
1 sibling, 2 replies; 7+ messages in thread
From: Yann E. MORIN @ 2019-06-11 20:55 UTC (permalink / raw)
To: buildroot
Some packages will want to pass extra CFLAGS, CXXFLAGS, or LDFLAGS.
For example, they may want/have to pass $(TARGET_NLS_LIBS), like
libglib2 when the toolchain is based on musl or uClibc (because meson
does not have all the necessary infra internally to properly and reliably
detect the presence of, or need for linking with, -lintl.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Adam Duskett <aduskett@gmail.com>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
package/pkg-meson.mk | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
index 886fcf7205..8512a3559d 100644
--- a/package/pkg-meson.mk
+++ b/package/pkg-meson.mk
@@ -49,6 +49,10 @@ $(2)_CONF_ENV ?=
$(2)_CONF_OPTS ?=
$(2)_NINJA_ENV ?=
+$(2)_CFLAGS ?= $$(TARGET_CFLAGS)
+$(2)_LDFLAGS ?= $$(TARGET_LDFLAGS)
+$(2)_CXXFLAGS ?= $$(TARGET_CXXFLAGS)
+
#
# Configure step. Only define it if not already defined by the package
# .mk file. And take care of the differences between host and target
@@ -67,9 +71,9 @@ define $(2)_CONFIGURE_CMDS
-e "s%@TARGET_ARCH@%$$(HOST_MESON_TARGET_CPU_FAMILY)%g" \
-e "s%@TARGET_CPU@%$$(GCC_TARGET_CPU)%g" \
-e "s%@TARGET_ENDIAN@%$$(call LOWERCASE,$$(BR2_ENDIAN))%g" \
- -e "s%@TARGET_CFLAGS@%$$(HOST_MESON_SED_CFLAGS)%g" \
- -e "s%@TARGET_LDFLAGS@%$$(HOST_MESON_SED_LDFLAGS)%g" \
- -e "s%@TARGET_CXXFLAGS@%$$(HOST_MESON_SED_CXXFLAGS)%g" \
+ -e "s%@TARGET_CFLAGS@%$$(if $$($(2)_CFLAGS),`printf '"%s"$$(comma) ' $$($(2)_CFLAGS)`)%g" \
+ -e "s%@TARGET_LDFLAGS@%$$(if $$($(2)_LDFLAGS),`printf '"%s"$$(comma) ' $$($(2)_LDFLAGS)`)%g" \
+ -e "s%@TARGET_CXXFLAGS@%$$(if $$($(2)_CXXFLAGS),`printf '"%s"$$(comma) ' $$($(2)_CXXFLAGS)`)%g" \
-e "s%@HOST_DIR@%$$(HOST_DIR)%g" \
package/meson/cross-compilation.conf.in \
> $$($$(PKG)_SRCDIR)/build/cross-compilation.conf
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] package/libglib2: fix NLS build on musl and uclibc
2019-06-11 20:55 [Buildroot] [PATCH 0/2] package/libglib2: fix build with NLS on musl/uclibc (branch yem/meson-per-pkg-flags) Yann E. MORIN
2019-06-11 20:55 ` [Buildroot] [PATCH 1/2] infra/pkg-meson: allow packages to expand their CFLAGS/CXXFLAGS/LDFLAGS Yann E. MORIN
@ 2019-06-11 20:55 ` Yann E. MORIN
2019-06-11 20:57 ` Adam Duskett
1 sibling, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2019-06-11 20:55 UTC (permalink / raw)
To: buildroot
libglib2 uses a very crude and error-prone way to detect the intl
functions, which basically fails when the C library is not glibc.
Now that a meson pacakge can specify its LDFLAGS, use that to pass the
infrastructure-provided TARGET_NLS_LIBS to link with.
Fixes:
http://autobuild.buildroot.org/results/f0d/f0d85d76786343d767fba9c7c5c01f042ecfc018/
[...]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Adam Duskett <aduskett@gmail.com>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/libglib2/libglib2.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index 78d6e5ab32..04f747cec7 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -31,6 +31,8 @@ LIBGLIB2_DEPENDENCIES = \
host-pkgconf host-libglib2 \
libffi pcre util-linux zlib $(TARGET_NLS_DEPENDENCIES)
+LIBGLIB2_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)
+
HOST_LIBGLIB2_DEPENDENCIES = \
host-gettext \
host-libffi \
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] package/libglib2: fix NLS build on musl and uclibc
2019-06-11 20:55 ` [Buildroot] [PATCH 2/2] package/libglib2: fix NLS build on musl and uclibc Yann E. MORIN
@ 2019-06-11 20:57 ` Adam Duskett
0 siblings, 0 replies; 7+ messages in thread
From: Adam Duskett @ 2019-06-11 20:57 UTC (permalink / raw)
To: buildroot
All;
Acked-by: Adam Duskett <aduskett@gmail.com>
On Tue, Jun 11, 2019 at 4:55 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> libglib2 uses a very crude and error-prone way to detect the intl
> functions, which basically fails when the C library is not glibc.
>
> Now that a meson pacakge can specify its LDFLAGS, use that to pass the
> infrastructure-provided TARGET_NLS_LIBS to link with.
>
> Fixes:
> http://autobuild.buildroot.org/results/f0d/f0d85d76786343d767fba9c7c5c01f042ecfc018/
> [...]
>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Adam Duskett <aduskett@gmail.com>
> Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/libglib2/libglib2.mk | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
> index 78d6e5ab32..04f747cec7 100644
> --- a/package/libglib2/libglib2.mk
> +++ b/package/libglib2/libglib2.mk
> @@ -31,6 +31,8 @@ LIBGLIB2_DEPENDENCIES = \
> host-pkgconf host-libglib2 \
> libffi pcre util-linux zlib $(TARGET_NLS_DEPENDENCIES)
>
> +LIBGLIB2_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)
> +
> HOST_LIBGLIB2_DEPENDENCIES = \
> host-gettext \
> host-libffi \
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] infra/pkg-meson: allow packages to expand their CFLAGS/CXXFLAGS/LDFLAGS
2019-06-11 20:55 ` [Buildroot] [PATCH 1/2] infra/pkg-meson: allow packages to expand their CFLAGS/CXXFLAGS/LDFLAGS Yann E. MORIN
@ 2019-06-11 20:57 ` Adam Duskett
2019-06-11 21:00 ` Thomas Petazzoni
1 sibling, 0 replies; 7+ messages in thread
From: Adam Duskett @ 2019-06-11 20:57 UTC (permalink / raw)
To: buildroot
Acked-by: Adam Duskett <aduskett@gmail.com>
On Tue, Jun 11, 2019 at 4:55 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> Some packages will want to pass extra CFLAGS, CXXFLAGS, or LDFLAGS.
> For example, they may want/have to pass $(TARGET_NLS_LIBS), like
> libglib2 when the toolchain is based on musl or uClibc (because meson
> does not have all the necessary infra internally to properly and reliably
> detect the presence of, or need for linking with, -lintl.
>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Adam Duskett <aduskett@gmail.com>
> Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> ---
> package/pkg-meson.mk | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
> index 886fcf7205..8512a3559d 100644
> --- a/package/pkg-meson.mk
> +++ b/package/pkg-meson.mk
> @@ -49,6 +49,10 @@ $(2)_CONF_ENV ?=
> $(2)_CONF_OPTS ?=
> $(2)_NINJA_ENV ?=
>
> +$(2)_CFLAGS ?= $$(TARGET_CFLAGS)
> +$(2)_LDFLAGS ?= $$(TARGET_LDFLAGS)
> +$(2)_CXXFLAGS ?= $$(TARGET_CXXFLAGS)
> +
> #
> # Configure step. Only define it if not already defined by the package
> # .mk file. And take care of the differences between host and target
> @@ -67,9 +71,9 @@ define $(2)_CONFIGURE_CMDS
> -e "s%@TARGET_ARCH@%$$(HOST_MESON_TARGET_CPU_FAMILY)%g" \
> -e "s%@TARGET_CPU@%$$(GCC_TARGET_CPU)%g" \
> -e "s%@TARGET_ENDIAN@%$$(call LOWERCASE,$$(BR2_ENDIAN))%g" \
> - -e "s%@TARGET_CFLAGS@%$$(HOST_MESON_SED_CFLAGS)%g" \
> - -e "s%@TARGET_LDFLAGS@%$$(HOST_MESON_SED_LDFLAGS)%g" \
> - -e "s%@TARGET_CXXFLAGS@%$$(HOST_MESON_SED_CXXFLAGS)%g" \
> + -e "s%@TARGET_CFLAGS@%$$(if $$($(2)_CFLAGS),`printf '"%s"$$(comma) ' $$($(2)_CFLAGS)`)%g" \
> + -e "s%@TARGET_LDFLAGS@%$$(if $$($(2)_LDFLAGS),`printf '"%s"$$(comma) ' $$($(2)_LDFLAGS)`)%g" \
> + -e "s%@TARGET_CXXFLAGS@%$$(if $$($(2)_CXXFLAGS),`printf '"%s"$$(comma) ' $$($(2)_CXXFLAGS)`)%g" \
> -e "s%@HOST_DIR@%$$(HOST_DIR)%g" \
> package/meson/cross-compilation.conf.in \
> > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] infra/pkg-meson: allow packages to expand their CFLAGS/CXXFLAGS/LDFLAGS
2019-06-11 20:55 ` [Buildroot] [PATCH 1/2] infra/pkg-meson: allow packages to expand their CFLAGS/CXXFLAGS/LDFLAGS Yann E. MORIN
2019-06-11 20:57 ` Adam Duskett
@ 2019-06-11 21:00 ` Thomas Petazzoni
2019-06-12 15:46 ` Yann E. MORIN
1 sibling, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2019-06-11 21:00 UTC (permalink / raw)
To: buildroot
On Tue, 11 Jun 2019 22:55:43 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> Some packages will want to pass extra CFLAGS, CXXFLAGS, or LDFLAGS.
> For example, they may want/have to pass $(TARGET_NLS_LIBS), like
> libglib2 when the toolchain is based on musl or uClibc (because meson
> does not have all the necessary infra internally to properly and reliably
> detect the presence of, or need for linking with, -lintl.
>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Adam Duskett <aduskett@gmail.com>
> Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
This looks highly similar to
http://patchwork.ozlabs.org/patch/1089760/, which seems more complete.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] infra/pkg-meson: allow packages to expand their CFLAGS/CXXFLAGS/LDFLAGS
2019-06-11 21:00 ` Thomas Petazzoni
@ 2019-06-12 15:46 ` Yann E. MORIN
0 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2019-06-12 15:46 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2019-06-11 23:00 +0200, Thomas Petazzoni spake thusly:
> On Tue, 11 Jun 2019 22:55:43 +0200
> "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> > Some packages will want to pass extra CFLAGS, CXXFLAGS, or LDFLAGS.
> > For example, they may want/have to pass $(TARGET_NLS_LIBS), like
> > libglib2 when the toolchain is based on musl or uClibc (because meson
> > does not have all the necessary infra internally to properly and reliably
> > detect the presence of, or need for linking with, -lintl.
> >
> > Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> > Cc: Adam Duskett <aduskett@gmail.com>
> > Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
>
> This looks highly similar to
> http://patchwork.ozlabs.org/patch/1089760/, which seems more complete.
Hmm. It indeed looks to achieve the same goal, I'll look into it in more
details shortly.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-06-12 15:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11 20:55 [Buildroot] [PATCH 0/2] package/libglib2: fix build with NLS on musl/uclibc (branch yem/meson-per-pkg-flags) Yann E. MORIN
2019-06-11 20:55 ` [Buildroot] [PATCH 1/2] infra/pkg-meson: allow packages to expand their CFLAGS/CXXFLAGS/LDFLAGS Yann E. MORIN
2019-06-11 20:57 ` Adam Duskett
2019-06-11 21:00 ` Thomas Petazzoni
2019-06-12 15:46 ` Yann E. MORIN
2019-06-11 20:55 ` [Buildroot] [PATCH 2/2] package/libglib2: fix NLS build on musl and uclibc Yann E. MORIN
2019-06-11 20:57 ` Adam Duskett
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.