]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
config/x86: tidy {Free,Open}BSD LDFLAGS_DIRECT handling
authorJan Beulich <jbeulich@suse.com>
Fri, 12 Aug 2022 06:54:33 +0000 (08:54 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 12 Aug 2022 06:54:33 +0000 (08:54 +0200)
It's not clear why for x86-64 a different approach was used than the
(shorter) one x86-32 has been using. Move the setting to the respective
OS files and reuse x86-32's approach for x86-64, while at the same time
using an OS-independent variable name (thus avoiding the indirection
through $(XEN_OS)).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
config/FreeBSD.mk
config/OpenBSD.mk
config/x86_32.mk
config/x86_64.mk

index 98a5117e606c3150a42d0cc056c54ced4454853b..0062902b257325d7eb175dda2d91c6bb7fffab7d 100644 (file)
@@ -1,5 +1,7 @@
 include $(XEN_ROOT)/config/StdGNU.mk
 
+XEN_ELF_SUB_FLAVOR = _fbsd
+
 # No wget on FreeBSD base system
 WGET = ftp
 PKG_INSTALLDIR = ${prefix}/libdata/pkgconfig
index b421a1c840954ffb6868f4cbcfd532eebee78f1a..6a6bf304f000657f1491f4d24bc081988ebe4f50 100644 (file)
@@ -1 +1,3 @@
 include $(XEN_ROOT)/config/StdGNU.mk
+
+XEN_ELF_SUB_FLAVOR = _obsd
index 29d13f77737da7217193f861c963b65718cdf58e..bc96ff013d74c742734cc485bf4632d4e8c11440 100644 (file)
@@ -8,8 +8,6 @@ CONFIG_XCUTILS := y
 CFLAGS += -m32 -march=i686
 
 # Use only if calling $(LD) directly.
-LDFLAGS_DIRECT_OpenBSD = _obsd
-LDFLAGS_DIRECT_FreeBSD = _fbsd
-LDFLAGS_DIRECT += -melf_i386$(LDFLAGS_DIRECT_$(XEN_OS))
+LDFLAGS_DIRECT += -melf_i386$(XEN_ELF_SUB_FLAVOR)
 
 IOEMU_CPU_ARCH ?= i386
index 85fa27ca6943d3753e6cb1925e3e026f9ceeeec3..4afef44141290790ba3a5f2a8392756303d628ff 100644 (file)
@@ -14,14 +14,6 @@ SunOS_LIBDIR = $(SunOS_LIBDIR_x86_64)
 EFI_DIR ?= /usr/lib64/efi
 
 # Use only if calling $(LD) directly.
-ifeq ($(XEN_OS),OpenBSD)
-LDFLAGS_DIRECT += -melf_x86_64_obsd
-else
-ifeq ($(XEN_OS),FreeBSD)
-LDFLAGS_DIRECT += -melf_x86_64_fbsd
-else
-LDFLAGS_DIRECT += -melf_x86_64
-endif
-endif
+LDFLAGS_DIRECT += -melf_x86_64$(XEN_ELF_SUB_FLAVOR)
 
 IOEMU_CPU_ARCH ?= x86_64