SHA256
1
0
forked from pool/libvirt

Accepting request 706529 from home:jfehlig:branches:Virtualization:lto

- build: fix linking libqemutestdriver with LTO enabled
  76b420d0-build-libqemutestdriver-lto-fix.patch
  boo#1133253

OBS-URL: https://build.opensuse.org/request/show/706529
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=761
This commit is contained in:
James Fehlig 2019-05-30 16:26:45 +00:00 committed by Git OBS Bridge
parent 9f3a69afcd
commit 7a5103bbf0
3 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,46 @@
commit 76b420d0037fa77933ed51f51f38a8ce9503f3e1
Author: Jim Fehlig <jfehlig@suse.com>
Date: Wed May 29 11:28:33 2019 -0600
build: fix linking libqemutestdriver with LTO enabled
openSUSE Factory is in the process of enabling Link Time Optimization [0]
and stumbled upon missing symbols when linking libqemutestdriver
libtool: link: gcc -shared -fPIC -DPIC ../src/libvirt_qemu_probes.o \
-Wl,--whole-archive ../src/.libs/libvirt_driver_qemu_impl.a \
../src/.libs/libvirt_driver_network_impl.a \
../src/.libs/libvirt_driver_storage_impl.a -Wl,--no-whole-archive \
-lcap-ng -lgnutls -lnl-route-3 -lnl-3 -ldbus-1 -lselinux -lapparmor \
/usr/lib/libxml2.so -ldl -lz -llzma -lm -lblkid -ltirpc \
-fstack-protector-strong -O2 -fstack-protector-strong -flto=16 -g -O2 \
-fstack-protector-strong -flto=16 -g \
-Wl,-soname -Wl,libqemutestdriver.so -o .libs/libqemutestdriver.so
...
/usr/lib/gcc/i586-suse-linux/9/../../../../i586-suse-linux/bin/ld: ./.libs/libqemutestdriver.so: undefined reference to `mdir_name'
/usr/lib/gcc/i586-suse-linux/9/../../../../i586-suse-linux/bin/ld: ./.libs/libqemutestdriver.so: undefined reference to `rpl_ioctl'
/usr/lib/gcc/i586-suse-linux/9/../../../../i586-suse-linux/bin/ld: ./.libs/libqemutestdriver.so: undefined reference to `rpl_pipe2'
/usr/lib/gcc/i586-suse-linux/9/../../../../i586-suse-linux/bin/ld: ./.libs/libqemutestdriver.so: undefined reference to `recvfd'
/usr/lib/gcc/i586-suse-linux/9/../../../../i586-suse-linux/bin/ld: ./.libs/libqemutestdriver.so: undefined reference to `c_strcasecmp'
The missing symbols are provided by GNUlib. Add it when linking
libqemutestdriver.
[0] https://en.opensuse.org/openSUSE:LTO
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Acked-by: Michal Privoznik <mprivozn@redhat.com>
Index: libvirt-5.3.0/tests/Makefile.am
===================================================================
--- libvirt-5.3.0.orig/tests/Makefile.am
+++ libvirt-5.3.0/tests/Makefile.am
@@ -557,7 +557,7 @@ endif WITH_DTRACE_PROBES
libqemutestdriver_la_SOURCES =
libqemutestdriver_la_LDFLAGS = $(DRIVERLIB_LDFLAGS)
-libqemutestdriver_la_LIBADD = $(qemu_LDADDS)
+libqemutestdriver_la_LIBADD = $(qemu_LDADDS) $(LDADDS)
qemucpumock_la_SOURCES = \
qemucpumock.c testutilshostcpus.h

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu May 30 16:08:06 UTC 2019 - James Fehlig <jfehlig@suse.com>
- build: fix linking libqemutestdriver with LTO enabled
76b420d0-build-libqemutestdriver-lto-fix.patch
boo#1133253
-------------------------------------------------------------------
Thu May 30 06:58:30 UTC 2019 - Martin Liška <mliska@suse.cz>

View File

@ -342,6 +342,7 @@ Patch1: 538d8735-cpu_map-Define-md-clear-CPUID-bit.patch
Patch2: 96f41cd7-admin-reject-clients.patch
Patch3: f111e094-locking-restrict-sockets-to-mode-0600.patch
Patch4: e37bd65f-logging-restrict-sockets-to-mode-0600.patch
Patch5: 76b420d0-build-libqemutestdriver-lto-fix.patch
# Patches pending upstream review
Patch100: libxl-dom-reset.patch
Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch
@ -882,6 +883,7 @@ libvirt plugin for NSS for translating domain names into IP addresses.
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch100 -p1
%patch101 -p1
%patch150 -p1