Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25d59158 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: revert "save ARCH & CROSS_COMPILE ..."
  warn about use of uninstalled kernel headers
  kbuild: mkcompile_h: trivial cleanups
  kbuild: fix warning when domainname is not available
  kbuild: Fix size_append issue for bzip2/lzma kernel
  kbuild,scripts: use non-builtin echo for '-e'
  kbuild: fix the binrpm-pkg target to work with KBUILD_OUTPUT set
parents 86ae13b0 2331d1a6
Loading
Loading
Loading
Loading
+2 −44
Original line number Diff line number Diff line
@@ -179,46 +179,9 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
# Alternatively CROSS_COMPILE can be set in the environment.
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
#
# To force ARCH and CROSS_COMPILE settings include kernel.* files
# in the kernel tree - do not patch this file.
export KBUILD_BUILDHOST := $(SUBARCH)

# Kbuild save the ARCH and CROSS_COMPILE setting in kernel.* files.
# Restore these settings and check that user did not specify
# conflicting values.

saved_arch  := $(shell cat include/generated/kernel.arch  2> /dev/null)
saved_cross := $(shell cat include/generated/kernel.cross 2> /dev/null)

ifneq ($(CROSS_COMPILE),)
        ifneq ($(saved_cross),)
                ifneq ($(CROSS_COMPILE),$(saved_cross))
                        $(error CROSS_COMPILE changed from \
                                "$(saved_cross)" to \
                                 to "$(CROSS_COMPILE)". \
                                 Use "make mrproper" to fix it up)
                endif
        endif
else
    CROSS_COMPILE := $(saved_cross)
endif

ifneq ($(ARCH),)
        ifneq ($(saved_arch),)
                ifneq ($(saved_arch),$(ARCH))
                        $(error ARCH changed from \
                                "$(saved_arch)" to "$(ARCH)". \
                                 Use "make mrproper" to fix it up)
                endif
        endif
else
        ifneq ($(saved_arch),)
                ARCH := $(saved_arch)
        else
                ARCH := $(SUBARCH)
        endif
endif
ARCH		?= $(SUBARCH)
CROSS_COMPILE	?=

# Architecture as present in compile.h
UTS_MACHINE 	:= $(ARCH)
@@ -483,11 +446,6 @@ ifeq ($(config-targets),1)
include $(srctree)/arch/$(SRCARCH)/Makefile
export KBUILD_DEFCONFIG KBUILD_KCONFIG

# save ARCH & CROSS_COMPILE settings
$(shell mkdir -p include/generated &&                            \
        echo $(ARCH)          > include/generated/kernel.arch && \
        echo $(CROSS_COMPILE) > include/generated/kernel.cross)

config: scripts_basic outputmakefile FORCE
	$(Q)mkdir -p include/linux include/config
	$(Q)$(MAKE) $(build)=scripts/kconfig $@
+6 −0
Original line number Diff line number Diff line
@@ -659,6 +659,12 @@ extern int do_sysinfo(struct sysinfo *info);

#endif /* __KERNEL__ */

#ifndef __EXPORTED_HEADERS__
#ifndef __KERNEL__
#warning Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders
#endif /* __KERNEL__ */
#endif /* __EXPORTED_HEADERS__ */

#define SI_LOAD_SHIFT	16
struct sysinfo {
	long uptime;			/* Seconds since boot */
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ as-option = $(call try-run,\
# Usage: cflags-y += $(call as-instr,instr,option1,option2)

as-instr = $(call try-run,\
	echo -e "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3))
	/bin/echo -e "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3))

# cc-option
# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
+1 −1
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \

# Bzip2 and LZMA do not include size in file... so we have to fake that;
# append the size as a 32-bit littleendian number as gzip does.
size_append = echo -ne $(shell						\
size_append = /bin/echo -ne $(shell					\
dec_size=0;								\
for F in $1; do								\
	fsize=$$(stat -c "%s" $$F);					\
+2 −2
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ paths="$@"
# Doing this once at the beginning saves a lot of time, on a cache-hot tree.
Kconfigs="`find . -name 'Kconfig' -o -name 'Kconfig*[^~]'`"

echo -e "File list \tundefined symbol used"
/bin/echo -e "File list \tundefined symbol used"
find $paths -name '*.[chS]' -o -name 'Makefile' -o -name 'Makefile*[^~]'| while read i
do
	# Output the bare Kconfig variable and the filename; the _MODULE part at
@@ -54,6 +54,6 @@ while read symb files; do
	# beyond the purpose of this script.
	symb_bare=`echo $symb | sed -e 's/_MODULE//'`
	if ! grep -q "\<$symb_bare\>" $Kconfigs; then
		echo -e "$files: \t$symb"
		/bin/echo -e "$files: \t$symb"
	fi
done|sort
Loading