mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 14:21:47 +00:00
ffd602eb46
- do not generate unneeded top-level built-in.a - let git ignore O= directory entirely - optimize scripts/kallsyms slightly - exclude DWARF info from *.s regardless of config options - fix GCC toolchain search path for Clang to prepare ld.lld support - do not generate modules.order when CONFIG_MODULES is disabled - simplify single target rules and remove VPATH for external module build - allow to add optional flags to dpkg-buildpackage when building deb-pkg - move some compiler option tests from Makefile to Kconfig - various Makefile cleanups -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJcgxYUAAoJED2LAQed4NsGr7YQAJq4LmN/aZDI9Mt0YAQjEyyA PCpm8J2HI9HO1sMoY7J/ksWmV0BU25G+uspKD7dXAQo3l9fmahQM5e4dsyZ4Xqs8 DyyYSGtJJnMJaWmupIZNA4UKDCVtwPoVW8YeuK9rwADVokCux9avogof9O1OoA/E Pylo+I4UCM82kbpZSd+UxnCx6B0v8XGtW+d31Q4yZXCkw5nw14chrlaprcqB3UgB +7C3xOnDWCi7gyxaTqmD7dLay2DM8KCDlznEvBL733Y/cK3to1fywzEPzp0JQCLX BLgmmpW13NF++q5BCoTW6sFjZAhBVbiYZwesMrCi75Y32T8zt4G5l4pkvGkSuGF/ UQh5aoCxaMIp70VPj/loZ0lh78nwVGTok9zRb0rfztM0X4DbmiPi5MNiHRzRpIeE 1jjEa/GK1t0TDnXc/MuDFK8cWwdhttIqUL5yWfAxjXbtP27eLtsopQUdW7EPHs7d sMnfuSUuhOC28yByVxIkBcwawLyYrcWRphJ3ixCO70CoJWt2DT6aOKxcFJefoJix Pto6Oo3oQ4iypMM5M9/0Uo+AK2TKRejWIqtZdbo+ir70tNxVH3WDZq++fG0drXOB r2I/GY6nRjuzLOe2jzEqywFTFd2xpk4Qo84LGb1R3U6aU5qS2gA0W/q00JS5c2qU R8uReJ7bvmLmrVNZ/NI4 =y9YG -----END PGP SIGNATURE----- Merge tag 'kbuild-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - do not generate unneeded top-level built-in.a - let git ignore O= directory entirely - optimize scripts/kallsyms slightly - exclude DWARF info from *.s regardless of config options - fix GCC toolchain search path for Clang to prepare ld.lld support - do not generate modules.order when CONFIG_MODULES is disabled - simplify single target rules and remove VPATH for external module build - allow to add optional flags to dpkg-buildpackage when building deb-pkg - move some compiler option tests from Makefile to Kconfig - various Makefile cleanups * tag 'kbuild-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (40 commits) kbuild: remove scripts/basic/% build target kbuild: use -Werror=implicit-... instead of -Werror-implicit-... kbuild: clean up scripts/gcc-version.sh kbuild: remove cc-version macro kbuild: update comment block of scripts/clang-version.sh kbuild: remove commented-out INITRD_COMPRESS kbuild: move -gsplit-dwarf, -gdwarf-4 option tests to Kconfig kbuild: [bin]deb-pkg: add DPKG_FLAGS variable kbuild: move ".config not found!" message from Kconfig to Makefile kbuild: invoke syncconfig if include/config/auto.conf.cmd is missing kbuild: simplify single target rules kbuild: remove empty rules for makefiles kbuild: make -r/-R effective in top Makefile for old Make versions kbuild: move tools_silent to a more relevant place kbuild: compute false-positive -Wmaybe-uninitialized cases in Kconfig kbuild: refactor cc-cross-prefix implementation kbuild: hardcode genksyms path and remove GENKSYMS variable scripts/gdb: refactor rules for symlink creation kbuild: create symlink to vmlinux-gdb.py in scripts_gdb target scripts/gdb: do not descend into scripts/gdb from scripts ...
76 lines
2.2 KiB
Makefile
76 lines
2.2 KiB
Makefile
#
|
|
# arch/x86/realmode/Makefile
|
|
#
|
|
# This file is subject to the terms and conditions of the GNU General Public
|
|
# License. See the file "COPYING" in the main directory of this archive
|
|
# for more details.
|
|
#
|
|
#
|
|
KASAN_SANITIZE := n
|
|
OBJECT_FILES_NON_STANDARD := y
|
|
|
|
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
|
|
KCOV_INSTRUMENT := n
|
|
|
|
always := realmode.bin realmode.relocs
|
|
|
|
wakeup-objs := wakeup_asm.o wakemain.o video-mode.o
|
|
wakeup-objs += copy.o bioscall.o regs.o
|
|
# The link order of the video-*.o modules can matter. In particular,
|
|
# video-vga.o *must* be listed first, followed by video-vesa.o.
|
|
# Hardware-specific drivers should follow in the order they should be
|
|
# probed, and video-bios.o should typically be last.
|
|
wakeup-objs += video-vga.o
|
|
wakeup-objs += video-vesa.o
|
|
wakeup-objs += video-bios.o
|
|
|
|
realmode-y += header.o
|
|
realmode-y += trampoline_$(BITS).o
|
|
realmode-y += stack.o
|
|
realmode-y += reboot.o
|
|
realmode-$(CONFIG_ACPI_SLEEP) += $(wakeup-objs)
|
|
|
|
targets += $(realmode-y)
|
|
|
|
REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y))
|
|
|
|
sed-pasyms := -n -r -e 's/^([0-9a-fA-F]+) [ABCDGRSTVW] (.+)$$/pa_\2 = \2;/p'
|
|
|
|
quiet_cmd_pasyms = PASYMS $@
|
|
cmd_pasyms = $(NM) $(real-prereqs) | sed $(sed-pasyms) | sort | uniq > $@
|
|
|
|
targets += pasyms.h
|
|
$(obj)/pasyms.h: $(REALMODE_OBJS) FORCE
|
|
$(call if_changed,pasyms)
|
|
|
|
targets += realmode.lds
|
|
$(obj)/realmode.lds: $(obj)/pasyms.h
|
|
|
|
LDFLAGS_realmode.elf := -m elf_i386 --emit-relocs -T
|
|
CPPFLAGS_realmode.lds += -P -C -I$(objtree)/$(obj)
|
|
|
|
targets += realmode.elf
|
|
$(obj)/realmode.elf: $(obj)/realmode.lds $(REALMODE_OBJS) FORCE
|
|
$(call if_changed,ld)
|
|
|
|
OBJCOPYFLAGS_realmode.bin := -O binary
|
|
|
|
targets += realmode.bin
|
|
$(obj)/realmode.bin: $(obj)/realmode.elf $(obj)/realmode.relocs FORCE
|
|
$(call if_changed,objcopy)
|
|
|
|
quiet_cmd_relocs = RELOCS $@
|
|
cmd_relocs = arch/x86/tools/relocs --realmode $< > $@
|
|
|
|
targets += realmode.relocs
|
|
$(obj)/realmode.relocs: $(obj)/realmode.elf FORCE
|
|
$(call if_changed,relocs)
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \
|
|
-I$(srctree)/arch/x86/boot
|
|
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
|
|
GCOV_PROFILE := n
|
|
UBSAN_SANITIZE := n
|