* [Buildroot] [PATCH] libnss: add build workaround for older gcc versions
@ 2016-01-06 14:18 Gustavo Zacarias
2016-01-06 14:54 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Gustavo Zacarias @ 2016-01-06 14:18 UTC (permalink / raw)
To: buildroot
nss uses some #pragma directives that require newish (>= 4.6) versions
of gcc, so disable Werror when building with older versions to avoid the
build from breaking unfairly.
However make this a gcc >= 4.8 conditional since the kludge is called so
(NSS_NO_GCC48) and other bits might depend upon it.
Upstream bug https://bugzilla.mozilla.org/show_bug.cgi?id=1226179
Fixes:
http://autobuild.buildroot.net/results/ebd/ebd0647eb1eef41a7fb6e5f5bab18d4d12168661/
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/libnss/libnss.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk
index 10879e2..6fdb77c 100644
--- a/package/libnss/libnss.mk
+++ b/package/libnss/libnss.mk
@@ -30,6 +30,12 @@ LIBNSS_BUILD_VARS = \
OS_RELEASE="2.6" \
OS_TEST="$(ARCH)"
+# #pragma usage needs gcc >= 4.8
+# See https://bugzilla.mozilla.org/show_bug.cgi?id=1226179
+ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8),)
+LIBNSS_BUILD_VARS += NSS_ENABLE_WERROR=0
+endif
+
ifeq ($(BR2_ARCH_IS_64),y)
# MIPS64 n32 is treated as a 32-bit architecture by libnss.
# See: https://bugzilla.mozilla.org/show_bug.cgi?id=1010730
--
2.4.10
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] libnss: add build workaround for older gcc versions
2016-01-06 14:18 [Buildroot] [PATCH] libnss: add build workaround for older gcc versions Gustavo Zacarias
@ 2016-01-06 14:54 ` Thomas Petazzoni
2016-01-06 14:56 ` Gustavo Zacarias
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2016-01-06 14:54 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 6 Jan 2016 11:18:54 -0300, Gustavo Zacarias wrote:
> nss uses some #pragma directives that require newish (>= 4.6) versions
> of gcc, so disable Werror when building with older versions to avoid the
> build from breaking unfairly.
> However make this a gcc >= 4.8 conditional since the kludge is called so
> (NSS_NO_GCC48) and other bits might depend upon it.
Here you say the kludge is called NSS_NO_GCC48, but...
> +# #pragma usage needs gcc >= 4.8
> +# See https://bugzilla.mozilla.org/show_bug.cgi?id=1226179
> +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8),)
> +LIBNSS_BUILD_VARS += NSS_ENABLE_WERROR=0
> +endif
here you use NSS_ENABLE_WERROR.
Is it me misunderstanding your commit message?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] libnss: add build workaround for older gcc versions
2016-01-06 14:54 ` Thomas Petazzoni
@ 2016-01-06 14:56 ` Gustavo Zacarias
0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Zacarias @ 2016-01-06 14:56 UTC (permalink / raw)
To: buildroot
On 06/01/16 11:54, Thomas Petazzoni wrote:
> Hello,
>
> On Wed, 6 Jan 2016 11:18:54 -0300, Gustavo Zacarias wrote:
>> nss uses some #pragma directives that require newish (>= 4.6) versions
>> of gcc, so disable Werror when building with older versions to avoid the
>> build from breaking unfairly.
>> However make this a gcc >= 4.8 conditional since the kludge is called so
>> (NSS_NO_GCC48) and other bits might depend upon it.
>
> Here you say the kludge is called NSS_NO_GCC48, but...
>
>> +# #pragma usage needs gcc >= 4.8
>> +# See https://bugzilla.mozilla.org/show_bug.cgi?id=1226179
>> +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8),)
>> +LIBNSS_BUILD_VARS += NSS_ENABLE_WERROR=0
>> +endif
>
> here you use NSS_ENABLE_WERROR.
>
> Is it me misunderstanding your commit message?
Hi.
Well, maybe i wasn't clear.
The public kludge is NSS_ENABLE_WERROR, which triggers are build define
NSS_NO_GCC48 (which is what we're interested in), but however we can't
def that directly from the outside, hence we use NSS_ENABLE_WERROR=0
(which sets the other one).
Regards.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-06 14:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-06 14:18 [Buildroot] [PATCH] libnss: add build workaround for older gcc versions Gustavo Zacarias
2016-01-06 14:54 ` Thomas Petazzoni
2016-01-06 14:56 ` Gustavo Zacarias
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.