|
@@ -223,6 +223,15 @@ KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr)
|
|
|
|
|
|
LDFLAGS := -m elf_$(UTS_MACHINE)
|
|
LDFLAGS := -m elf_$(UTS_MACHINE)
|
|
|
|
|
|
|
|
+#
|
|
|
|
+# The 64-bit kernel must be aligned to 2MB. Pass -z max-page-size=0x200000 to
|
|
|
|
+# the linker to force 2MB page size regardless of the default page size used
|
|
|
|
+# by the linker.
|
|
|
|
+#
|
|
|
|
+ifdef CONFIG_X86_64
|
|
|
|
+LDFLAGS += $(call ld-option, -z max-page-size=0x200000)
|
|
|
|
+endif
|
|
|
|
+
|
|
# Speed up the build
|
|
# Speed up the build
|
|
KBUILD_CFLAGS += -pipe
|
|
KBUILD_CFLAGS += -pipe
|
|
# Workaround for a gcc prelease that unfortunately was shipped in a suse release
|
|
# Workaround for a gcc prelease that unfortunately was shipped in a suse release
|