From b6f873410a87d70edd7392c4454b0ef4d3845a13 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 28 Jan 2015 14:13:27 +0200 Subject: [PATCH] Always build with -fPIC Upstream makefiles only enable -fPIC for shared libs, but on x86_64 its needed for static libs as well when combined with dynamic linking (otherwise building eg OVS fails with relocation R_X86_64_32 errors) Ciuld arch-conditionalize it but then this only builds for x86_64 atm... --- dpdk.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dpdk.spec b/dpdk.spec index 46cebc4..f26961c 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -5,7 +5,7 @@ Name: dpdk Version: 1.7.0 -Release: 7%{?dist} +Release: 8%{?dist} URL: http://dpdk.org Source: http://dpdk.org/browse/dpdk/snapshot/dpdk-%{version}.tar.gz @@ -71,7 +71,7 @@ sed -i 's:^CONFIG_RTE_BUILD_SHARED_LIB=n$:CONFIG_RTE_BUILD_SHARED_LIB=y:g' confi %build -export EXTRA_CFLAGS="%{optflags}" +export EXTRA_CFLAGS="%{optflags} -fPIC" # DPDK defaults to using builder-specific compiler flags. However, # the config has been changed by specifying CONFIG_RTE_MACHINE=default @@ -174,6 +174,9 @@ install -m 644 ${comblib} %{buildroot}/%{_libdir}/%{name}-%{version}/${comblib} %endif %changelog +* Wed Jan 28 2015 Panu Matilainen - 1.7.0-8 +- Always build with -fPIC + * Wed Jan 28 2015 Panu Matilainen - 1.7.0-7 - Policy compliance: move static libraries to -devel, provide dpdk-static - Add a spec option to build as shared libraries