]> xenbits.xensource.com Git - people/andrewcoop/xen-test-framework.git/commitdiff
build: Move -nostdinc from COMMON_CFLAGS to COMMON_FLAGS
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 5 Jan 2023 01:17:27 +0000 (01:17 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 11 Jan 2023 01:03:19 +0000 (01:03 +0000)
It needs to find its way into COMMON_AFLAGS too.

Also fix a latent bug introduced at the same time.  PRIx32 is used by
PSE_PRIpte.

Fixes: 8e3394a51e08 ("Drop dependency on gcc-multilib")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
build/common.mk
include/inttypes.h

index df41fcc3e6a4363830ad1a9145544614d0ce1d6b..42d4c77dd6807dfc712dd2ec0b9b763119c743a1 100644 (file)
@@ -17,7 +17,7 @@ $(foreach env,$(64BIT_ENVIRONMENTS),$(eval $(env)_arch := x86_64))
 
 comma := ,
 
-COMMON_FLAGS := -pipe -I$(ROOT)/include -I$(ROOT)/arch/x86/include -MMD -MP
+COMMON_FLAGS := -pipe -nostdinc -I$(ROOT)/include -I$(ROOT)/arch/x86/include -MMD -MP
 
 cc-option = $(shell if [ -z "`echo 'int p=1;' | $(CC) $(1) -c -o /dev/null -x c - 2>&1`" ]; \
                        then echo y; else echo n; fi)
@@ -36,7 +36,7 @@ COMMON_AFLAGS := $(COMMON_FLAGS) $(COMMON_AFLAGS-y) -D__ASSEMBLY__
 COMMON_CFLAGS := $(COMMON_FLAGS) $(COMMON_CFLAGS-y)
 COMMON_CFLAGS += -Wall -Wextra -Werror -std=gnu99 -Wstrict-prototypes -O3 -g
 COMMON_CFLAGS += -fno-common -fno-asynchronous-unwind-tables -fno-strict-aliasing
-COMMON_CFLAGS += -fno-stack-protector -fno-pic -ffreestanding -nostdinc
+COMMON_CFLAGS += -fno-stack-protector -fno-pic -ffreestanding
 COMMON_CFLAGS += -mno-red-zone -mno-sse
 COMMON_CFLAGS += -Wno-unused-parameter -Winline
 
index 565fe9e93261a1edacfb4fdaa0f007ec98ee493c..a06513dae67a7b143de9abc406760a15e292c326 100644 (file)
 # define __PRIPTR
 #endif
 
+#define PRId32              "d"
+#define PRIx32              "x"
+#define PRIo32              "o"
+#define PRIu32              "u"
+
 #define PRId64     __PRI64  "d"
 #define PRIx64     __PRI64  "x"
 #define PRIo64     __PRI64  "o"