diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-14 16:46:33 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-14 16:46:33 -0400 |
| commit | a2bc8dea9e96872e16248884367ad0013e040089 (patch) | |
| tree | 6da6f9d4be2e201934f9e88380709628b5176850 /scripts | |
| parent | dff4d1f6fe85627b7ce8e4c5291d8621a1995605 (diff) | |
| parent | 77780f799e66cd261746a281dbbef1ee0c6997cd (diff) | |
Merge tag 'kbuild-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada:
- Use Make-builtin $(abspath ...) helper to get absolute path
- Add W=2 extra warning option to detect unused macros
- Use more KCONFIG_CONFIG instead hard-coded .config
- Fix bugs of tar*-pkg targets
* tag 'kbuild-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kbuild: buildtar: do not print successful message if tar returns error
kbuild: buildtar: fix tar error when CONFIG_MODULES is disabled
kbuild: Use KCONFIG_CONFIG in buildtar
Kbuild: enable -Wunused-macros warning for "make W=2"
kbuild: use $(abspath ...) instead of $(shell cd ... && /bin/pwd)
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Makefile.extrawarn | 1 | ||||
| -rw-r--r-- | scripts/gdb/linux/Makefile | 2 | ||||
| -rwxr-xr-x | scripts/package/buildtar | 36 |
3 files changed, 19 insertions, 20 deletions
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index fb3522fd8702..ae8a1357d01d 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn | |||
| @@ -37,6 +37,7 @@ warning-2 += $(call cc-option, -Wlogical-op) | |||
| 37 | warning-2 += $(call cc-option, -Wmissing-field-initializers) | 37 | warning-2 += $(call cc-option, -Wmissing-field-initializers) |
| 38 | warning-2 += $(call cc-option, -Wsign-compare) | 38 | warning-2 += $(call cc-option, -Wsign-compare) |
| 39 | warning-2 += $(call cc-option, -Wmaybe-uninitialized) | 39 | warning-2 += $(call cc-option, -Wmaybe-uninitialized) |
| 40 | warning-2 += $(call cc-option, -Wunused-macros) | ||
| 40 | 41 | ||
| 41 | warning-3 := -Wbad-function-cast | 42 | warning-3 := -Wbad-function-cast |
| 42 | warning-3 += -Wcast-qual | 43 | warning-3 += -Wcast-qual |
diff --git a/scripts/gdb/linux/Makefile b/scripts/gdb/linux/Makefile index 8b00031f5349..ab3cfe727a4e 100644 --- a/scripts/gdb/linux/Makefile +++ b/scripts/gdb/linux/Makefile | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | always := gdb-scripts | 1 | always := gdb-scripts |
| 2 | 2 | ||
| 3 | SRCTREE := $(shell cd $(srctree) && /bin/pwd) | 3 | SRCTREE := $(abspath $(srctree)) |
| 4 | 4 | ||
| 5 | $(obj)/gdb-scripts: | 5 | $(obj)/gdb-scripts: |
| 6 | ifneq ($(KBUILD_SRC),) | 6 | ifneq ($(KBUILD_SRC),) |
diff --git a/scripts/package/buildtar b/scripts/package/buildtar index e046bff33589..51f947118256 100755 --- a/scripts/package/buildtar +++ b/scripts/package/buildtar | |||
| @@ -24,20 +24,19 @@ tarball="${objtree}/linux-${KERNELRELEASE}-${ARCH}.tar" | |||
| 24 | # | 24 | # |
| 25 | case "${1}" in | 25 | case "${1}" in |
| 26 | tar-pkg) | 26 | tar-pkg) |
| 27 | compress="cat" | 27 | opts= |
| 28 | file_ext="" | ||
| 29 | ;; | 28 | ;; |
| 30 | targz-pkg) | 29 | targz-pkg) |
| 31 | compress="gzip" | 30 | opts=--gzip |
| 32 | file_ext=".gz" | 31 | tarball=${tarball}.gz |
| 33 | ;; | 32 | ;; |
| 34 | tarbz2-pkg) | 33 | tarbz2-pkg) |
| 35 | compress="bzip2" | 34 | opts=--bzip2 |
| 36 | file_ext=".bz2" | 35 | tarball=${tarball}.bz2 |
| 37 | ;; | 36 | ;; |
| 38 | tarxz-pkg) | 37 | tarxz-pkg) |
| 39 | compress="xz" | 38 | opts=--xz |
| 40 | file_ext=".xz" | 39 | tarball=${tarball}.xz |
| 41 | ;; | 40 | ;; |
| 42 | *) | 41 | *) |
| 43 | echo "Unknown tarball target \"${1}\" requested, please add it to ${0}." >&2 | 42 | echo "Unknown tarball target \"${1}\" requested, please add it to ${0}." >&2 |
| @@ -51,13 +50,14 @@ esac | |||
| 51 | # | 50 | # |
| 52 | rm -rf -- "${tmpdir}" | 51 | rm -rf -- "${tmpdir}" |
| 53 | mkdir -p -- "${tmpdir}/boot" | 52 | mkdir -p -- "${tmpdir}/boot" |
| 54 | 53 | dirs=boot | |
| 55 | 54 | ||
| 56 | # | 55 | # |
| 57 | # Try to install modules | 56 | # Try to install modules |
| 58 | # | 57 | # |
| 59 | if grep -q '^CONFIG_MODULES=y' "${objtree}/.config"; then | 58 | if grep -q '^CONFIG_MODULES=y' "${KCONFIG_CONFIG}"; then |
| 60 | make ARCH="${ARCH}" O="${objtree}" KBUILD_SRC= INSTALL_MOD_PATH="${tmpdir}" modules_install | 59 | make ARCH="${ARCH}" O="${objtree}" KBUILD_SRC= INSTALL_MOD_PATH="${tmpdir}" modules_install |
| 60 | dirs="$dirs lib" | ||
| 61 | fi | 61 | fi |
| 62 | 62 | ||
| 63 | 63 | ||
| @@ -65,7 +65,7 @@ fi | |||
| 65 | # Install basic kernel files | 65 | # Install basic kernel files |
| 66 | # | 66 | # |
| 67 | cp -v -- "${objtree}/System.map" "${tmpdir}/boot/System.map-${KERNELRELEASE}" | 67 | cp -v -- "${objtree}/System.map" "${tmpdir}/boot/System.map-${KERNELRELEASE}" |
| 68 | cp -v -- "${objtree}/.config" "${tmpdir}/boot/config-${KERNELRELEASE}" | 68 | cp -v -- "${KCONFIG_CONFIG}" "${tmpdir}/boot/config-${KERNELRELEASE}" |
| 69 | cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}" | 69 | cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}" |
| 70 | 70 | ||
| 71 | 71 | ||
| @@ -124,14 +124,12 @@ esac | |||
| 124 | # | 124 | # |
| 125 | # Create the tarball | 125 | # Create the tarball |
| 126 | # | 126 | # |
| 127 | ( | 127 | if tar --owner=root --group=root --help >/dev/null 2>&1; then |
| 128 | opts= | 128 | opts="$opts --owner=root --group=root" |
| 129 | if tar --owner=root --group=root --help >/dev/null 2>&1; then | 129 | fi |
| 130 | opts="--owner=root --group=root" | 130 | |
| 131 | fi | 131 | tar cf $tarball -C $tmpdir $opts $dirs |
| 132 | tar cf - -C "$tmpdir" boot/ lib/ $opts | ${compress} > "${tarball}${file_ext}" | ||
| 133 | ) | ||
| 134 | 132 | ||
| 135 | echo "Tarball successfully created in ${tarball}${file_ext}" | 133 | echo "Tarball successfully created in $tarball" |
| 136 | 134 | ||
| 137 | exit 0 | 135 | exit 0 |
