diff mbox series

glibc: build: honor toplevel BR2_TARGET_OPTIMIZATION

Message ID 20240214224355.551010-1-vineetg@rivosinc.com
State Superseded
Headers show
Series glibc: build: honor toplevel BR2_TARGET_OPTIMIZATION | expand

Commit Message

Vineet Gupta Feb. 14, 2024, 10:43 p.m. UTC
glibc though part of toolchain is technically target binary and thus
needs to be built with BR2_TARGET_OPTIMIZATION in case users want to
force a certain build toogle from top level.

Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
---
 package/glibc/glibc.mk | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
index d198d6f04cb2..72031907c252 100644
--- a/package/glibc/glibc.mk
+++ b/package/glibc/glibc.mk
@@ -80,6 +80,9 @@  GLIBC_INSTALL_STAGING = YES
 
 GLIBC_INSTALL_STAGING_OPTS = install_root=$(STAGING_DIR) install
 
+# Seed with any special toggles user may have setup in config
+GLIBC_EXTRA_CFLAGS = $(BR2_TARGET_OPTIMIZATION)
+
 # Thumb build is broken, build in ARM mode
 ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
 GLIBC_EXTRA_CFLAGS += -marm