Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:xen-4.11
xen
xen.ee41b5c450032ae7f2531e18cd0a73bf5fb48803.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xen.ee41b5c450032ae7f2531e18cd0a73bf5fb48803.patch of Package xen
From: Maximilian Engelhardt <maxi@daemonizer.de> Date: Tue, 22 Dec 2020 08:59:14 +0100 Subject: ee41b5c450032ae7f2531e18cd0a73bf5fb48803 x86/EFI: don't insert timestamp when SOURCE_DATE_EPOCH is defined By default a timestamp gets added to the xen efi binary. Unfortunately ld doesn't seem to provide a way to set a custom date, like from SOURCE_DATE_EPOCH, so set a zero value for the timestamp (option --no-insert-timestamp) if SOURCE_DATE_EPOCH is defined. This makes reproducible builds possible. This is an alternative to the patch suggested in [1]. This patch only omits the timestamp when SOURCE_DATE_EPOCH is defined. [1] https://lists.xenproject.org/archives/html/xen-devel/2020-10/msg02161.html Signed-off-by: Maximilian Engelhardt <maxi@daemonizer.de> Acked-by: Jan Beulich <jbeulich@suse.com> --- xen/arch/x86/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -154,24 +154,30 @@ note.o: $(TARGET)-syms $(OBJCOPY) -O binary --only-section=.note.gnu.build-id $(BASEDIR)/xen-syms $@.bin $(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 \ --rename-section=.data=.note.gnu.build-id -S $@.bin $@ rm -f $@.bin EFI_LDFLAGS = $(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) EFI_LDFLAGS += --minor-image-version=$(XEN_SUBVERSION) EFI_LDFLAGS += --major-os-version=2 --minor-os-version=0 EFI_LDFLAGS += --major-subsystem-version=2 --minor-subsystem-version=0 +# It seems ld unfortunately can't set a custom timestamp, so add a zero value +# for the timestamp (option --no-insert-timestamp) if SOURCE_DATE_EPOCH is +# defined to make reproducible builds possible. +ifdef SOURCE_DATE_EPOCH +EFI_LDFLAGS += --no-insert-timestamp +endif # Check if the compiler supports the MS ABI. export XEN_BUILD_EFI := $(shell $(CC) $(filter-out $(CFLAGS-y) .%.d,$(CFLAGS)) -c efi/check.c -o efi/check.o 2>/dev/null && echo y) # Check if the linker supports PE. XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y)) CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI $(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A VIRT_START$$,,p') $(TARGET).efi: ALT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A ALT_START$$,,p') ifneq ($(build_id_linker),) ifeq ($(call ld-ver-build-id,$(LD) $(filter -m%,$(EFI_LDFLAGS))),y)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor