aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index e1dfb90c6092..3dbd62b0bcfe 100644
--- a/Makefile
+++ b/Makefile
@@ -332,10 +332,9 @@ CHECK = sparse
332 332
333CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ 333CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
334 -Wbitwise -Wno-return-void $(CF) 334 -Wbitwise -Wno-return-void $(CF)
335MODFLAGS = -DMODULE 335CFLAGS_MODULE =
336CFLAGS_MODULE = $(MODFLAGS) 336AFLAGS_MODULE =
337AFLAGS_MODULE = $(MODFLAGS) 337LDFLAGS_MODULE =
338LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds
339CFLAGS_KERNEL = 338CFLAGS_KERNEL =
340AFLAGS_KERNEL = 339AFLAGS_KERNEL =
341CFLAGS_GCOV = -fprofile-arcs -ftest-coverage 340CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
@@ -355,6 +354,9 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
355 -Wno-format-security \ 354 -Wno-format-security \
356 -fno-delete-null-pointer-checks 355 -fno-delete-null-pointer-checks
357KBUILD_AFLAGS := -D__ASSEMBLY__ 356KBUILD_AFLAGS := -D__ASSEMBLY__
357KBUILD_AFLAGS_MODULE := -DMODULE
358KBUILD_CFLAGS_MODULE := -DMODULE
359KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
358 360
359# Read KERNELRELEASE from include/config/kernel.release (if it exists) 361# Read KERNELRELEASE from include/config/kernel.release (if it exists)
360KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) 362KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
@@ -369,6 +371,7 @@ export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
369export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS 371export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
370export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV 372export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV
371export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE 373export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
374export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
372 375
373# When compiling out-of-tree modules, put MODVERDIR in the module 376# When compiling out-of-tree modules, put MODVERDIR in the module
374# tree rather than in the kernel tree. The kernel tree might 377# tree rather than in the kernel tree. The kernel tree might
@@ -607,7 +610,7 @@ endif
607# Use --build-id when available. 610# Use --build-id when available.
608LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ 611LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
609 $(call cc-ldoption, -Wl$(comma)--build-id,)) 612 $(call cc-ldoption, -Wl$(comma)--build-id,))
610LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) 613KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
611LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) 614LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
612 615
613ifeq ($(CONFIG_STRIP_ASM_SYMS),y) 616ifeq ($(CONFIG_STRIP_ASM_SYMS),y)