[meta-intel] [meta-intel-iot-middleware][PATCH] hiredis: Fix build on arm platform

Andrea Galbusera gizero at gmail.com
Fri Aug 7 07:15:33 PDT 2015


* upgrade previous patch to avoid wiping CFLAGS. This fixes build on arm
platforms which previously caused an issue due to -fPIC being lost

Signed-off-by: Andrea Galbusera <gizero at gmail.com>
---
Note: I'm re-sending this beacuse initially sent to the list as a
non-member.

This patch is inteded to fix a build error when building on arm
platforms. To reproduce the issue just bitbake hiredis for the Yocto
arm reference machine beaglebone.

The error comes from the -fPIC compiler option being lost due to the
current version of 0001-Makefile-remove-hardcoding-of-CC.patch which
does not honor CFLAGS from the environment.

The proposed patch is a minimal variation of the current version that
fixes the issue both on a cortexa5 target and the beaglebone.

The patch was also successfully build tested against qemuarm and qemux86.

Also available on GitHub at:
https://github.com/gizero/meta-intel-iot-middleware/tree/hiredis-fix-arm-build

 .../0001-Makefile-remove-hardcoding-of-CC.patch    | 34 +++++++++++-----------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch b/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch
index cfacc8c..fef2bc7 100644
--- a/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch
+++ b/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch
@@ -1,32 +1,32 @@
-From 193d499c59871ab4ce1785fecf3642699bb593bf Mon Sep 17 00:00:00 2001
-From: Brendan Le Foll <brendan.le.foll at intel.com>
-Date: Wed, 18 Jun 2014 16:26:53 +0100
+From d13b918a3ff8b0ebfd1e7b18b198b4b45841d720 Mon Sep 17 00:00:00 2001
+From: Andrea Galbusera <gizero at gmail.com>
+Date: Fri, 31 Jul 2015 16:42:08 +0200
 Subject: [PATCH] Makefile: remove hardcoding of CC
 
-Signed-off-by: Brendan Le Foll <brendan.le.foll at intel.com>
+* upgrade previous patch to avoid wiping CFLAGS. This fixes build on arm
+platforms which previously caused and issue due to -fPIC being lost
+
+Signed-off-by: Andrea Galbusera <gizero at gmail.com>
 ---
- Makefile |    8 --------
- 1 file changed, 8 deletions(-)
+ Makefile | 5 -----
+ 1 file changed, 5 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index 16b8767..0a991a3 100644
+index 8b0f0c2..66a4317 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -10,14 +10,6 @@ LIBNAME=libhiredis
- HIREDIS_MAJOR=0
- HIREDIS_MINOR=10
+@@ -34,11 +34,6 @@ define REDIS_TEST_CONFIG
+ endef
+ export REDIS_TEST_CONFIG
  
 -# Fallback to gcc when $CC is not in $PATH.
 -CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
 -OPTIMIZATION?=-O3
 -WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings
 -DEBUG?= -g -ggdb
--REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG) $(ARCH)
--REAL_LDFLAGS=$(LDFLAGS) $(ARCH)
--
- DYLIBSUFFIX=so
- STLIBSUFFIX=a
- DYLIB_MINOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(HIREDIS_MAJOR).$(HIREDIS_MINOR)
+ REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG) $(ARCH)
+ REAL_LDFLAGS=$(LDFLAGS) $(ARCH)
+ 
 -- 
-1.7.10.4
+1.9.1
 
-- 
1.9.1



More information about the meta-intel mailing list