We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b0b37d commit e3d0359Copy full SHA for e3d0359
arch/x86/Makefile
@@ -223,6 +223,15 @@ KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr)
223
224
LDFLAGS := -m elf_$(UTS_MACHINE)
225
226
+#
227
+# The 64-bit kernel must be aligned to 2MB. Pass -z max-page-size=0x200000 to
228
+# the linker to force 2MB page size regardless of the default page size used
229
+# by the linker.
230
231
+ifdef CONFIG_X86_64
232
+LDFLAGS += $(call ld-option, -z max-page-size=0x200000)
233
+endif
234
+
235
# Speed up the build
236
KBUILD_CFLAGS += -pipe
237
# Workaround for a gcc prelease that unfortunately was shipped in a suse release
0 commit comments