]> xenbits.xensource.com Git - people/tklengyel/xen.git/commit
build,x86: remove the need for build32.mk
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 4 Mar 2022 08:25:39 +0000 (09:25 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 4 Mar 2022 08:25:39 +0000 (09:25 +0100)
commitd58a509e01c4833515a9a8340706d1a23bef168b
tree0514165ca57b6ac80e002aa14a6621c1b0532aba
parent1f410b0c7455748021be4ede59e7a0c0a2ffb1c4
build,x86: remove the need for build32.mk

Rework "arch/x86/boot/Makefile" to allow it to build both file
"cmdline.S" and "reloc.S" without "build32.mk".

These will now use the main rules for "%.o: %.c", and thus generate a
dependency file. (We will not need to track the dependency manually
anymore.)

But for that, we need to override the main CFLAGS to do a 32bit build.
We introduce XEN_TREEWIDE_CFLAGS which can be reused in boot/Makefile,
and avoid the need to reparse Config.mk with a different value for
XEN_TARGET_ARCH. From this new $(XEN_TREEWIDE_CFLAGS), we only need to
change -m64 to have the 32bit flags. Then those are applied only to
"cmdline.o" and "reloc.o".

Specifically apply the rule "%.S: %.bin" to both cmdline.S and reloc.S
to avoid make trying to regenerate other %.S files with it.

There is no change expected to the resulting "cmdline.S" and
"reloc.S", only the *.o file changes as their symbol for FILE goes
from "cmdline.c" to "arch/x86//cmdline.c". (No idea why "boot" is
missing from the string.) (I've only check with GCC, not clang.)

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/Makefile
xen/arch/x86/boot/Makefile
xen/arch/x86/boot/build32.mk [deleted file]