[Buildroot] [PATCH 03/27] package/libnss: use correct CFLAGS and LDFLAGS
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Wed Jun 19 12:33:32 UTC 2019
Hello,
On Fri, 14 Jun 2019 23:03:22 +0200
Giulio Benetti <giulio.benetti at micronovasrl.com> wrote:
> +# Need to pass down TARGET_CFLAGS and TARGET_LDFLAGS
> +define LIBNSS_FIXUP_LINUX_MK
> + echo 'OS_CFLAGS += ${TARGET_CFLAGS}' >> $(@D)/nss/coreconf/Linux.mk
> + echo 'LDFLAGS += ${TARGET_LDFLAGS}' >> $(@D)/nss/coreconf/Linux.mk
You should use $(...) and not ${...} to reference make variables.
But beyond that, this commit unfortunately breaks the build:
pqg.c: In function ‘PQG_VerifyParams’:
pqg.c:1806:27: error: ‘type’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if ((vfy->h.len == 1) && (type != FIPS186_1_TYPE)) {
^
In file included from pqg.c:21:0:
secmpi.h:8:8: error: ‘hashtype’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (SECSuccess != (rv = func)) \
^
pqg.c:1624:19: note: ‘hashtype’ was declared here
HASH_HashType hashtype;
^
cc1: all warnings being treated as errors
And the reason why is because in a BR2_OPTIMIZE_S=y build (the
default), we pass -Os. This -Os is now correctly passed to libnss, but
this is what causes the build failure. Indeed, at -Os, gcc gets those
build failures, but not at -O2.
Could you have a look into this ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the buildroot
mailing list