From f174c5dec6b54bc91810986f2bf0bd76f9d33f6e Mon Sep 17 00:00:00 2001 From: Tomáš Mózes Date: Fri, 14 Apr 2023 20:50:03 +0200 Subject: Gentoo specific patches for Xen 4.17.0 (or later) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomáš Mózes --- xen-4.16-efi.patch | 12 ------ xen-4.17-efi.patch | 13 +++++++ xen-tools-4.14-ar-cc.patch | 88 ------------------------------------------ xen-tools-4.16.0-xenstat.patch | 51 ------------------------ xen-tools-4.17-ar-cc.patch | 69 +++++++++++++++++++++++++++++++++ 5 files changed, 82 insertions(+), 151 deletions(-) delete mode 100644 xen-4.16-efi.patch create mode 100644 xen-4.17-efi.patch delete mode 100644 xen-tools-4.14-ar-cc.patch delete mode 100644 xen-tools-4.16.0-xenstat.patch create mode 100644 xen-tools-4.17-ar-cc.patch diff --git a/xen-4.16-efi.patch b/xen-4.16-efi.patch deleted file mode 100644 index 0de5575..0000000 --- a/xen-4.16-efi.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile ---- a/xen/arch/x86/Makefile 2021-11-30 06:42:42.000000000 -0500 -+++ b/xen/arch/x86/Makefile 2022-02-17 07:43:06.597244620 -0500 -@@ -127,7 +127,7 @@ - CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI - - # Check if the linker supports PE. --EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=10 -+EFI_LDFLAGS = -mi386pep $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=10 - XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(call ld-option,$(EFI_LDFLAGS) --image-base=0x100000000 -o efi/check.efi efi/check.o)) - # If the above failed, it may be merely because of the linker not dealing well - # with debug info. Try again with stripping it. diff --git a/xen-4.17-efi.patch b/xen-4.17-efi.patch new file mode 100644 index 0000000..d3c102d --- /dev/null +++ b/xen-4.17-efi.patch @@ -0,0 +1,13 @@ +diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk +index 227d439a..41bc2e89 100644 +--- a/xen/arch/x86/arch.mk ++++ b/xen/arch/x86/arch.mk +@@ -94,7 +94,7 @@ $(shell mkdir -p $(dir $(efi-check))) + XEN_BUILD_EFI := $(call if-success,$(CC) $(CFLAGS) -c $(srctree)/$(efi-check).c -o $(efi-check).o,y) + + # Check if the linker supports PE. +-EFI_LDFLAGS := $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10 ++EFI_LDFLAGS := -mi386pep $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10 + LD_PE_check_cmd = $(call ld-option,$(EFI_LDFLAGS) --image-base=0x100000000 -o $(efi-check).efi $(efi-check).o) + XEN_BUILD_PE := $(LD_PE_check_cmd) + diff --git a/xen-tools-4.14-ar-cc.patch b/xen-tools-4.14-ar-cc.patch deleted file mode 100644 index 616f8f4..0000000 --- a/xen-tools-4.14-ar-cc.patch +++ /dev/null @@ -1,88 +0,0 @@ -diff --git a/tools/debugger/gdbsx/gx/Makefile b/tools/debugger/gdbsx/gx/Makefile -index 3b8467f..dec7bfa 100644 ---- a/tools/debugger/gdbsx/gx/Makefile -+++ b/tools/debugger/gdbsx/gx/Makefile -@@ -3,6 +3,7 @@ include ../Rules.mk - - GX_OBJS := gx_comm.o gx_main.o gx_utils.o gx_local.o - GX_HDRS := $(wildcard *.h) -+AR="ar" - - .PHONY: all - all: gx_all.a -@@ -18,5 +19,5 @@ distclean: clean - # $(CC) -c $(CFLAGS) -o $@ $< - - gx_all.a: $(GX_OBJS) Makefile $(GX_HDRS) -- ar cr $@ $(GX_OBJS) # problem with ld using -m32 -+ $(AR) cr $@ $(GX_OBJS) # problem with ld using -m32 - -diff --git a/tools/firmware/rombios/Makefile b/tools/firmware/rombios/Makefile -index 02abdb3..5a9e7fa 100644 ---- a/tools/firmware/rombios/Makefile -+++ b/tools/firmware/rombios/Makefile -@@ -2,6 +2,7 @@ XEN_ROOT = $(CURDIR)/../../.. - include $(XEN_ROOT)/tools/Rules.mk - - SUBDIRS := 32bit -+CC=gcc - - .PHONY: all - all: subdirs-all -@@ -19,7 +20,7 @@ clean: subdirs-clean - distclean: clean - - BIOS-bochs-latest: rombios.c biossums 32bitgateway.c tcgbios.c -- $(CPP) -DBX_SMP_PROCESSORS=1 -P $< > _rombios_.c -+ $(CC) -E -DBX_SMP_PROCESSORS=1 -P $< > _rombios_.c - bcc -o rombios.s -C-c -D__i86__ -0 -S _rombios_.c - sed -e 's/^\.text//' -e 's/^\.data//' rombios.s > _rombios_.s - as86 _rombios_.s -b tmp.bin -u- -w- -g -0 -j -O -l rombios.txt -@@ -29,6 +30,6 @@ BIOS-bochs-latest: rombios.c biossums 32bitgateway.c tcgbios.c - rm -f _rombios_.s - - biossums: biossums.c -- $(HOSTCC) $(HOSTCFLAGS) -o biossums biossums.c -+ $(CC) $(HOSTCFLAGS) -o biossums biossums.c - - -include $(DEPS_INCLUDE) -diff --git a/tools/firmware/vgabios/Makefile b/tools/firmware/vgabios/Makefile -index 3284812..ca4f42d 100644 ---- a/tools/firmware/vgabios/Makefile -+++ b/tools/firmware/vgabios/Makefile -@@ -40,7 +40,7 @@ release: - tar czvf ../$(RELEASE).tgz --exclude CVS -C .. $(RELEASE)/ - - vgabios.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe.c vbetables.h -- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE $(VGABIOS_DATE) > _vgabios_.c -+ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE $(VGABIOS_DATE) > _vgabios_.c - $(BCC) -o vgabios.s -C-c -D__i86__ -S -0 _vgabios_.c - sed -e 's/^\.text//' -e 's/^\.data//' vgabios.s > _vgabios_.s - $(AS86) _vgabios_.s -b vgabios.bin -u -w- -g -0 -j -O -l vgabios.txt -@@ -50,7 +50,7 @@ vgabios.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe.c vbe - ls -l VGABIOS-lgpl-latest.bin - - vgabios.debug.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe.c vbetables.h -- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE -DDEBUG $(VGABIOS_DATE) > _vgabios-debug_.c -+ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE -DDEBUG $(VGABIOS_DATE) > _vgabios-debug_.c - $(BCC) -o vgabios-debug.s -C-c -D__i86__ -S -0 _vgabios-debug_.c - sed -e 's/^\.text//' -e 's/^\.data//' vgabios-debug.s > _vgabios-debug_.s - $(AS86) _vgabios-debug_.s -b vgabios.debug.bin -u -w- -g -0 -j -O -l vgabios.debug.txt -@@ -60,7 +60,7 @@ vgabios.debug.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe - ls -l VGABIOS-lgpl-latest.debug.bin - - vgabios-cirrus.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h clext.c -- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus_.c -+ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus_.c - $(BCC) -o vgabios-cirrus.s -C-c -D__i86__ -S -0 _vgabios-cirrus_.c - sed -e 's/^\.text//' -e 's/^\.data//' vgabios-cirrus.s > _vgabios-cirrus_.s - $(AS86) _vgabios-cirrus_.s -b vgabios-cirrus.bin -u -w- -g -0 -j -O -l vgabios-cirrus.txt -@@ -70,7 +70,7 @@ vgabios-cirrus.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h clext.c - ls -l VGABIOS-lgpl-latest.cirrus.bin - - vgabios-cirrus.debug.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h clext.c -- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DCIRRUS_DEBUG -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus-debug_.c -+ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DCIRRUS_DEBUG -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus-debug_.c - $(BCC) -o vgabios-cirrus-debug.s -C-c -D__i86__ -S -0 _vgabios-cirrus-debug_.c - sed -e 's/^\.text//' -e 's/^\.data//' vgabios-cirrus-debug.s > _vgabios-cirrus-debug_.s - $(AS86) _vgabios-cirrus-debug_.s -b vgabios-cirrus.debug.bin -u -w- -g -0 -j -O -l vgabios-cirrus.debug.txt diff --git a/xen-tools-4.16.0-xenstat.patch b/xen-tools-4.16.0-xenstat.patch deleted file mode 100644 index c47b3dc..0000000 --- a/xen-tools-4.16.0-xenstat.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/tools/libs/stat/Makefile b/tools/libs/stat/Makefile -index c99508ae..b54b700c 100644 ---- a/tools/libs/stat/Makefile -+++ b/tools/libs/stat/Makefile -@@ -51,23 +51,23 @@ install-bindings: install-perl-bindings install-python-bindings - .PHONY: uninstall-bindings - uninstall-bindings: uninstall-perl-bindings uninstall-python-bindings - --$(BINDINGS): $(SHLIB) $(SHLIB_LINKS) include/xenstat.h -+$(BINDINGS): $(SHLIB) $(SHLIB_LINKS) ../../include/xenstat.h - --SWIG_FLAGS=-module xenstat -Iinclude -I. -+SWIG_FLAGS=-module xenstat -Iinclude -I. -I../../include/ - - # Python bindings --PYTHON_VERSION=$(PYTHON:python%=%) --PYTHON_FLAGS=-I/usr/include/python$(PYTHON_VERSION) -lpython$(PYTHON_VERSION) -+PYTHON_FLAGS=`$(PYTHON) -c 'import distutils.sysconfig; print("-I" + distutils.sysconfig.get_python_inc(True) + " " + distutils.sysconfig.get_config_var("BLDLIBRARY"))'` -+PYTHON_FLAGS+=-Wno-error=missing-prototypes -fPIC -lxenstat - $(PYMOD): $(PYSRC) - $(PYSRC): bindings/swig/xenstat.i - swig -python $(SWIG_FLAGS) -outdir $(@D) -o $(PYSRC) $< - - $(PYLIB): $(PYSRC) -- $(CC) $(CFLAGS) $(LDFLAGS) $(PYTHON_FLAGS) $(SHLIB_LDFLAGS) -lxenstat -o $@ $< $(APPEND_LDFLAGS) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(PYTHON_FLAGS) $(SHLIB_LDFLAGS) -o $@ $< $(SHLIB) $(LDLIBS-y) $(APPEND_LDFLAGS) - - python-bindings: $(PYLIB) $(PYMOD) - --pythonlibdir=$(prefix)/lib/python$(PYTHON_VERSION)/site-packages -+pythonlibdir=`$(PYTHON) -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())'` - install-python-bindings: $(PYLIB) $(PYMOD) - $(INSTALL_PROG) $(PYLIB) $(DESTDIR)$(pythonlibdir)/_xenstat.so - $(INSTALL_PROG) $(PYMOD) $(DESTDIR)$(pythonlibdir)/xenstat.py -@@ -91,13 +91,14 @@ $(PERLSRC): bindings/swig/xenstat.i - swig -perl $(SWIG_FLAGS) -outdir $(@D) -o $(PERLSRC) $< - - $(PERLLIB): $(PERLSRC) -- $(CC) $(CFLAGS) $(LDFLAGS) $(PERL_FLAGS) $(SHLIB_LDFLAGS) -lxenstat -o $@ $< $(APPEND_LDFLAGS) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(PERL_FLAGS) $(SHLIB_LDFLAGS) -o $@ $< $(SHLIB) $(LDLIBS-y) $(APPEND_LDFLAGS) -+ - - .PHONY: perl-bindings - perl-bindings: $(PERLLIB) $(PERLMOD) - - .PHONY: install-perl-bindings --perllibdir=$(prefix)/lib/perl5 -+perllibdir=$(prefix)/$(libdir)/perl5 - perlmoddir=$(prefix)/share/perl5 - install-perl-bindings: $(PERLLIB) $(PERLMOD) - $(INSTALL_PROG) $(PERLLIB) $(DESTDIR)$(perllibdir)/xenstat.so diff --git a/xen-tools-4.17-ar-cc.patch b/xen-tools-4.17-ar-cc.patch new file mode 100644 index 0000000..e1d5ea2 --- /dev/null +++ b/xen-tools-4.17-ar-cc.patch @@ -0,0 +1,69 @@ +diff --git a/tools/firmware/rombios/Makefile b/tools/firmware/rombios/Makefile +index 02abdb30..14b6b531 100644 +--- a/tools/firmware/rombios/Makefile ++++ b/tools/firmware/rombios/Makefile +@@ -2,6 +2,7 @@ XEN_ROOT = $(CURDIR)/../../.. + include $(XEN_ROOT)/tools/Rules.mk + + SUBDIRS := 32bit ++CC=gcc + + .PHONY: all + all: subdirs-all +@@ -19,7 +20,7 @@ clean: subdirs-clean + distclean: clean + + BIOS-bochs-latest: rombios.c biossums 32bitgateway.c tcgbios.c +- $(CPP) -DBX_SMP_PROCESSORS=1 -P $< > _rombios_.c ++ $(CC) -E -DBX_SMP_PROCESSORS=1 -P $< > _rombios_.c + bcc -o rombios.s -C-c -D__i86__ -0 -S _rombios_.c + sed -e 's/^\.text//' -e 's/^\.data//' rombios.s > _rombios_.s + as86 _rombios_.s -b tmp.bin -u- -w- -g -0 -j -O -l rombios.txt +@@ -29,6 +30,6 @@ BIOS-bochs-latest: rombios.c biossums 32bitgateway.c tcgbios.c + rm -f _rombios_.s + + biossums: biossums.c +- $(HOSTCC) $(HOSTCFLAGS) -o biossums biossums.c ++ $(CC) $(HOSTCFLAGS) -o biossums biossums.c + + -include $(DEPS_INCLUDE) +diff --git a/tools/firmware/vgabios/Makefile b/tools/firmware/vgabios/Makefile +index 3284812f..ca4f42d2 100644 +--- a/tools/firmware/vgabios/Makefile ++++ b/tools/firmware/vgabios/Makefile +@@ -40,7 +40,7 @@ release: + tar czvf ../$(RELEASE).tgz --exclude CVS -C .. $(RELEASE)/ + + vgabios.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe.c vbetables.h +- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE $(VGABIOS_DATE) > _vgabios_.c ++ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE $(VGABIOS_DATE) > _vgabios_.c + $(BCC) -o vgabios.s -C-c -D__i86__ -S -0 _vgabios_.c + sed -e 's/^\.text//' -e 's/^\.data//' vgabios.s > _vgabios_.s + $(AS86) _vgabios_.s -b vgabios.bin -u -w- -g -0 -j -O -l vgabios.txt +@@ -50,7 +50,7 @@ vgabios.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe.c vbe + ls -l VGABIOS-lgpl-latest.bin + + vgabios.debug.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe.c vbetables.h +- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE -DDEBUG $(VGABIOS_DATE) > _vgabios-debug_.c ++ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE -DDEBUG $(VGABIOS_DATE) > _vgabios-debug_.c + $(BCC) -o vgabios-debug.s -C-c -D__i86__ -S -0 _vgabios-debug_.c + sed -e 's/^\.text//' -e 's/^\.data//' vgabios-debug.s > _vgabios-debug_.s + $(AS86) _vgabios-debug_.s -b vgabios.debug.bin -u -w- -g -0 -j -O -l vgabios.debug.txt +@@ -60,7 +60,7 @@ vgabios.debug.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe + ls -l VGABIOS-lgpl-latest.debug.bin + + vgabios-cirrus.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h clext.c +- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus_.c ++ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus_.c + $(BCC) -o vgabios-cirrus.s -C-c -D__i86__ -S -0 _vgabios-cirrus_.c + sed -e 's/^\.text//' -e 's/^\.data//' vgabios-cirrus.s > _vgabios-cirrus_.s + $(AS86) _vgabios-cirrus_.s -b vgabios-cirrus.bin -u -w- -g -0 -j -O -l vgabios-cirrus.txt +@@ -70,7 +70,7 @@ vgabios-cirrus.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h clext.c + ls -l VGABIOS-lgpl-latest.cirrus.bin + + vgabios-cirrus.debug.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h clext.c +- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DCIRRUS_DEBUG -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus-debug_.c ++ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DCIRRUS_DEBUG -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus-debug_.c + $(BCC) -o vgabios-cirrus-debug.s -C-c -D__i86__ -S -0 _vgabios-cirrus-debug_.c + sed -e 's/^\.text//' -e 's/^\.data//' vgabios-cirrus-debug.s > _vgabios-cirrus-debug_.s + $(AS86) _vgabios-cirrus-debug_.s -b vgabios-cirrus.debug.bin -u -w- -g -0 -j -O -l vgabios-cirrus.debug.txt -- cgit v1.2.3-65-gdbad