summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anujx.mittal@intel.com>2015-07-10 10:57:44 (GMT)
committerSaul Wold <sgw@linux.intel.com>2015-07-10 20:52:27 (GMT)
commit55ae63cf99c6df8c27b236e2679db01538ec652c (patch)
tree20bd9b48f1cdcf02f5e741eb8f8481b0cecadde9
parent1ad4a81ddeec0f700f3f7d93f6c7549a714ce985 (diff)
downloadmeta-intel-55ae63cf99c6df8c27b236e2679db01538ec652c.tar.gz
meta-crystalforest: zlib-qat: remove extra cflags
Remove the extra CFLAGS not required and added a patch to get rid of the rpath that is not required when linking to a lib in sysroot. Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
-rw-r--r--meta-crystalforest/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch52
-rw-r--r--meta-crystalforest/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb34
2 files changed, 66 insertions, 20 deletions
diff --git a/meta-crystalforest/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch b/meta-crystalforest/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch
new file mode 100644
index 0000000..c360511
--- /dev/null
+++ b/meta-crystalforest/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch
@@ -0,0 +1,52 @@
1From aad2675c7bb635d8b7be47fa89a3ee87ba19d2e8 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anujx.mittal@intel.com>
3Date: Thu, 18 Jun 2015 11:46:17 +0800
4Subject: [PATCH] zlib: Remove rpaths from makefile
5
6Upstream-Status: Inappropriate [configuration]
7
8This removes references to RPATHS that are no longer
9necesary when building using bitbake.
10
11Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
12---
13 Makefile.in | 4 ++--
14 contrib/qat/qat_zlib_test/Makefile | 3 ---
15 2 files changed, 2 insertions(+), 5 deletions(-)
16
17diff --git a/Makefile.in b/Makefile.in
18index 94d8a80..cba5291 100644
19--- a/Makefile.in
20+++ b/Makefile.in
21@@ -59,12 +59,12 @@ ICP_LAC_API_DIR=$(ICP_API_DIR)/lac/
22 ICP_DC_API_DIR=$(ICP_API_DIR)/dc/
23 CFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR)
24 SFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR)
25-ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
26+#ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
27 SHARED_APP_FLAGS=-Wl,-rpath,$(ZLIB_ROOT) -L$(ZLIB_ROOT) -lz
28
29 ifdef ICP_BUILD_OUTPUT
30 TEST_LDFLAGS+=-L$(ICP_BUILD_OUTPUT)
31- ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
32+# ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
33 endif
34
35 ifdef ZLIB_DH895XCC
36diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
37index 8a29a92..ca31dd2 100644
38--- a/contrib/qat/qat_zlib_test/Makefile
39+++ b/contrib/qat/qat_zlib_test/Makefile
40@@ -84,9 +84,6 @@ OBJS = $(SRCS:%.c=%.o)
41 COVERAGE_OBJS =
42 EXE=
43 LIBQAT=
44-ifdef ICP_BUILD_OUTPUT
45- LIBQAT+= -Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
46-endif
47
48 DRIVER=icp_qa_al
49 ifdef WITH_CPA_MUX
50--
511.7.9.5
52
diff --git a/meta-crystalforest/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb b/meta-crystalforest/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb
index 30e6700..e2d2c45 100644
--- a/meta-crystalforest/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb
+++ b/meta-crystalforest/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb
@@ -20,6 +20,7 @@ SRC_URI = "http://www.zlib.net/zlib-${ZLIB_VERSION}.tar.gz;name=zlib \
20 https://01.org/sites/default/files/page/zlib_shim_0.4.7-002_withdocumentation.zip;name=zlibqat \ 20 https://01.org/sites/default/files/page/zlib_shim_0.4.7-002_withdocumentation.zip;name=zlibqat \
21 file://zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch \ 21 file://zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch \
22 file://zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch \ 22 file://zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch \
23 file://zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch \
23 " 24 "
24 25
25SRC_URI[zlib.md5sum] = "44d667c142d7cda120332623eab69f40" 26SRC_URI[zlib.md5sum] = "44d667c142d7cda120332623eab69f40"
@@ -33,24 +34,17 @@ ZLIB_QAT_VERSION = "0.4.7-002"
33 34
34S = "${WORKDIR}/zlib-${ZLIB_VERSION}" 35S = "${WORKDIR}/zlib-${ZLIB_VERSION}"
35 36
36export ICP_ROOT = "${PKG_CONFIG_SYSROOT_DIR}" 37export ICP_ROOT = "${S}"
37export ZLIB_ROOT = "${S}" 38export ZLIB_ROOT = "${S}"
38export ICP_ZLIBQAT = "${S}"
39export ICP_BUILD_OUTPUT = "${ICP_ROOT}/lib"
40export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}" 39export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
41export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}" 40export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}"
42 41export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac"
43CFLAGS += "\ 42export ICP_DC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/dc"
44 -I${ICP_ROOT}/usr/include \ 43export ZLIB_DH895XCC = "1"
45 -I${ICP_ROOT}/usr/include/dc \ 44export ZLIB_MEMORY_DRIVER = "qat_mem"
46 -I${ZLIB_ROOT}/ \ 45export ICP_BUILD_OUTPUT = "${STAGING_DIR_TARGET}"
47 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DUSE_QAT_MEM -I${ZLIB_ROOT}/contrib/qat/qat_mem -D_GNU_SOURCE \
48 -L${ZLIB_ROOT} -lz \
49 -L${ICP_ROOT}/usr/lib/ -lpthread -lcrypto -ldl -lrt \
50 -L${ICP_ROOT}/usr/lib/ -licp_qa_al -losal -ladf_proxy"
51 46
52inherit module 47inherit module
53MODULE_DIR = "${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers"
54MEM_PATH = "${S}/contrib/qat" 48MEM_PATH = "${S}/contrib/qat"
55 49
56do_unpack2(){ 50do_unpack2(){
@@ -68,25 +62,25 @@ do_patch() {
68 patch -p1 < ${WORKDIR}/zlib-1.2.8-qat.patch 62 patch -p1 < ${WORKDIR}/zlib-1.2.8-qat.patch
69 patch -p1 < ${WORKDIR}/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch 63 patch -p1 < ${WORKDIR}/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch
70 patch -p1 < ${WORKDIR}/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch 64 patch -p1 < ${WORKDIR}/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch
65 patch -p1 < ${WORKDIR}/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch
71} 66}
72 67
73do_configure() { 68do_configure() {
74 cd ${S} 69 ./configure --prefix=${prefix} --shared --libdir=${libdir}
75 ./configure
76} 70}
77 71
78do_compile() { 72do_compile() {
79 EXTRA_OEMAKE="'CFLAGS=${CFLAGS} -fPIC'" 73 unset CFLAGS CXXFLAGS
80 cd ${MEM_PATH}/qat_mem/
81 oe_runmake 74 oe_runmake
82 cd ${S}/ 75
76 cd ${S}/contrib/qat/qat_mem
83 oe_runmake 77 oe_runmake
84 cd ${MEM_PATH}/qat_zlib_test/ 78
79 cd ${S}/contrib/qat/qat_zlib_test
85 oe_runmake 80 oe_runmake
86} 81}
87 82
88do_install() { 83do_install() {
89 chrpath -d ${MEM_PATH}/qat_zlib_test/comptestapp
90 install -m 0755 -d ${D}${bindir}/ 84 install -m 0755 -d ${D}${bindir}/
91 install -m 0755 -d ${D}${sysconfdir}/zlib_conf/ 85 install -m 0755 -d ${D}${sysconfdir}/zlib_conf/
92 86