From 91185af140aa2b2f0aeac77484295d15c9361b33 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Fri, 10 Jul 2015 15:37:08 -0400 Subject: Fix perf build with hardening So. Because of the joys of how perf builds up its LDFLAGS, builds started failing in rawhide with the latest perl build. See, perf thinks it is a good idea to look at perl (and python too) and see what ld options were used to build it, then just slam those into what it uses. That's cute, and probably kind of works, but with the hardening changes it totally broke the build. One of the final links failed with: /usr/bin/ld: perf-in.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC perf-in.o: error adding symbols: Bad value because it sucked in the hardened build LD options from perl, but didn't we didn't pass in the required CFLAGS options. Isn't that special? Fix this by specifying both LDFLAGS (so it isn't magically getting applied without thought) and EXTRA_CFLAGS for the perf build. I hate everything. --- kernel.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel.spec') diff --git a/kernel.spec b/kernel.spec index 62dc3bb9c..c7854ab4f 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1739,7 +1739,7 @@ BuildKernel %make_target %kernel_image %endif %global perf_make \ - make -s %{?cross_opts} %{?_smp_mflags} -C tools/perf V=1 NO_PERF_READ_VDSO32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=%{_prefix} + make -s EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{?cross_opts} %{?_smp_mflags} -C tools/perf V=1 NO_PERF_READ_VDSO32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=%{_prefix} %if %{with_perf} # perf %{perf_make} DESTDIR=$RPM_BUILD_ROOT all -- cgit