summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-07-03 00:58:12 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2015-07-03 00:58:12 +0300
commite965b8ce4215ac2b22b23ffc8a8dfbae964b9496 (patch)
tree9f7d23f14655c214d4e1f54760a841df2c987459 /scripts
parenta95cb3cd55c208372ca68d5e8a9923611fed7235 (diff)
parent50ab9a69275dca588cb5ad5038657f069bbdeb56 (diff)
downloadlinux-e965b8ce4215ac2b22b23ffc8a8dfbae964b9496.tar.xz
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild updates from Michal Marek: "Just a few kbuild core commits this time: - kallsyms fix for CONFIG_XIP_KERNEL - bashisms in scripts/link-vmlinux.sh fixed - workaround to make DEBUG_INFO_REDUCED more useful yet still space efficient - clang is not wrongly detected when cross-compiling" * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: include core debug info when DEBUG_INFO_REDUCED scripts: link-vmlinux: Don't pass page offset to kallsyms if XIP Kernel scripts: fix link-vmlinux.sh bash-ism Makefile: Fix detection of clang when cross-compiling
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/link-vmlinux.sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 86a4fe75f453..1a10d8ac8162 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -82,7 +82,7 @@ kallsyms()
kallsymopt="${kallsymopt} --all-symbols"
fi
- if [ -n "${CONFIG_ARM}" ] && [ -n "${CONFIG_PAGE_OFFSET}" ]; then
+ if [ -n "${CONFIG_ARM}" ] && [ -z "${CONFIG_XIP_KERNEL}" ] && [ -n "${CONFIG_PAGE_OFFSET}" ]; then
kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET"
fi
@@ -111,7 +111,6 @@ sortextable()
}
# Delete output files in case of error
-trap cleanup SIGHUP SIGINT SIGQUIT SIGTERM ERR
cleanup()
{
rm -f .old_version
@@ -124,6 +123,20 @@ cleanup()
rm -f vmlinux.o
}
+on_exit()
+{
+ if [ $? -ne 0 ]; then
+ cleanup
+ fi
+}
+trap on_exit EXIT
+
+on_signals()
+{
+ exit 1
+}
+trap on_signals HUP INT QUIT TERM
+
#
#
# Use "make V=1" to debug this script
@@ -231,7 +244,6 @@ if [ -n "${CONFIG_KALLSYMS}" ]; then
if ! cmp -s System.map .tmp_System.map; then
echo >&2 Inconsistent kallsyms data
echo >&2 Try "make KALLSYMS_EXTRA_PASS=1" as a workaround
- cleanup
exit 1
fi
fi