summaryrefslogtreecommitdiff
path: root/net-vpn/openvpn/files/openvpn-2.7.7-tests-no-lto.patch
blob: ca7b2e48afc3819603080b4649fa78b2aff0375a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Avoid building one test with LTO because it doesn't play well with -Wl,--wrap. To
do this, we also have to build with -ffat-lto-objects in the ebuild.

See https://bugs.gentoo.org/877741#c9 specifically.
--- a/tests/unit_tests/openvpn/Makefile.am
+++ b/tests/unit_tests/openvpn/Makefile.am
@@ -176,8 +176,9 @@
 if !WIN32
 tls_crypt_testdriver_CFLAGS  = \
 	-I$(top_srcdir)/include -I$(top_srcdir)/src/compat -I$(top_srcdir)/src/openvpn \
-	@TEST_CFLAGS@
+	@TEST_CFLAGS@ -fno-lto
 tls_crypt_testdriver_LDFLAGS = @TEST_LDFLAGS@ \
+	-fno-lto \
 	-Wl,--wrap=buffer_read_from_file \
 	-Wl,--wrap=buffer_write_file \
 	-Wl,--wrap=parse_line \