diff mbox series

[dunfell,14/15] lz4: use CFLAGS from bitbake

Message ID 24b9da1a2332dd1dbc80006e36af693ed1161ee3.1699714834.git.steve@sakoman.com
State Accepted, archived
Commit af571c0841265dfa4bd87546080e499336a37fcc
Headers show
Series [dunfell,01/15] kexec-tools: Ignore Fedora/RedHat specific CVE-2021-20269 | expand

Commit Message

Steve Sakoman Nov. 11, 2023, 3:03 p.m. UTC
From: Mikko Rapeli <mikko.rapeli@bmw.de>

Currently lz4 uses it's own defaults which include O3 optimization.
Switch from O3 to bitbake default O2 reduces binary package size
from 467056 to 331888 bytes. Enables also building with Os if needed.

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit abaaf8c6bcd368728d298937a9406eb2aebc7a7d)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/recipes-support/lz4/lz4_1.9.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Khem Raj Nov. 11, 2023, 4:28 p.m. UTC | #1
On Sat, Nov 11, 2023 at 7:03 AM Steve Sakoman <steve@sakoman.com> wrote:
>
> From: Mikko Rapeli <mikko.rapeli@bmw.de>
>
> Currently lz4 uses it's own defaults which include O3 optimization.
> Switch from O3 to bitbake default O2 reduces binary package size
> from 467056 to 331888 bytes. Enables also building with Os if needed.
>
diverging away from package defaults means treading a less travelled
path and prone to errors
this could be the reason for the reproducibility problem that Steve
sent a patch for.
how does it impact runtime performance ?

> Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> (cherry picked from commit abaaf8c6bcd368728d298937a9406eb2aebc7a7d)
> Signed-off-by: Steve Sakoman <steve@sakoman.com>
> ---
>  meta/recipes-support/lz4/lz4_1.9.2.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-support/lz4/lz4_1.9.2.bb b/meta/recipes-support/lz4/lz4_1.9.2.bb
> index 0c4a0ac807..c2e24b518c 100644
> --- a/meta/recipes-support/lz4/lz4_1.9.2.bb
> +++ b/meta/recipes-support/lz4/lz4_1.9.2.bb
> @@ -23,7 +23,7 @@ S = "${WORKDIR}/git"
>  # Fixed in r118, which is larger than the current version.
>  CVE_CHECK_WHITELIST += "CVE-2014-4715"
>
> -EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no"
> +EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no"
>
>  do_install() {
>         oe_runmake install
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#190429): https://lists.openembedded.org/g/openembedded-core/message/190429
> Mute This Topic: https://lists.openembedded.org/mt/102526883/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-support/lz4/lz4_1.9.2.bb b/meta/recipes-support/lz4/lz4_1.9.2.bb
index 0c4a0ac807..c2e24b518c 100644
--- a/meta/recipes-support/lz4/lz4_1.9.2.bb
+++ b/meta/recipes-support/lz4/lz4_1.9.2.bb
@@ -23,7 +23,7 @@  S = "${WORKDIR}/git"
 # Fixed in r118, which is larger than the current version.
 CVE_CHECK_WHITELIST += "CVE-2014-4715"
 
-EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no"
+EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no"
 
 do_install() {
 	oe_runmake install