[Buildroot] [git commit branch/2023.05.x] package/xfsprogs: fix linking error when -O0 is used
Peter Korsgaard
peter at korsgaard.com
Tue Sep 12 06:26:05 UTC 2023
commit: https://git.buildroot.net/buildroot/commit/?id=e8eecbff45e99720a908ff7870724b9ec09ce871
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2023.05.x
Urcu does not like -O0 it needs gcc optimizations.
Force -O1 in this case. Inspired by package fwts.
The issue got introduced in commit 2f8f69012e0eee7f3e98212fb3da118c211f3c0b:
before this commit, xfsprogs builds fine at -O0, after this commit, it fails
to build at -O0. As this commit went into 2022.02, the fix needs to be
backported to stable branches.
Fixes:
- http://autobuild.buildroot.net/results/3bd/3bd7de784953ab1fa70bf5572eccd7b10e4a0e17
Signed-off-by: Waldemar Brodkorb <wbx at openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
(cherry picked from commit 2bd93a30a60ad224f0ee974878d9d9b5dd1206af)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
package/xfsprogs/xfsprogs.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/xfsprogs/xfsprogs.mk b/package/xfsprogs/xfsprogs.mk
index 695471bddc..09f59a76f4 100644
--- a/package/xfsprogs/xfsprogs.mk
+++ b/package/xfsprogs/xfsprogs.mk
@@ -27,6 +27,10 @@ else
XFSPROGS_CONF_OPTS += --disable-libicu
endif
+ifeq ($(BR2_OPTIMIZE_0),y)
+XFSPROGS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O1"
+endif
+
XFSPROGS_INSTALL_TARGET_OPTS = DIST_ROOT=$(TARGET_DIR) install
$(eval $(autotools-package))
More information about the buildroot
mailing list