]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - scripts/Kbuild.include
kbuild: fix cc1 options check to ensure we do not use -fPIC when compiling
[karo-tx-linux.git] / scripts / Kbuild.include
index b3452601b0b1303f81bb93a8cdb3c36f43e1c775..4f9c1908593bce72b1572d0a3efb95fd3f22f36f 100644 (file)
@@ -106,12 +106,12 @@ as-instr = $(call try-run,\
 # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
 
 cc-option = $(call try-run,\
-       $(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2))
+       $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2))
 
 # cc-option-yn
 # Usage: flag := $(call cc-option-yn,-march=winchip-c6)
 cc-option-yn = $(call try-run,\
-       $(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n)
+       $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n)
 
 # cc-option-align
 # Prefix align with either -falign or -malign