Skip to content

Commit

Permalink
kbuild: fix cc-option and cc-option-yn
Browse files Browse the repository at this point in the history
David Sanders wrote:

> I'm getting this error:
> as: unrecognized option `-mtune=generic32'
> I have binutils 2.17.

Use -c instead of -S in cc-option and cc-option-yn, so we can probe
options related to the assembler.

Signed-off-by: H. Peter Anvin <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: kbuild devel <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
H. Peter Anvin committed Sep 9, 2008
1 parent 82a28c7 commit 43789e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/Kbuild.include
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,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) -S -xc /dev/null -o "$$TMP",$(1),$(2))
$(CC) $(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) -S -xc /dev/null -o "$$TMP",y,n)
$(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n)

# cc-option-align
# Prefix align with either -falign or -malign
Expand Down

0 comments on commit 43789e2

Please sign in to comment.