summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndrey Konovalov <andrey.konovalov@linaro.org>2015-06-19 13:13:01 +0300
committerAndrey Konovalov <andrey.konovalov@linaro.org>2015-06-19 13:13:01 +0300
commit8cc81e1a91fb938114c3d81ad92126d0ce2c78e7 (patch)
treefaa78230b7ebdab0354fd21171eb8dd5a7ddaec0 /scripts
parent4e9c53a232d8806ff9ad866216cba3b986dd73d5 (diff)
parent230b22d72454f0b9ed2cf1410771bbba7830f89e (diff)
Automatically merging tracking-llvm into merge-linux-linaro
Conflicting files:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kbuild.include6
-rw-r--r--scripts/Makefile.build14
-rw-r--r--scripts/mod/Makefile8
3 files changed, 21 insertions, 7 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index d3437b82ac2..bd5a3e26a27 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -111,12 +111,12 @@ as-instr = $(call try-run,\
# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
cc-option = $(call try-run,\
- $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2))
+ $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /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_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n)
+ $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n)
# cc-option-align
# Prefix align with either -falign or -malign
@@ -126,7 +126,7 @@ cc-option-align = $(subst -functions=0,,\
# cc-disable-warning
# Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable)
cc-disable-warning = $(call try-run,\
- $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))
+ $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))
# cc-version
cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 01df30af4d4..6ff524dac82 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -174,6 +174,20 @@ cmd_cc_symtypes_c = \
$(obj)/%.symtypes : $(src)/%.c FORCE
$(call cmd,cc_symtypes_c)
+# LLVM bitcode
+# Generate .ll files from .s and .c
+quiet_cmd_cc_ll_c = CC $(quiet_modtag) $@
+ cmd_cc_ll_c = $(CC) $(c_flags) -emit-llvm -S -o $@ $<
+
+$(obj)/%.ll: $(src)/%.c FORCE
+ $(call if_changed_dep,cc_ll_c)
+
+quiet_cmd_as_ll_S = CPP $(quiet_modtag) $@
+ cmd_as_ll_S = $(CPP) $(a_flags) -o $@ $<
+
+$(obj)/%.ll: $(src)/%.S FORCE
+ $(call if_changed_dep,as_ll_S)
+
# C (.c) files
# The C file is compiled and updated dependency information is generated.
# (See cmd_cc_o_c + relevant part of rule_cc_o_c)
diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile
index c11212ff351..86f6b852cd9 100644
--- a/scripts/mod/Makefile
+++ b/scripts/mod/Makefile
@@ -6,10 +6,10 @@ modpost-objs := modpost.o file2alias.o sumversion.o
devicetable-offsets-file := devicetable-offsets.h
define sed-y
- "/^->/{s:->#\(.*\):/* \1 */:; \
- s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \
- s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
- s:->::; p;}"
+ "/^@->/{s:@->#\(.*\):/* \1 */:; \
+ s:^@->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \
+ s:^@->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
+ s:@->::; p;}"
endef
quiet_cmd_offsets = GEN $@