[dpdk] Always build with -fPIC
Panu Matilainen
pmatilai at fedoraproject.org
Wed Jan 28 14:49:06 UTC 2015
commit b6f873410a87d70edd7392c4454b0ef4d3845a13
Author: Panu Matilainen <pmatilai at redhat.com>
Date: Wed Jan 28 14:13:27 2015 +0200
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 files 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 <pmatilai at redhat.com> - 1.7.0-8
+- Always build with -fPIC
+
* Wed Jan 28 2015 Panu Matilainen <pmatilai at redhat.com> - 1.7.0-7
- Policy compliance: move static libraries to -devel, provide dpdk-static
- Add a spec option to build as shared libraries
More information about the scm-commits
mailing list