History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: kbuild: introduce utsrelease.h kbuild: explicit turn off gcc stack-protector

Linus Torvalds committed 20 years ago

Commit 51bece92 parents d8cb7c1 63104ee14 files · +36 −27Browse files

Unified · Split

14 files
  1. Makefile +21 −12
  2. arch/alpha/boot/bootp.c +1 −1
  3. arch/alpha/boot/bootpz.c +1 −1
  4. arch/alpha/boot/main.c +1 −1
  5. arch/frv/kernel/setup.c +1 −1
  6. arch/i386/boot/setup.S +1 −1
  7. arch/powerpc/platforms/chrp/setup.c +1 −1
  8. arch/powerpc/platforms/powermac/bootx_init.c +1 −1
  9. arch/ppc/syslib/btext.c +1 −1
  10. arch/x86_64/boot/setup.S +1 −1
  11. drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c +1 −1
  12. include/linux/vermagic.h +1 −1
  13. init/version.c +1 −0
  14. scripts/checkversion.pl +3 −4
Makefile+21−12
@@ -309,6 +309,9 @@ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) · 308 unmodified lines
309 309
310CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \310CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
311 -fno-strict-aliasing -fno-common311 -fno-strict-aliasing -fno-common
312# Force gcc to behave correct even for buggy distributions
313CFLAGS += $(call cc-option, -fno-stack-protector-all \
314 -fno-stack-protector)
312AFLAGS := -D__ASSEMBLY__315AFLAGS := -D__ASSEMBLY__
313 316
314# Read KERNELRELEASE from include/config/kernel.release (if it exists)317# Read KERNELRELEASE from include/config/kernel.release (if it exists)
@@ -809,8 +812,8 @@ endif · 494 unmodified lines
809# prepare2 creates a makefile if using a separate output directory812# prepare2 creates a makefile if using a separate output directory
810prepare2: prepare3 outputmakefile813prepare2: prepare3 outputmakefile
811 814
812prepare1: prepare2 include/linux/version.h include/asm \815prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \
813 include/config/auto.conf816 include/asm include/config/auto.conf
814ifneq ($(KBUILD_MODULES),)817ifneq ($(KBUILD_MODULES),)
815 $(Q)mkdir -p $(MODVERDIR)818 $(Q)mkdir -p $(MODVERDIR)
816 $(Q)rm -f $(MODVERDIR)/*819 $(Q)rm -f $(MODVERDIR)/*
@@ -845,21 +848,26 @@ include/asm: · 28 unmodified lines
845# needs to be updated, so this check is forced on all builds848# needs to be updated, so this check is forced on all builds
846 849
847uts_len := 64850uts_len := 64
851define filechk_utsrelease.h
852 if [ `echo -n "$(KERNELRELEASE)" | wc -c ` -gt $(uts_len) ]; then \
853 echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \
854 exit 1; \
855 fi; \
856 (echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";)
857endef
848 858
849define filechk_version.h859define filechk_version.h
850 if [ `echo -n "$(KERNELRELEASE)" | wc -c ` -gt $(uts_len) ]; then \860 (echo \#define LINUX_VERSION_CODE $(shell \
851 echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \861 expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL)); \
852 exit 1; \862 echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
853 fi; \
854 (echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; \
855 echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)`; \
856 echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'; \
857 )
858endef863endef
859 864
860include/linux/version.h: $(srctree)/Makefile include/config/kernel.release FORCE865include/linux/version.h: $(srctree)/Makefile FORCE
861 $(call filechk,version.h)866 $(call filechk,version.h)
862 867
868include/linux/utsrelease.h: include/config/kernel.release FORCE
869 $(call filechk,utsrelease.h)
870
863# ---------------------------------------------------------------------------871# ---------------------------------------------------------------------------
864 872
865PHONY += depend dep873PHONY += depend dep
@@ -952,7 +960,8 @@ CLEAN_FILES += vmlinux System.map \ · 86 unmodified lines
952# Directories & files removed with 'make mrproper'960# Directories & files removed with 'make mrproper'
953MRPROPER_DIRS += include/config include2961MRPROPER_DIRS += include/config include2
954MRPROPER_FILES += .config .config.old include/asm .version .old_version \962MRPROPER_FILES += .config .config.old include/asm .version .old_version \
955 include/linux/autoconf.h include/linux/version.h \963 include/linux/autoconf.h include/linux/version.h \
964 include/linux/utsrelease.h \
956 Module.symvers tags TAGS cscope*965 Module.symvers tags TAGS cscope*
957 966
958# clean - Delete most, but leave enough to build external modules967# clean - Delete most, but leave enough to build external modules
arch/alpha/boot/bootp.c+1−1
@@ -9,7 +9,7 @@ · 8 unmodified lines
9 */9 */
10#include <linux/kernel.h>10#include <linux/kernel.h>
11#include <linux/string.h>11#include <linux/string.h>
12#include <linux/version.h>12#include <linux/utsrelease.h>
13#include <linux/mm.h>13#include <linux/mm.h>
14 14
15#include <asm/system.h>15#include <asm/system.h>
arch/alpha/boot/bootpz.c+1−1
@@ -11,7 +11,7 @@ · 10 unmodified lines
11 */11 */
12#include <linux/kernel.h>12#include <linux/kernel.h>
13#include <linux/string.h>13#include <linux/string.h>
14#include <linux/version.h>14#include <linux/utsrelease.h>
15#include <linux/mm.h>15#include <linux/mm.h>
16 16
17#include <asm/system.h>17#include <asm/system.h>
arch/alpha/boot/main.c+1−1
@@ -7,7 +7,7 @@ · 6 unmodified lines
7 */7 */
8#include <linux/kernel.h>8#include <linux/kernel.h>
9#include <linux/string.h>9#include <linux/string.h>
10#include <linux/version.h>10#include <linux/utsrelease.h>
11#include <linux/mm.h>11#include <linux/mm.h>
12 12
13#include <asm/system.h>13#include <asm/system.h>
arch/frv/kernel/setup.c+1−1
@@ -10,7 +10,7 @@ · 9 unmodified lines
10 * 2 of the License, or (at your option) any later version.10 * 2 of the License, or (at your option) any later version.
11 */11 */
12 12
13#include <linux/version.h>13#include <linux/utsrelease.h>
14#include <linux/kernel.h>14#include <linux/kernel.h>
15#include <linux/sched.h>15#include <linux/sched.h>
16#include <linux/delay.h>16#include <linux/delay.h>
arch/i386/boot/setup.S+1−1
@@ -47,7 +47,7 @@ · 46 unmodified lines
47 */47 */
48 48
49#include <asm/segment.h>49#include <asm/segment.h>
50#include <linux/version.h>50#include <linux/utsrelease.h>
51#include <linux/compile.h>51#include <linux/compile.h>
52#include <asm/boot.h>52#include <asm/boot.h>
53#include <asm/e820.h>53#include <asm/e820.h>
arch/powerpc/platforms/chrp/setup.c+1−1
@@ -24,7 +24,7 @@ · 23 unmodified lines
24#include <linux/reboot.h>24#include <linux/reboot.h>
25#include <linux/init.h>25#include <linux/init.h>
26#include <linux/pci.h>26#include <linux/pci.h>
27#include <linux/version.h>27#include <linux/utsrelease.h>
28#include <linux/adb.h>28#include <linux/adb.h>
29#include <linux/module.h>29#include <linux/module.h>
30#include <linux/delay.h>30#include <linux/delay.h>
arch/powerpc/platforms/powermac/bootx_init.c+1−1
@@ -12,7 +12,7 @@ · 11 unmodified lines
12#include <linux/kernel.h>12#include <linux/kernel.h>
13#include <linux/string.h>13#include <linux/string.h>
14#include <linux/init.h>14#include <linux/init.h>
15#include <linux/version.h>15#include <linux/utsrelease.h>
16#include <asm/sections.h>16#include <asm/sections.h>
17#include <asm/prom.h>17#include <asm/prom.h>
18#include <asm/page.h>18#include <asm/page.h>
arch/ppc/syslib/btext.c+1−1
@@ -6,7 +6,7 @@ · 5 unmodified lines
6#include <linux/kernel.h>6#include <linux/kernel.h>
7#include <linux/string.h>7#include <linux/string.h>
8#include <linux/init.h>8#include <linux/init.h>
9#include <linux/version.h>9#include <linux/utsrelease.h>
10 10
11#include <asm/sections.h>11#include <asm/sections.h>
12#include <asm/bootx.h>12#include <asm/bootx.h>
arch/x86_64/boot/setup.S+1−1
@@ -46,7 +46,7 @@ · 45 unmodified lines
46 */46 */
47 47
48#include <asm/segment.h>48#include <asm/segment.h>
49#include <linux/version.h>49#include <linux/utsrelease.h>
50#include <linux/compile.h>50#include <linux/compile.h>
51#include <asm/boot.h>51#include <asm/boot.h>
52#include <asm/e820.h>52#include <asm/e820.h>
drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c+1−1
@@ -32,7 +32,7 @@ · 31 unmodified lines
32#include <linux/netdevice.h>32#include <linux/netdevice.h>
33#include <linux/pci.h>33#include <linux/pci.h>
34#include <linux/string.h>34#include <linux/string.h>
35#include <linux/version.h>35#include <linux/utsrelease.h>
36 36
37 37
38static void bcm43xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)38static void bcm43xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
include/linux/vermagic.h+1−1
@@ -1,4 +1,4 @@
1#include <linux/version.h>1#include <linux/utsrelease.h>
2#include <linux/module.h>2#include <linux/module.h>
3 3
4/* Simply sanity version stamp for modules. */4/* Simply sanity version stamp for modules. */
init/version.c+1−0
@@ -10,6 +10,7 @@ · 9 unmodified lines
10#include <linux/module.h>10#include <linux/module.h>
11#include <linux/uts.h>11#include <linux/uts.h>
12#include <linux/utsname.h>12#include <linux/utsname.h>
13#include <linux/utsrelease.h>
13#include <linux/version.h>14#include <linux/version.h>
14 15
15#define version(a) Version_ ## a16#define version(a) Version_ ## a
scripts/checkversion.pl+3−4
@@ -1,7 +1,7 @@
1#! /usr/bin/perl1#! /usr/bin/perl
2#2#
3# checkversion find uses of LINUX_VERSION_CODE, KERNEL_VERSION, or3# checkversion find uses of LINUX_VERSION_CODE or KERNEL_VERSION
4# UTS_RELEASE without including <linux/version.h>, or cases of4# without including <linux/version.h>, or cases of
5# including <linux/version.h> that don't need it.5# including <linux/version.h> that don't need it.
6# Copyright (C) 2003, Randy Dunlap <rdunlap@xenotime.net>6# Copyright (C) 2003, Randy Dunlap <rdunlap@xenotime.net>
7 7
@@ -41,8 +41,7 @@ foreach $file (@ARGV) · 33 unmodified lines
41 }41 }
42 42
43 # Look for uses: LINUX_VERSION_CODE, KERNEL_VERSION, UTS_RELEASE43 # Look for uses: LINUX_VERSION_CODE, KERNEL_VERSION, UTS_RELEASE
44 if (($_ =~ /LINUX_VERSION_CODE/) || ($_ =~ /\WKERNEL_VERSION/) ||44 if (($_ =~ /LINUX_VERSION_CODE/) || ($_ =~ /\WKERNEL_VERSION/)) {
45 ($_ =~ /UTS_RELEASE/)) {
46 $fUseVersion = 1;45 $fUseVersion = 1;
47 last LINE if $iLinuxVersion;46 last LINE if $iLinuxVersion;
48 }47 }