Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43940
b: refs/heads/master
c: 347a00f
h: refs/heads/master
v: v3
  • Loading branch information
Roman Zippel authored and Linus Torvalds committed Dec 10, 2006
1 parent 18492c2 commit abdac7c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15964864c051b31df7d2f9101fe8cc47854a0ab8
refs/heads/master: 347a00fb4ad2200f8f8331f8b366b1d84eff577d
19 changes: 12 additions & 7 deletions trunk/scripts/Kbuild.include
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ endef
# gcc support functions
# See documentation in Documentation/kbuild/makefiles.txt

# output directory for tests below
TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)

# as-option
# Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,)

Expand All @@ -66,9 +69,11 @@ as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \
# as-instr
# Usage: cflags-y += $(call as-instr, instr, option1, option2)

as-instr = $(shell if echo -e "$(1)" | $(AS) >/dev/null 2>&1 -W -Z -o astest$$$$.out ; \
then echo "$(2)"; else echo "$(3)"; fi; \
rm -f astest$$$$.out)
as-instr = $(shell if echo -e "$(1)" | \
$(CC) $(AFLAGS) -c -xassembler - \
-o $(TMPOUT)astest$$$$.out > /dev/null 2>&1; \
then rm $(TMPOUT)astest$$$$.out; echo "$(2)"; \
else echo "$(3)"; fi)

# cc-option
# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
Expand Down Expand Up @@ -97,10 +102,10 @@ cc-ifversion = $(shell if [ $(call cc-version, $(CC)) $(1) $(2) ]; then \

# ld-option
# Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both)
ld-option = $(shell if $(CC) $(1) \
-nostdlib -o ldtest$$$$.out -xc /dev/null \
> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi; \
rm -f ldtest$$$$.out)
ld-option = $(shell if $(CC) $(1) -nostdlib -xc /dev/null \
-o $(TMPOUT)ldtest$$$$.out > /dev/null 2>&1; \
then rm $(TMPOUT)ldtest$$$$.out; echo "$(1)"; \
else echo "$(2)"; fi)

###
# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
Expand Down

0 comments on commit abdac7c

Please sign in to comment.