* [Buildroot] [PATCH 1/1] package/gcc: disable libmpx for gcc6-based musl builds
@ 2016-10-22 22:04 Bernd Kuhls
2016-10-23 12:50 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2016-10-22 22:04 UTC (permalink / raw)
To: buildroot
Building this minimal defconfig
BR2_TOOLCHAIN_BUILDROOT_MUSL=y
BR2_GCC_VERSION_6_X=y
fails:
In file included from ../../../../libmpx/mpxrt/mpxrt.c:54:0:
../../../../libmpx/mpxrt/mpxrt.c: In function 'read_mpx_status_sig':
../../../../libmpx/mpxrt/mpxrt.h:52:42: error: invalid application of
'sizeof' to incomplete type 'struct _libc_fpstate'
#define XSAVE_OFFSET_IN_FPMEM sizeof (struct _libc_fpstate)
To fix disable libmpx for musl builds, other projects did the same:
https://github.com/crosstool-ng/crosstool-ng/commit/3ec2211548a853203e070af6810f49825ec46a6a
http://git.alpinelinux.org/cgit/aports/commit/main/gcc/APKBUILD?id=1830e485126ea9a95d763317fb0c508c1ff297d2
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
package/gcc/gcc.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index c971151..464e4c9 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -116,6 +116,11 @@ ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y)
HOST_GCC_COMMON_CONF_OPTS += --disable-libitm
endif
+# libmpx uses secure_getenv and struct _libc_fpstate not present in musl
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_MUSL)$(BR2_TOOLCHAIN_GCC_AT_LEAST_6),yy)
+HOST_GCC_COMMON_CONF_OPTS += --disable-libmpx
+endif
+
# quadmath support requires wchar
ifeq ($(BR2_USE_WCHAR)$(BR2_TOOLCHAIN_HAS_LIBQUADMATH),yy)
HOST_GCC_COMMON_CONF_OPTS += --enable-libquadmath
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH 1/1] package/gcc: disable libmpx for gcc6-based musl builds
2016-10-22 22:04 [Buildroot] [PATCH 1/1] package/gcc: disable libmpx for gcc6-based musl builds Bernd Kuhls
@ 2016-10-23 12:50 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-10-23 12:50 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 23 Oct 2016 00:04:22 +0200, Bernd Kuhls wrote:
> Building this minimal defconfig
>
> BR2_TOOLCHAIN_BUILDROOT_MUSL=y
> BR2_GCC_VERSION_6_X=y
>
> fails:
>
> In file included from ../../../../libmpx/mpxrt/mpxrt.c:54:0:
> ../../../../libmpx/mpxrt/mpxrt.c: In function 'read_mpx_status_sig':
> ../../../../libmpx/mpxrt/mpxrt.h:52:42: error: invalid application of
> 'sizeof' to incomplete type 'struct _libc_fpstate'
> #define XSAVE_OFFSET_IN_FPMEM sizeof (struct _libc_fpstate)
>
> To fix disable libmpx for musl builds, other projects did the same:
>
> https://github.com/crosstool-ng/crosstool-ng/commit/3ec2211548a853203e070af6810f49825ec46a6a
> http://git.alpinelinux.org/cgit/aports/commit/main/gcc/APKBUILD?id=1830e485126ea9a95d763317fb0c508c1ff297d2
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> package/gcc/gcc.mk | 5 +++++
> 1 file changed, 5 insertions(+)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-23 12:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-22 22:04 [Buildroot] [PATCH 1/1] package/gcc: disable libmpx for gcc6-based musl builds Bernd Kuhls
2016-10-23 12:50 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox