build: factorise generation of the linker scripts
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 15 Dec 2021 09:08:38 +0000 (10:08 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 15 Dec 2021 09:08:38 +0000 (10:08 +0100)
commit72f12ac6a36d5aa0567fd7abc2856e3bf054c4ef
treebd32530cafe7a4a42fc5090e1509536be41fecd7
parent249e0f1d8f203188ccdcced5a05c2149739e1566
build: factorise generation of the linker scripts

In Arm and X86 makefile, generating the linker script is the same, so
we can simply have both call the same macro.

We need to add *.lds files into extra-y so that Rules.mk can find the
.*.cmd dependency file and load it.

Change made to the command line:
- Use cpp_flags macro which simply filter -Wa,% options from $(a_flags).
- Added -D__LINKER__ even it is only used by Arm's lds.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/Rules.mk
xen/arch/arm/Makefile
xen/arch/x86/Makefile