From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/libnss: fix build failure due to HW PPC Crypto bug
Date: Tue, 31 Dec 2019 18:07:36 +0100 [thread overview]
Message-ID: <20191231180736.09a5add2@windsurf> (raw)
In-Reply-To: <20191227165427.107111-1-giulio.benetti@benettiengineering.com>
On Fri, 27 Dec 2019 17:54:27 +0100
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> diff --git a/package/libnss/0005-Bug-1606119-Fix-PPC-HW-Crypto-build-failure.patch b/package/libnss/0005-Bug-1606119-Fix-PPC-HW-Crypto-build-failure.patch
> new file mode 100644
> index 0000000000..0b891b5ebc
> --- /dev/null
> +++ b/package/libnss/0005-Bug-1606119-Fix-PPC-HW-Crypto-build-failure.patch
> @@ -0,0 +1,37 @@
> +From 09b3776a924736049693a118d5a8d883e8c794ca Mon Sep 17 00:00:00 2001
> +From: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +Date: Fri, 27 Dec 2019 17:41:04 +0100
> +Subject: [PATCH] Bug 1606119 - Fix PPC HW Crypto build failure
> +
> +Only Big Endian Altivec functions are used, not Little Endian ones, so
> +let's change check if USE_PPC_CRYPTO by changing to IS_BIG_ENDIAN
> +instead of IS_LITTLE_ENDIAN.
> +
> +Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
I don't understand the reasoning here. From a quick look, the undefined
symbols reported in the build log come from the file
./nss/lib/freebl/gcm-ppc.c.
This file is included in the build in nss/lib/freebl/Makefile if
CPU_ARCH=ppc.
However CPU_ARCH=ppc is only set in nss/coreconf/Linux.mk as follows:
ifeq (,$(filter-out ppc64 ppc64le,$(OS_TEST)))
CPU_ARCH = ppc
ifeq ($(USE_64),1)
ARCHFLAG = -m64
endif
In libnss.mk, we pass OS_TEST=$(LIBNSS_ARCH), which basically is the
value of $(BR2_ARCH), which is powerpc64 or powerpc64le in Buildroot.
So, regardless of whether we are big endian PPC64 or little endian
PPC64, the gcm-ppc.c file will not be included in the build.
Am I missing something ? Could you explain a bit better how you came to
the conclusion you have in this patch ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2019-12-31 17:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-27 16:54 [Buildroot] [PATCH] package/libnss: fix build failure due to HW PPC Crypto bug Giulio Benetti
2019-12-27 17:05 ` Giulio Benetti
2019-12-31 17:07 ` Thomas Petazzoni [this message]
2019-12-31 21:24 ` Giulio Benetti
2019-12-31 22:49 ` Vincent Fazio
2019-12-31 23:31 ` Vincent Fazio
2019-12-31 23:44 ` Giulio Benetti
2020-01-01 8:47 ` Yann E. MORIN
2020-01-01 15:32 ` Thomas Petazzoni
2020-01-01 16:51 ` Giulio Benetti
2020-01-01 16:58 ` [Buildroot] [PATCH v2] " Giulio Benetti
2020-01-01 18:41 ` Yann E. MORIN
2020-01-02 9:06 ` Thomas Petazzoni
2020-01-02 17:19 ` Giulio Benetti
2020-01-02 22:07 ` Giulio Benetti
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=20191231180736.09a5add2@windsurf \
--to=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox