aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-07 18:56:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-07 18:56:10 -0400
commitd43b7167d4c74137f9a6c61fdcead127d60357f9 (patch)
tree21661650720837e3f5ed8f8c5ded4c9b91a10e83 /scripts
parent80b810b276cf89587cdaa103e39027813b1be46c (diff)
parentb1e0d8b70fa31821ebca3965f2ef8619d7c5e316 (diff)
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild fixes from Michal Marek: "Here are two fixes I intended to send after v3.6-rc7, but failed to do so. So please pull them for v3.7-rc1 and they will be picked up by stable. The first one fixes gcc -x <language> syntax in various build-time tests, which icecream and possible other gcc wrappers did not understand (and yes, icecream is going to be fixed as well). The second one fixes make tar-pkg so that unpacking the tarball does not replace the /lib -> /usr/lib symlink on recent Fedora releases." * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: Fix gcc -x syntax kbuild: Do not package /boot and /lib in make tar-pkg
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kbuild.include12
-rw-r--r--scripts/Makefile.fwinst4
-rw-r--r--scripts/gcc-version.sh6
-rw-r--r--scripts/gcc-x86_32-has-stack-protector.sh2
-rw-r--r--scripts/gcc-x86_64-has-stack-protector.sh2
-rwxr-xr-xscripts/kconfig/check.sh2
-rw-r--r--scripts/kconfig/lxdialog/check-lxdialog.sh2
-rw-r--r--scripts/package/buildtar2
8 files changed, 16 insertions, 16 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index afa44595f348..978416dd31ca 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -98,24 +98,24 @@ try-run = $(shell set -e; \
98# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) 98# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
99 99
100as-option = $(call try-run,\ 100as-option = $(call try-run,\
101 $(CC) $(KBUILD_CFLAGS) $(1) -c -xassembler /dev/null -o "$$TMP",$(1),$(2)) 101 $(CC) $(KBUILD_CFLAGS) $(1) -c -x assembler /dev/null -o "$$TMP",$(1),$(2))
102 102
103# as-instr 103# as-instr
104# Usage: cflags-y += $(call as-instr,instr,option1,option2) 104# Usage: cflags-y += $(call as-instr,instr,option1,option2)
105 105
106as-instr = $(call try-run,\ 106as-instr = $(call try-run,\
107 printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3)) 107 printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3))
108 108
109# cc-option 109# cc-option
110# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) 110# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
111 111
112cc-option = $(call try-run,\ 112cc-option = $(call try-run,\
113 $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2)) 113 $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2))
114 114
115# cc-option-yn 115# cc-option-yn
116# Usage: flag := $(call cc-option-yn,-march=winchip-c6) 116# Usage: flag := $(call cc-option-yn,-march=winchip-c6)
117cc-option-yn = $(call try-run,\ 117cc-option-yn = $(call try-run,\
118 $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n) 118 $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n)
119 119
120# cc-option-align 120# cc-option-align
121# Prefix align with either -falign or -malign 121# Prefix align with either -falign or -malign
@@ -125,7 +125,7 @@ cc-option-align = $(subst -functions=0,,\
125# cc-disable-warning 125# cc-disable-warning
126# Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable) 126# Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable)
127cc-disable-warning = $(call try-run,\ 127cc-disable-warning = $(call try-run,\
128 $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -xc /dev/null -o "$$TMP",-Wno-$(strip $(1))) 128 $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))
129 129
130# cc-version 130# cc-version
131# Usage gcc-ver := $(call cc-version) 131# Usage gcc-ver := $(call cc-version)
@@ -143,7 +143,7 @@ cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3))
143# cc-ldoption 143# cc-ldoption
144# Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both) 144# Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both)
145cc-ldoption = $(call try-run,\ 145cc-ldoption = $(call try-run,\
146 $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2)) 146 $(CC) $(1) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2))
147 147
148# ld-option 148# ld-option
149# Usage: LDFLAGS += $(call ld-option, -X) 149# Usage: LDFLAGS += $(call ld-option, -X)
diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst
index 4d908d16c035..c3f69ae275d1 100644
--- a/scripts/Makefile.fwinst
+++ b/scripts/Makefile.fwinst
@@ -27,7 +27,7 @@ endif
27installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw)) 27installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw))
28 28
29installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all)) 29installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all))
30installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/./ 30installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/.
31 31
32# Workaround for make < 3.81, where .SECONDEXPANSION doesn't work. 32# Workaround for make < 3.81, where .SECONDEXPANSION doesn't work.
33PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs 33PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs
@@ -42,7 +42,7 @@ quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@)
42$(installed-fw-dirs): 42$(installed-fw-dirs):
43 $(call cmd,mkdir) 43 $(call cmd,mkdir)
44 44
45$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %) 45$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $$(dir $(INSTALL_FW_PATH)/%)
46 $(call cmd,install) 46 $(call cmd,install)
47 47
48PHONY += __fw_install __fw_modinst FORCE 48PHONY += __fw_install __fw_modinst FORCE
diff --git a/scripts/gcc-version.sh b/scripts/gcc-version.sh
index debecb5561c4..7f2126df91f2 100644
--- a/scripts/gcc-version.sh
+++ b/scripts/gcc-version.sh
@@ -22,10 +22,10 @@ if [ ${#compiler} -eq 0 ]; then
22 exit 1 22 exit 1
23fi 23fi
24 24
25MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1) 25MAJOR=$(echo __GNUC__ | $compiler -E -x c - | tail -n 1)
26MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1) 26MINOR=$(echo __GNUC_MINOR__ | $compiler -E -x c - | tail -n 1)
27if [ "x$with_patchlevel" != "x" ] ; then 27if [ "x$with_patchlevel" != "x" ] ; then
28 PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -xc - | tail -n 1) 28 PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -x c - | tail -n 1)
29 printf "%02d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL 29 printf "%02d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL
30else 30else
31 printf "%02d%02d\\n" $MAJOR $MINOR 31 printf "%02d%02d\\n" $MAJOR $MINOR
diff --git a/scripts/gcc-x86_32-has-stack-protector.sh b/scripts/gcc-x86_32-has-stack-protector.sh
index 29493dc4528d..12dbd0b11ea4 100644
--- a/scripts/gcc-x86_32-has-stack-protector.sh
+++ b/scripts/gcc-x86_32-has-stack-protector.sh
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2 2
3echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs" 3echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
4if [ "$?" -eq "0" ] ; then 4if [ "$?" -eq "0" ] ; then
5 echo y 5 echo y
6else 6else
diff --git a/scripts/gcc-x86_64-has-stack-protector.sh b/scripts/gcc-x86_64-has-stack-protector.sh
index afaec618b395..973e8c141567 100644
--- a/scripts/gcc-x86_64-has-stack-protector.sh
+++ b/scripts/gcc-x86_64-has-stack-protector.sh
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2 2
3echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs" 3echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
4if [ "$?" -eq "0" ] ; then 4if [ "$?" -eq "0" ] ; then
5 echo y 5 echo y
6else 6else
diff --git a/scripts/kconfig/check.sh b/scripts/kconfig/check.sh
index fa59cbf9d62c..854d9c7c675c 100755
--- a/scripts/kconfig/check.sh
+++ b/scripts/kconfig/check.sh
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2# Needed for systems without gettext 2# Needed for systems without gettext
3$* -xc -o /dev/null - > /dev/null 2>&1 << EOF 3$* -x c -o /dev/null - > /dev/null 2>&1 << EOF
4#include <libintl.h> 4#include <libintl.h>
5int main() 5int main()
6{ 6{
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
index e3b12c010417..c8e8a7154753 100644
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -38,7 +38,7 @@ trap "rm -f $tmp" 0 1 2 3 15
38 38
39# Check if we can link to ncurses 39# Check if we can link to ncurses
40check() { 40check() {
41 $cc -xc - -o $tmp 2>/dev/null <<'EOF' 41 $cc -x c - -o $tmp 2>/dev/null <<'EOF'
42#include CURSES_LOC 42#include CURSES_LOC
43main() {} 43main() {}
44EOF 44EOF
diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index 8a7b15598ea9..d0d748e72915 100644
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -109,7 +109,7 @@ esac
109 if tar --owner=root --group=root --help >/dev/null 2>&1; then 109 if tar --owner=root --group=root --help >/dev/null 2>&1; then
110 opts="--owner=root --group=root" 110 opts="--owner=root --group=root"
111 fi 111 fi
112 tar cf - . $opts | ${compress} > "${tarball}${file_ext}" 112 tar cf - boot/* lib/* $opts | ${compress} > "${tarball}${file_ext}"
113) 113)
114 114
115echo "Tarball successfully created in ${tarball}${file_ext}" 115echo "Tarball successfully created in ${tarball}${file_ext}"