X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=Makefile.compiler;h=7aa1fbc4aafef69327bf3b0ca51a80c1d46492a0;hb=6a1ae0e91b7f17d272f346f6200c89073ea2ce4f;hp=3d8adfd34af1baf9e9155af660cdafa708000612;hpb=0206d42daf4c4bd3bbcfa15a2bef34319524db49;p=bcachefs-tools-debian diff --git a/Makefile.compiler b/Makefile.compiler index 3d8adfd..7aa1fbc 100644 --- a/Makefile.compiler +++ b/Makefile.compiler @@ -29,16 +29,16 @@ try-run = $(shell set -e; \ fi) # as-option -# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) +# Usage: aflags-y += $(call as-option,-Wa$(comma)-isa=foo,) as-option = $(call try-run,\ - $(CC) $(KBUILD_CFLAGS) $(1) -c -x assembler /dev/null -o "$$TMP",$(1),$(2)) + $(CC) -Werror $(KBUILD_AFLAGS) $(1) -c -x assembler-with-cpp /dev/null -o "$$TMP",$(1),$(2)) # as-instr -# Usage: cflags-y += $(call as-instr,instr,option1,option2) +# Usage: aflags-y += $(call as-instr,instr,option1,option2) as-instr = $(call try-run,\ - printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3)) + printf "%b\n" "$(1)" | $(CC) -Werror $(KBUILD_AFLAGS) -c -x assembler-with-cpp -o "$$TMP" -,$(2),$(3)) # __cc-option # Usage: MY_CFLAGS += $(call __cc-option,$(CC),$(MY_CFLAGS),-march=winchip-c6,-march=i586)