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
This commit is contained in:
@@ -98,24 +98,24 @@ try-run = $(shell set -e; \
|
||||
# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
|
||||
|
||||
as-option = $(call try-run,\
|
||||
$(CC) $(KBUILD_CFLAGS) $(1) -c -xassembler /dev/null -o "$$TMP",$(1),$(2))
|
||||
$(CC) $(KBUILD_CFLAGS) $(1) -c -x assembler /dev/null -o "$$TMP",$(1),$(2))
|
||||
|
||||
# as-instr
|
||||
# Usage: cflags-y += $(call as-instr,instr,option1,option2)
|
||||
|
||||
as-instr = $(call try-run,\
|
||||
printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3))
|
||||
printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3))
|
||||
|
||||
# cc-option
|
||||
# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
|
||||
|
||||
cc-option = $(call try-run,\
|
||||
$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2))
|
||||
$(CC) $(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 -xc /dev/null -o "$$TMP",y,n)
|
||||
$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n)
|
||||
|
||||
# cc-option-align
|
||||
# Prefix align with either -falign or -malign
|
||||
@@ -125,7 +125,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 -xc /dev/null -o "$$TMP",-Wno-$(strip $(1)))
|
||||
$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))
|
||||
|
||||
# cc-version
|
||||
# Usage gcc-ver := $(call cc-version)
|
||||
@@ -143,7 +143,7 @@ cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3))
|
||||
# cc-ldoption
|
||||
# Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both)
|
||||
cc-ldoption = $(call try-run,\
|
||||
$(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2))
|
||||
$(CC) $(1) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2))
|
||||
|
||||
# ld-option
|
||||
# Usage: LDFLAGS += $(call ld-option, -X)
|
||||
|
@@ -27,7 +27,7 @@ endif
|
||||
installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw))
|
||||
|
||||
installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all))
|
||||
installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/./
|
||||
installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/.
|
||||
|
||||
# Workaround for make < 3.81, where .SECONDEXPANSION doesn't work.
|
||||
PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs
|
||||
@@ -42,7 +42,7 @@ quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@)
|
||||
$(installed-fw-dirs):
|
||||
$(call cmd,mkdir)
|
||||
|
||||
$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %)
|
||||
$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $$(dir $(INSTALL_FW_PATH)/%)
|
||||
$(call cmd,install)
|
||||
|
||||
PHONY += __fw_install __fw_modinst FORCE
|
||||
|
@@ -22,10 +22,10 @@ if [ ${#compiler} -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1)
|
||||
MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1)
|
||||
MAJOR=$(echo __GNUC__ | $compiler -E -x c - | tail -n 1)
|
||||
MINOR=$(echo __GNUC_MINOR__ | $compiler -E -x c - | tail -n 1)
|
||||
if [ "x$with_patchlevel" != "x" ] ; then
|
||||
PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -xc - | tail -n 1)
|
||||
PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -x c - | tail -n 1)
|
||||
printf "%02d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL
|
||||
else
|
||||
printf "%02d%02d\\n" $MAJOR $MINOR
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
|
||||
echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
|
||||
if [ "$?" -eq "0" ] ; then
|
||||
echo y
|
||||
else
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
|
||||
echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
|
||||
if [ "$?" -eq "0" ] ; then
|
||||
echo y
|
||||
else
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Needed for systems without gettext
|
||||
$* -xc -o /dev/null - > /dev/null 2>&1 << EOF
|
||||
$* -x c -o /dev/null - > /dev/null 2>&1 << EOF
|
||||
#include <libintl.h>
|
||||
int main()
|
||||
{
|
||||
|
@@ -38,7 +38,7 @@ trap "rm -f $tmp" 0 1 2 3 15
|
||||
|
||||
# Check if we can link to ncurses
|
||||
check() {
|
||||
$cc -xc - -o $tmp 2>/dev/null <<'EOF'
|
||||
$cc -x c - -o $tmp 2>/dev/null <<'EOF'
|
||||
#include CURSES_LOC
|
||||
main() {}
|
||||
EOF
|
||||
|
@@ -109,7 +109,7 @@ esac
|
||||
if tar --owner=root --group=root --help >/dev/null 2>&1; then
|
||||
opts="--owner=root --group=root"
|
||||
fi
|
||||
tar cf - . $opts | ${compress} > "${tarball}${file_ext}"
|
||||
tar cf - boot/* lib/* $opts | ${compress} > "${tarball}${file_ext}"
|
||||
)
|
||||
|
||||
echo "Tarball successfully created in ${tarball}${file_ext}"
|
||||
|
Reference in New Issue
Block a user