From e1a2b5c8d495c28fe5faddc8b655740af6f3d69f Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Mon, 21 Feb 2022 11:23:38 +0100 Subject: [PATCH] pc: build lx_emul and linux driver code with -O2 Ref genodelabs/genode#4416 --- repos/pc/lib/import/import-pc_lx_emul.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repos/pc/lib/import/import-pc_lx_emul.mk b/repos/pc/lib/import/import-pc_lx_emul.mk index b89a294b8d..6e7d071a9c 100644 --- a/repos/pc/lib/import/import-pc_lx_emul.mk +++ b/repos/pc/lib/import/import-pc_lx_emul.mk @@ -131,6 +131,9 @@ CC_C_OPT += -Wno-packed-not-aligned CC_C_OPT += -Wno-discarded-qualifiers CC_C_OPT += -Wno-format +# avoid link errors whenever the build config's CC_OLEVEL is set to -O0 +override CC_OLEVEL := -O2 + LX_SRC = $(shell grep ".*\.c" $(PRG_DIR)/source.list) SRC_S += $(shell grep ".*\.S" $(PRG_DIR)/source.list) SRC_C += $(LX_SRC)