[meta-intel] [master & fido][PATCH 2/6] meta-isg: qat: fix inline build errors for gcc5

Anuj Mittal anujx.mittal at intel.com
Fri Sep 18 00:40:05 PDT 2015


gcc5 has changed its default standard to gnu11 from gnu89.
These two standards have different inline semantics. This
results in errors like:

   undefined reference to `icp_adf_getQueueNext'
   undefined reference to `icp_adf_updateQueueTail'
   undefined reference to `icp_adf_pollQueue'
   undefined reference to `icp_adf_queueDataToSend'
   undefined reference to `icp_adf_getQueueMemory'

Use the -fgnu89-inline command line option as suggested in [1].

Also, make sure that all the CFLAGS values are being picked up
by the compiler.

[1]  https://gcc.gnu.org/gcc-5/porting_to.html

Signed-off-by: Anuj Mittal <anujx.mittal at intel.com>
---
 meta-isg/common/recipes-extended/qat/qat16.inc     |    3 ++
 ...t16_2.3.0-34-make-sure-CFLAGS-are-correct.patch |   30 ++++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 meta-isg/common/recipes-extended/qat/qat16/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch

diff --git a/meta-isg/common/recipes-extended/qat/qat16.inc b/meta-isg/common/recipes-extended/qat/qat16.inc
index e602dbd..822db5d 100644
--- a/meta-isg/common/recipes-extended/qat/qat16.inc
+++ b/meta-isg/common/recipes-extended/qat/qat16.inc
@@ -14,6 +14,7 @@ PROVIDES += "virtual/qat"
 SRC_URI="https://01.org/sites/default/files/page/qatmux.l.${PV}.tgz;name=qat \
          file://qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch \
          file://qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch \
+         file://qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch \
          "
 
 COMPATIBLE_MACHINE = "crystalforest"
@@ -46,6 +47,8 @@ PARALLEL_MAKE = ""
 #To get around the double slashes in paths in QAT makefiles
 PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
 
+EXTRA_OEMAKE_append = " CFLAGS+=-fgnu89-inline"
+
 do_unpack2() {
         cd ${S}/
         tar xzvf ${ICP_DRIVER_TYPE}.L.${PV}.tar.gz
diff --git a/meta-isg/common/recipes-extended/qat/qat16/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch b/meta-isg/common/recipes-extended/qat/qat16/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch
new file mode 100644
index 0000000..e1ed3fc
--- /dev/null
+++ b/meta-isg/common/recipes-extended/qat/qat16/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch
@@ -0,0 +1,30 @@
+From 83f465ee776868875f6c19c2110eed4db6c547ce Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anujx.mittal at intel.com>
+Date: Thu, 10 Sep 2015 11:58:44 +0800
+Subject: [PATCH] qat: make sure CFLAGS are correct
+
+Upstream-Status: Submitted
+
+Ensure that all the CFLAGS values are being considered.
+
+Signed-off-by: Anuj Mittal <anujx.mittal at intel.com>
+---
+ quickassist/adf/user/user_proxy/src/Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/quickassist/adf/user/user_proxy/src/Makefile b/quickassist/adf/user/user_proxy/src/Makefile
+index 868313a..efd352c 100644
+--- a/quickassist/adf/user/user_proxy/src/Makefile
++++ b/quickassist/adf/user/user_proxy/src/Makefile
+@@ -133,7 +133,7 @@ INCLUDES+= -I$(ADF_DIR)/include           \
+            -I$(ADF_PLATFORM_DIR)/include  \
+            -I$(ADF_CTL_DIR)/include
+ 
+-CFLAGS = -D_GNU_SOURCE -O2 $(INCLUDES)
++CFLAGS += -D_GNU_SOURCE -O2 $(INCLUDES)
+ #needed by SAL
+ EXTRA_CFLAGS += -fPIC -fno-strict-aliasing
+ #include your $(ICP_OS)_$(ICP_OS_LEVEL).mk file
+-- 
+1.7.9.5
+
-- 
1.7.9.5



More information about the meta-intel mailing list