Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:xen-4.11
xen
xen.f1d376a825f4878eab0ef9cabe50ec4299968629.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xen.f1d376a825f4878eab0ef9cabe50ec4299968629.patch of Package xen
From: Olaf Hering <olaf@aepfle.de> Date: Wed, 17 Jun 2020 07:08:41 +0100 Subject: f1d376a825f4878eab0ef9cabe50ec4299968629 stubdom/vtpm: add extern to function declarations Code compiled with gcc10 will not link properly due to multiple definition of the same function. Signed-off-by: Olaf Hering <olaf@aepfle.de> Reviewed-by: Jason Andryuk <jandryuk@gmail.com> Acked-by: Samuel Thibault <samuel.thibaut@ens-lyon.org> Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com> Release-acked-by: Paul Durrant <paul@xen.org> --- stubdom/Makefile | 1 + stubdom/vtpm_extern.patch | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 stubdom/vtpm_extern.patch --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -221,24 +221,25 @@ tpm_emulator-$(XEN_TARGET_ARCH): tpm_emulator-$(TPMEMU_VERSION).tar.gz @if [ ! -f "$(CMAKE)" ]; then echo "cmake not installed! Install it and then rerun ./configure!"; false; fi tar xzf $< mv tpm_emulator-$(TPMEMU_VERSION) $@ patch -d $@ -p1 < tpmemu-$(TPMEMU_VERSION).patch; patch -d $@ -p1 < vtpm-bufsize.patch patch -d $@ -p1 < vtpm-locality.patch patch -d $@ -p1 < vtpm-parent-sign-ek.patch patch -d $@ -p1 < vtpm-deepquote.patch patch -d $@ -p1 < vtpm-deepquote-anyloc.patch patch -d $@ -p1 < vtpm-cmake-Wextra.patch patch -d $@ -p1 < vtpm-implicit-fallthrough.patch patch -d $@ -p1 < vtpm_TPM_ChangeAuthAsymFinish.patch + patch -d $@ -p1 < vtpm_extern.patch mkdir $@/build cd $@/build; CC=${CC} $(CMAKE) .. -DCMAKE_C_FLAGS:STRING="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement" touch $@ TPMEMU_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libtpm.a $(TPMEMU_STAMPFILE): tpm_emulator-$(XEN_TARGET_ARCH) $(GMP_STAMPFILE) ( cd $</build && make VERBOSE=1 tpm_crypto tpm ) cp $</build/crypto/libtpm_crypto.a $(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libtpm_crypto.a cp $</build/tpm/libtpm.a $(TPMEMU_STAMPFILE) .PHONY: cross-tpmemu cross-tpmemu: $(TPMEMU_STAMPFILE) new file mode 100644 --- /dev/null +++ b/stubdom/vtpm_extern.patch @@ -0,0 +1,48 @@ +ld: /home/abuild/rpmbuild/BUILD/xen-4.8.20191211T160002.8db85532cb/non-dbg/stubdom/vtpm/vtpm.a(vtpm_cmd.o):(.bss+0x28): multiple definition of `tpm_malloc'; /home/abuild/rpmbuild/BUILD/xen-4.8.20191211T160002.8db85532cb/non-dbg/stubdom/vtpm/vtpm.a(vtpm.o):(.bss+0x728): first defined here +--- a/tpm/tpm_emulator_extern.h ++++ b/tpm/tpm_emulator_extern.h +@@ -29,7 +29,7 @@ enum { + TPM_LOG_ERROR + }; + +-void (*tpm_log)(int priority, const char *fmt, ...); ++extern void (*tpm_log)(int priority, const char *fmt, ...); + + #if defined(_WIN32) || defined(_WIN64) + #define __BFILE__ ((strrchr(__FILE__, '\\') ? : __FILE__ - 1) + 1) +@@ -44,27 +44,27 @@ void (*tpm_log)(int priority, const char + #define error(fmt, ...) tpm_log(TPM_LOG_ERROR, "%s:%d: Error: " fmt "\n", \ + __BFILE__, __LINE__, ## __VA_ARGS__) + /* initialization */ +-int (*tpm_extern_init)(void); +-void (*tpm_extern_release)(void); ++extern int (*tpm_extern_init)(void); ++extern void (*tpm_extern_release)(void); + + /* memory allocation */ + +-void* (*tpm_malloc)(size_t size); ++extern void* (*tpm_malloc)(size_t size); + +-void (*tpm_free)(/*const*/ void *ptr); ++extern void (*tpm_free)(/*const*/ void *ptr); + + /* random numbers */ + +-void (*tpm_get_extern_random_bytes)(void *buf, size_t nbytes); ++extern void (*tpm_get_extern_random_bytes)(void *buf, size_t nbytes); + + /* usec since last call */ + +-uint64_t (*tpm_get_ticks)(void); ++extern uint64_t (*tpm_get_ticks)(void); + + /* file handling */ + +-int (*tpm_write_to_storage)(uint8_t *data, size_t data_length); +-int (*tpm_read_from_storage)(uint8_t **data, size_t *data_length); ++extern int (*tpm_write_to_storage)(uint8_t *data, size_t data_length); ++extern int (*tpm_read_from_storage)(uint8_t **data, size_t *data_length); + + #endif /* _TPM_EMULATOR_EXTERN_H_ */ +
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