diff options
author | Yixun Lan <dlan@gentoo.org> | 2015-10-09 11:07:41 +0800 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2015-10-09 11:29:16 +0800 |
commit | 0db3b3820b7dc744df8bb969f121b8922a3f6bd0 (patch) | |
tree | 1b5fac7fc763e06b7251456b98ea1d7f4d07d0cb /app-emulation | |
parent | net-analyzer/wireshark: Install icons with USE=qt5 too (bug #562022). (diff) | |
download | gentoo-0db3b3820b7dc744df8bb969f121b8922a3f6bd0.tar.gz gentoo-0db3b3820b7dc744df8bb969f121b8922a3f6bd0.tar.bz2 gentoo-0db3b3820b7dc744df8bb969f121b8922a3f6bd0.zip |
app-emulation/xen: version bump to 4.6.0
1) try to avoid conditional patch (which is bad)
2) clean un-needed patches
Package-Manager: portage-2.2.22
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/xen/Manifest | 1 | ||||
-rw-r--r-- | app-emulation/xen/files/xen-4.3-fix_dotconfig-gcc.patch | 220 | ||||
-rw-r--r-- | app-emulation/xen/files/xen-4.4-efi.patch | 36 | ||||
-rw-r--r-- | app-emulation/xen/files/xen-4.6-efi.patch | 36 | ||||
-rw-r--r-- | app-emulation/xen/xen-4.6.0.ebuild | 177 |
5 files changed, 214 insertions, 256 deletions
diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest index 0f7dc989f572..62bc2ca78a10 100644 --- a/app-emulation/xen/Manifest +++ b/app-emulation/xen/Manifest @@ -1,4 +1,5 @@ DIST xen-4.2.5-upstream-patches-9.tar.xz 23208 SHA256 2206e9a8aeeed207abbae995c5d2baa14d5f0da4120ae44f2de733ecf7ea5af1 SHA512 8a2edaba48002449a521edf2ae078ffe1b3db4f491a85b063886a147a0be3ec7fdb819ce84c90cdae80ed34c10ab2d637506700be10052a67be6ef128fa40fb1 WHIRLPOOL 037820e0fad60d1f7ed054efa797585c992d08f1ffd533705c515ad289f8cdddc72b97f2a3d75ebd683c6bb6988d7285452b4f3cebbe9a879f701156e387ff3b DIST xen-4.2.5.tar.gz 15671925 SHA256 3cf440866315e8085050eb0586f0447b6b47a08dbed6a72226bf5ed5d89ec567 SHA512 42c0fc241952fc55fc44480fb6752b004b54ae40e946159ec047adf229b65cbfbd810271d01b064ad8fdbddb73c640dcdcb6bc19f91e8968829889c129920dac WHIRLPOOL 762a91c0111892b33e6bd3e7f7714709b04697ad7c2b0919fef6cc9570a343a77fd5a2b82833e75dac9d12d4e41acdcf0743b0d593595910ddd326f5cd721368 DIST xen-4.5.1.tar.gz 18410400 SHA256 668c11d4fca67ac44329e369f810356eacd37b28d28fb96e66aac77f3c5e1371 SHA512 9436243e26bc64bc836a179abdc3a6b1b6fa9d3f2170453092c18be71fa62e18cd4465a9154c0f28a7ac8d69d08361ba1defef240a51197f058c012c3855ba04 WHIRLPOOL 71d8559f86683dd9fb3eb09d3f602de227f281fbd3c8cc258bfdb67c425d9e7c4d21cb0284c123e4263262c1b821fea6d28109861ce60d627f6426d352808d99 +DIST xen-4.6.0.tar.gz 19694350 SHA256 6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909 SHA512 b4b02f306ffea360f539dd8c231b2f58c00c3638fdb665cb659c7291b475b40f1075bc59d49a6144767729e57b8bc40a1cfd9030d61de2b8fa4ac97d43655c2b WHIRLPOOL d3f01183440ca1875b6e850bd116db0c382383433e50c0902d3268e9e36b39d184fc65e925bdb5363ef4ca7a232fee15b4749c89baf789137b8a8248565c75a8 DIST xen-security-patches-3.tar.xz 17028 SHA256 fb6301beb9a5c2d1e5d4de8783d8670e382b1bef48ec61e73d2d9be6901d289f SHA512 787fee8f7822577c6de91c4cf4d56d0e73ce46bac5524537ff66a718b6d7eae9d362265515743e8577b2c75f2841baed9837f71467b3b7b91a3111220da5f236 WHIRLPOOL 5c136289e654776bf918fe125fbecba7dac0929b236f7ae8158026a6bd6be12bc786a5ec96cb4022c18a5e7ffde82155deb57eb9639600e4c42c9c209f4a2ed6 diff --git a/app-emulation/xen/files/xen-4.3-fix_dotconfig-gcc.patch b/app-emulation/xen/files/xen-4.3-fix_dotconfig-gcc.patch deleted file mode 100644 index 588be7469760..000000000000 --- a/app-emulation/xen/files/xen-4.3-fix_dotconfig-gcc.patch +++ /dev/null @@ -1,220 +0,0 @@ -# Fix gcc-4.6 -diff -ur xen-4.2.0.orig/extras/mini-os/minios.mk xen-4.2.0/extras/mini-os/minios.mk ---- extras/mini-os/minios.mk 2012-09-17 18:21:17.000000000 +0800 -+++ extras/mini-os/minios.mk 2012-12-05 14:01:10.653260260 +0800 -@@ -6,7 +6,7 @@ - - # Define some default flags. - # NB. '-Wcast-qual' is nasty, so I omitted it. --DEF_CFLAGS += -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format -Wno-redundant-decls -+DEF_CFLAGS += -fno-builtin -Wall -Wredundant-decls -Wno-format -Wno-redundant-decls - DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,) - DEF_CFLAGS += $(call cc-option,$(CC),-fgnu89-inline) - DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline -diff -ur xen-4.2.0.orig/tools/libxc/Makefile xen-4.2.0/tools/libxc/Makefile ---- tools/libxc/Makefile 2012-09-17 18:21:18.000000000 +0800 -+++ tools/libxc/Makefile 2012-12-05 14:01:10.653260260 +0800 -@@ -85,7 +85,7 @@ - - -include $(XEN_TARGET_ARCH)/Makefile - --CFLAGS += -Werror -Wmissing-prototypes -+CFLAGS += -Wmissing-prototypes - CFLAGS += -I. $(CFLAGS_xeninclude) - - # Needed for posix_fadvise64() in xc_linux.c -# Drop .config -diff -ur xen-4.2.0.orig/Config.mk xen-4.2.0/Config.mk ---- Config.mk 2012-09-17 18:23:12.000000000 +0800 -+++ Config.mk 2012-12-05 14:01:10.641260261 +0800 -@@ -7,7 +7,6 @@ Drop .config - # fallback for older make - realpath = $(wildcard $(foreach file,$(1),$(shell cd -P $(dir $(file)) && echo "$$PWD/$(notdir $(file))"))) - ---include $(XEN_ROOT)/.config - - # A debug build of Xen and tools? - debug ?= n -@@ -24,7 +24,7 @@ - - # Tools to run on system hosting the build - HOSTCC = gcc --HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer -+HOSTCFLAGS = -Wstrict-prototypes -O2 -fomit-frame-pointer - HOSTCFLAGS += -fno-strict-aliasing - - DISTDIR ?= $(XEN_ROOT)/dist -@@ -156,7 +156,7 @@ - - CFLAGS += -std=gnu99 - --CFLAGS += -Wall -Wstrict-prototypes -+CFLAGS += -Wstrict-prototypes - - # Clang complains about macros that expand to 'if ( ( foo == bar ) ) ...' - # and is over-zealous with the printf format lint -diff -ur xen-4.2.1.orig/tools/blktap2/drivers/Makefile xen-4.2.1/tools/blktap2/drivers/Makefile ---- tools/blktap2/drivers/Makefile 2012-12-17 23:00:11.000000000 +0800 -+++ tools/blktap2/drivers/Makefile 2013-01-30 12:31:43.539941099 +0800 -@@ -9,7 +9,7 @@ - LOCK_UTIL = lock-util - INST_DIR = $(SBINDIR) - --CFLAGS += -Werror -g -+CFLAGS += -g - CFLAGS += -Wno-unused - CFLAGS += -fno-strict-aliasing - CFLAGS += -I$(BLKTAP_ROOT)/include -I$(BLKTAP_ROOT)/drivers -diff -ur xen-4.2.1.orig/tools/debugger/gdbsx/Rules.mk xen-4.2.1/tools/debugger/gdbsx/Rules.mk ---- tools/debugger/gdbsx/Rules.mk 2012-12-17 23:00:22.000000000 +0800 -+++ tools/debugger/gdbsx/Rules.mk 2013-01-30 12:31:43.516941098 +0800 -@@ -1,4 +1,4 @@ - include $(XEN_ROOT)/tools/Rules.mk - --CFLAGS += -Werror -Wmissing-prototypes -+CFLAGS += -Wmissing-prototypes - # (gcc 4.3x and later) -Wconversion -Wno-sign-conversion -diff -ur xen-4.2.1.orig/tools/libaio/harness/Makefile xen-4.2.1/tools/libaio/harness/Makefile ---- tools/libaio/harness/Makefile 2012-12-17 23:00:35.000000000 +0800 -+++ tools/libaio/harness/Makefile 2013-01-30 12:31:43.541941099 +0800 -@@ -4,7 +4,7 @@ - HARNESS_SRCS:=main.c - # io_queue.c - --CFLAGS=-Wall -Werror -g -O -laio -+CFLAGS=-Wall -g -O -laio - #-lpthread -lrt - - all: $(PROGS) -diff -ur xen-4.2.1.orig/tools/libfsimage/Rules.mk xen-4.2.1/tools/libfsimage/Rules.mk ---- tools/libfsimage/Rules.mk 2012-12-17 23:00:36.000000000 +0800 -+++ tools/libfsimage/Rules.mk 2013-01-30 12:31:43.515941097 +0800 -@@ -1,7 +1,7 @@ - include $(XEN_ROOT)/tools/Rules.mk - - CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ -DFSIMAGE_FSDIR=\"$(FSDIR)\" --CFLAGS += -Werror -D_GNU_SOURCE -+CFLAGS += -D_GNU_SOURCE - LDFLAGS += -L../common/ - - PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y)) -diff -ur xen-4.2.1.orig/tools/libxl/Makefile xen-4.2.1/tools/libxl/Makefile ---- tools/libxl/Makefile 2012-12-17 23:01:08.000000000 +0800 -+++ tools/libxl/Makefile 2013-01-30 12:31:43.541941099 +0800 -@@ -11,7 +11,7 @@ - XLUMAJOR = 1.0 - XLUMINOR = 1 - --CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \ -+CFLAGS += -Wno-format-zero-length -Wmissing-declarations \ - -Wno-declaration-after-statement -Wformat-nonliteral - CFLAGS += -I. -fPIC - -diff -ur xen-4.2.1.orig/tools/qemu-xen/pc-bios/optionrom/Makefile xen-4.2.1/tools/qemu-xen/pc-bios/optionrom/Makefile ---- tools/qemu-xen/pc-bios/optionrom/Makefile 2012-09-11 02:10:52.000000000 +0800 -+++ tools/qemu-xen/pc-bios/optionrom/Makefile 2013-01-30 12:31:43.528941098 +0800 -@@ -9,7 +9,7 @@ - - .PHONY : all clean build-all - --CFLAGS := -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin -+CFLAGS := -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-builtin - CFLAGS += -I$(SRC_PATH) - CFLAGS += $(call cc-option, $(CFLAGS), -fno-stack-protector) - QEMU_CFLAGS = $(CFLAGS) -diff -ur xen-4.2.1.orig/tools/xenstat/xentop/Makefile xen-4.2.1/tools/xenstat/xentop/Makefile ---- tools/xenstat/xentop/Makefile 2012-12-17 23:01:35.000000000 +0800 -+++ tools/xenstat/xentop/Makefile 2013-01-30 12:31:43.535941098 +0800 -@@ -18,7 +18,7 @@ - all install xentop: - else - --CFLAGS += -DGCC_PRINTF -Wall -Werror $(CFLAGS_libxenstat) -+CFLAGS += -DGCC_PRINTF -Wall $(CFLAGS_libxenstat) - LDLIBS += $(LDLIBS_libxenstat) $(CURSES_LIBS) $(SOCKET_LIBS) - CFLAGS += -DHOST_$(XEN_OS) - -diff -ur xen-4.2.1.orig/xen/arch/arm/Rules.mk xen-4.2.1/xen/arch/arm/Rules.mk ---- xen/arch/arm/Rules.mk 2012-12-17 23:01:37.000000000 +0800 -+++ xen/arch/arm/Rules.mk 2013-01-30 12:31:43.498941097 +0800 -@@ -9,7 +9,7 @@ - HAS_DEVICE_TREE := y - - CFLAGS += -fno-builtin -fno-common -Wredundant-decls --CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe -+CFLAGS += -iwithprefix include -Wno-pointer-arith -pipe - CFLAGS += -I$(BASEDIR)/include - - # Prevent floating-point variables from creeping into Xen. -diff -ur xen-4.2.1.orig/xen/arch/x86/Rules.mk xen-4.2.1/xen/arch/x86/Rules.mk ---- xen/arch/x86/Rules.mk 2012-12-17 23:01:37.000000000 +0800 -+++ xen/arch/x86/Rules.mk 2013-01-30 12:31:43.490941096 +0800 -@@ -24,7 +24,7 @@ - endif - - CFLAGS += -fno-builtin -fno-common -Wredundant-decls --CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe -+CFLAGS += -iwithprefix include -Wno-pointer-arith -pipe - CFLAGS += -I$(BASEDIR)/include - CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic - CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default -diff -ur xen-4.2.1.orig/xen/include/Makefile xen-4.2.1/xen/include/Makefile ---- xen/include/Makefile 2012-12-17 23:01:55.000000000 +0800 -+++ xen/include/Makefile 2013-01-30 12:31:43.502941097 +0800 -@@ -78,7 +78,7 @@ - all: headers.chk - - headers.chk: $(filter-out public/arch-% public/%ctl.h public/xsm/% public/%hvm/save.h, $(wildcard public/*.h public/*/*.h) $(public-y)) Makefile -- for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W -Werror -S -o /dev/null -xc $$i || exit 1; echo $$i; done >$@.new -+ for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W -S -o /dev/null -xc $$i || exit 1; echo $$i; done >$@.new - mv $@.new $@ - - endif -diff -ur xen-4.2.1.orig/tools/tests/mce-test/tools/Makefile xen-4.2.1/tools/tests/mce-test/tools/Makefile ---- tools/tests/mce-test/tools/Makefile 2012-12-17 23:01:35.000000000 +0800 -+++ tools/tests/mce-test/tools/Makefile 2013-01-30 13:01:44.890020152 +0800 -@@ -1,7 +1,7 @@ - XEN_ROOT=$(CURDIR)/../../../.. - include $(XEN_ROOT)/tools/Rules.mk - --CFLAGS += -Werror -+CFLAGS += - CFLAGS += $(CFLAGS_libxenctrl) - CFLAGS += $(CFLAGS_libxenguest) - CFLAGS += $(CFLAGS_libxenstore) -diff -ur xen-4.2.1.orig/tools/tests/mem-sharing/Makefile xen-4.2.1/tools/tests/mem-sharing/Makefile ---- tools/tests/mem-sharing/Makefile 2012-12-17 23:01:35.000000000 +0800 -+++ tools/tests/mem-sharing/Makefile 2013-01-30 13:01:44.890020152 +0800 -@@ -1,7 +1,7 @@ - XEN_ROOT=$(CURDIR)/../../.. - include $(XEN_ROOT)/tools/Rules.mk - --CFLAGS += -Werror -+CFLAGS += - - CFLAGS += $(CFLAGS_libxenctrl) - CFLAGS += $(CFLAGS_xeninclude) -diff -ur xen-4.2.1.orig/tools/tests/xen-access/Makefile xen-4.2.1/tools/tests/xen-access/Makefile ---- tools/tests/xen-access/Makefile 2012-12-17 23:01:35.000000000 +0800 -+++ tools/tests/xen-access/Makefile 2013-01-30 13:01:44.891020152 +0800 -@@ -1,7 +1,7 @@ - XEN_ROOT=$(CURDIR)/../../.. - include $(XEN_ROOT)/tools/Rules.mk - --CFLAGS += -Werror -+CFLAGS += - - CFLAGS += $(CFLAGS_libxenctrl) - CFLAGS += $(CFLAGS_libxenguest) -diff -ur xen-4.3.0.orig/tools/firmware/Rules.mk xen-4.3.0/tools/firmware/Rules.mk ---- tools/firmware/Rules.mk 2013-07-09 18:46:56.000000000 +0800 -+++ ttools/firmware/Rules.mk 2013-07-20 20:28:57.811836505 +0800 -@@ -11,8 +11,6 @@ - CFLAGS += -DNDEBUG - endif - --CFLAGS += -Werror -- - $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) - - # Extra CFLAGS suitable for an embedded type of environment. diff --git a/app-emulation/xen/files/xen-4.4-efi.patch b/app-emulation/xen/files/xen-4.4-efi.patch deleted file mode 100644 index c584d141d4f2..000000000000 --- a/app-emulation/xen/files/xen-4.4-efi.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/xen/Makefile b/xen/Makefile -index 39839a3..d2603f0 100644 ---- a/xen/Makefile -+++ b/xen/Makefile -@@ -38,9 +38,15 @@ _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX) - _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) - [ -d $(D)/boot ] || $(INSTALL_DIR) $(D)/boot - $(INSTALL_DATA) $(TARGET)$(Z) $(D)/boot/$(T)-$(XEN_FULLVERSION)$(Z) -- ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) -- ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)/boot/$(T)-$(XEN_VERSION)$(Z) -- ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)/boot/$(T)$(Z) -+ if [ 'x$(EFI_VENDOR)' == 'x' ]; then \ -+ ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \ -+ ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)/boot/$(T)-$(XEN_VERSION)$(Z);\ -+ ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)/boot/$(T)$(Z); \ -+ else \ -+ $(INSTALL_DATA) $(TARGET)$(Z) $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \ -+ $(INSTALL_DATA) $(TARGET)$(Z) $(D)/boot/$(T)-$(XEN_VERSION)$(Z);\ -+ $(INSTALL_DATA) $(TARGET)$(Z) $(D)/boot/$(T)$(Z); \ -+ fi; \ - $(INSTALL_DATA) $(TARGET)-syms $(D)/boot/$(T)-syms-$(XEN_FULLVERSION) - if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \ - [ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \ -diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile -index d502bdf..a2121b0 100644 ---- a/xen/arch/x86/Makefile -+++ b/xen/arch/x86/Makefile -@@ -112,7 +112,7 @@ $(TARGET)-syms: prelink.o xen.lds $(BASEDIR)/common/symbols-dummy.o - $(@D)/.$(@F).1.o -o $@ - rm -f $(@D)/.$(@F).[0-9]* - --EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10 -+EFI_LDFLAGS = -mi386pep $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10 - EFI_LDFLAGS += --image-base=$(1) --stack=0,0 --heap=0,0 --strip-debug - EFI_LDFLAGS += --section-alignment=0x200000 --file-alignment=0x20 - EFI_LDFLAGS += --major-image-version=$(XEN_VERSION) diff --git a/app-emulation/xen/files/xen-4.6-efi.patch b/app-emulation/xen/files/xen-4.6-efi.patch new file mode 100644 index 000000000000..bf888def7d90 --- /dev/null +++ b/app-emulation/xen/files/xen-4.6-efi.patch @@ -0,0 +1,36 @@ +diff --git a/xen/Makefile b/xen/Makefile +index 4c54e9b..a5cdccd 100644 +--- a/xen/Makefile ++++ b/xen/Makefile +@@ -41,9 +41,15 @@ _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX) + _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) + [ -d $(D)$(BOOT_DIR) ] || $(INSTALL_DIR) $(D)$(BOOT_DIR) + $(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION)$(Z) +- ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) +- ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z) +- ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z) ++ if [ 'x$(EFI_VENDOR)' == 'x' ]; then \ ++ ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \ ++ ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z); \ ++ ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z); \ ++ else \ ++ $(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \ ++ $(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z); \ ++ $(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z); \ ++ fi; + [ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR) + $(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION) + if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \ +diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile +index 5f24951..4ec0ee2 100644 +--- a/xen/arch/x86/Makefile ++++ b/xen/arch/x86/Makefile +@@ -116,7 +116,7 @@ $(TARGET)-syms: prelink.o xen.lds $(BASEDIR)/common/symbols-dummy.o + $(@D)/.$(@F).1.o -o $@ + rm -f $(@D)/.$(@F).[0-9]* + +-EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10 ++EFI_LDFLAGS = -mi386pep $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10 + EFI_LDFLAGS += --image-base=$(1) --stack=0,0 --heap=0,0 --strip-debug + EFI_LDFLAGS += --section-alignment=0x200000 --file-alignment=0x20 + EFI_LDFLAGS += --major-image-version=$(XEN_VERSION) diff --git a/app-emulation/xen/xen-4.6.0.ebuild b/app-emulation/xen/xen-4.6.0.ebuild new file mode 100644 index 000000000000..4deb661ada54 --- /dev/null +++ b/app-emulation/xen/xen-4.6.0.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +MY_PV=${PV/_/-} +MY_P=${PN}-${PV/_/-} + +if [[ $PV == *9999 ]]; then + KEYWORDS="" + EGIT_REPO_URI="git://xenbits.xen.org/${PN}.git" + live_eclass="git-2" +else + KEYWORDS="~amd64 ~arm ~arm64 -x86" + UPSTREAM_VER= + SECURITY_VER= + GENTOO_VER= + + [[ -n ${UPSTREAM_VER} ]] && \ + UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz" + [[ -n ${SECURITY_VER} ]] && \ + SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz" + [[ -n ${GENTOO_VER} ]] && \ + GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz" + SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz + ${UPSTREAM_PATCHSET_URI} + ${SECURITY_PATCHSET_URI} + ${GENTOO_PATCHSET_URI}" + +fi + +inherit mount-boot flag-o-matic python-any-r1 toolchain-funcs eutils ${live_eclass} + +DESCRIPTION="The Xen virtual machine monitor" +HOMEPAGE="http://xen.org/" +LICENSE="GPL-2" +SLOT="0" +IUSE="custom-cflags debug efi flask xsm" + +DEPEND="${PYTHON_DEPS} + efi? ( >=sys-devel/binutils-2.22[multitarget] ) + !efi? ( >=sys-devel/binutils-2.22[-multitarget] )" +RDEPEND="" +PDEPEND="~app-emulation/xen-tools-${PV}" + +RESTRICT="test" + +# Approved by QA team in bug #144032 +QA_WX_LOAD="boot/xen-syms-${PV}" + +REQUIRED_USE="flask? ( xsm ) + arm? ( debug )" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + python-any-r1_pkg_setup + if [[ -z ${XEN_TARGET_ARCH} ]]; then + if use x86 && use amd64; then + die "Confusion! Both x86 and amd64 are set in your use flags!" + elif use x86; then + export XEN_TARGET_ARCH="x86_32" + elif use amd64; then + export XEN_TARGET_ARCH="x86_64" + elif use arm; then + export XEN_TARGET_ARCH="arm32" + elif use arm64; then + export XEN_TARGET_ARCH="arm64" + else + die "Unsupported architecture!" + fi + fi + + if use flask ; then + export "XSM_ENABLE=y" + export "FLASK_ENABLE=y" + elif use xsm ; then + export "XSM_ENABLE=y" + fi +} + +src_prepare() { + # Upstream's patchset + if [[ -n ${UPSTREAM_VER} ]]; then + EPATCH_SUFFIX="patch" \ + EPATCH_FORCE="yes" \ + EPATCH_OPTS="-p1" \ + epatch "${WORKDIR}"/patches-upstream + fi + + # Security patchset + if [[ -n ${SECURITY_VER} ]]; then + EPATCH_SUFFIX="patch" \ + EPATCH_FORCE="yes" \ + EPATCH_OPTS="-p1" \ + epatch "${WORKDIR}/patches-security/${PV}" + fi + + # Gentoo's patchset + if [[ -n ${GENTOO_VER} ]]; then + EPATCH_SUFFIX="patch" \ + EPATCH_FORCE="yes" \ + epatch "${WORKDIR}"/patches-gentoo + fi + + epatch "${FILESDIR}"/${PN}-4.6-efi.patch + + # Drop .config + sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" + + if use efi; then + export EFI_VENDOR="gentoo" + export EFI_MOUNTPOINT="boot" + fi + + # if the user *really* wants to use their own custom-cflags, let them + if use custom-cflags; then + einfo "User wants their own CFLAGS - removing defaults" + # try and remove all the default custom-cflags + find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \ + -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ + -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ + -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ + -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ + -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ + -i {} \; || die "failed to re-set custom-cflags" + fi + + # remove -Werror for gcc-4.6's sake + find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \ + xargs sed -i 's/ *-Werror */ /' + # not strictly necessary to fix this + sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py" + + epatch_user +} + +src_configure() { + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" + + use debug && myopt="${myopt} debug=y" + + if use custom-cflags; then + filter-flags -fPIE -fstack-protector + replace-flags -O3 -O2 + else + unset CFLAGS + fi +} + +src_compile() { + # Send raw LDFLAGS so that --as-needed works + emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt} +} + +src_install() { + local myopt + use debug && myopt="${myopt} debug=y" + + # The 'make install' doesn't 'mkdir -p' the subdirs + if use efi; then + mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die + fi + + emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install +} + +pkg_postinst() { + elog "Official Xen Guide and the unoffical wiki page:" + elog " https://wiki.gentoo.org/wiki/Xen" + elog " http://en.gentoo-wiki.com/wiki/Xen/" + + use efi && einfo "The efi executable is installed in boot/efi/gentoo" +} |