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

Commit 51bece91 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kbuild: introduce utsrelease.h
  kbuild: explicit turn off gcc stack-protector
parents d8cb7c1d 63104eec
Loading
Loading
Loading
Loading
+21 −12
Original line number Diff line number Diff line
@@ -309,6 +309,9 @@ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)

CFLAGS          := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
                   -fno-strict-aliasing -fno-common
# Force gcc to behave correct even for buggy distributions
CFLAGS          += $(call cc-option, -fno-stack-protector-all \
                                     -fno-stack-protector)
AFLAGS          := -D__ASSEMBLY__

# Read KERNELRELEASE from include/config/kernel.release (if it exists)
@@ -809,8 +812,8 @@ endif
# prepare2 creates a makefile if using a separate output directory
prepare2: prepare3 outputmakefile

prepare1: prepare2 include/linux/version.h include/asm \
                   include/config/auto.conf
prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \
                   include/asm include/config/auto.conf
ifneq ($(KBUILD_MODULES),)
	$(Q)mkdir -p $(MODVERDIR)
	$(Q)rm -f $(MODVERDIR)/*
@@ -845,21 +848,26 @@ include/asm:
# needs to be updated, so this check is forced on all builds

uts_len := 64

define filechk_version.h
define filechk_utsrelease.h
	if [ `echo -n "$(KERNELRELEASE)" | wc -c ` -gt $(uts_len) ]; then \
	  echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2;    \
	  exit 1;                                                         \
	fi;                                                               \
	(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; \
	  echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)`; \
	 echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'; \
	)
	(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";)
endef

define filechk_version.h
	(echo \#define LINUX_VERSION_CODE $(shell                             \
	expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL));     \
	echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
endef

include/linux/version.h: $(srctree)/Makefile include/config/kernel.release FORCE
include/linux/version.h: $(srctree)/Makefile FORCE
	$(call filechk,version.h)

include/linux/utsrelease.h: include/config/kernel.release FORCE
	$(call filechk,utsrelease.h)

# ---------------------------------------------------------------------------

PHONY += depend dep
@@ -953,6 +961,7 @@ CLEAN_FILES += vmlinux System.map \
MRPROPER_DIRS  += include/config include2
MRPROPER_FILES += .config .config.old include/asm .version .old_version \
                  include/linux/autoconf.h include/linux/version.h      \
                  include/linux/utsrelease.h                            \
		  Module.symvers tags TAGS cscope*

# clean - Delete most, but leave enough to build external modules
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
 */
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/version.h>
#include <linux/utsrelease.h>
#include <linux/mm.h>

#include <asm/system.h>
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
 */
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/version.h>
#include <linux/utsrelease.h>
#include <linux/mm.h>

#include <asm/system.h>
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
 */
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/version.h>
#include <linux/utsrelease.h>
#include <linux/mm.h>

#include <asm/system.h>
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
 * 2 of the License, or (at your option) any later version.
 */

#include <linux/version.h>
#include <linux/utsrelease.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/delay.h>
Loading