* Unify LFLAGS/LDFLAGS variable names (only tee-supplicant was using LDFLAGS). * Fixes: ERROR: optee-client-2.4.0+gitAUTOINC+1df4046bd7-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary: 'optee-client/2.4.0+gitAUTOINC+1df4046bd7-r0/packages-split/optee-client/usr/bin/tee-supplicant' No GNU_HASH in the elf binary: 'optee-client/2.4.0+gitAUTOINC+1df4046bd7-r0/packages-split/optee-client/usr/lib/libteec.so.1.0' [ldflags] ERROR: optee-client-2.4.0+gitAUTOINC+1df4046bd7-r0 do_package_qa: QA run found fatal errors. Please consider fixing them. ERROR: optee-client-2.4.0+gitAUTOINC+1df4046bd7-r0 do_package_qa: Function failed: do_package_qa ERROR: Logfile of failure stored in: optee-client/2.4.0+gitAUTOINC+1df4046bd7-r0/temp/log.do_package_qa.31246
Signed-off-by: Martin Jansa Martin.Jansa@gmail.com --- meta-optee/recipes-security/optee/optee-client.bb | 1 + .../0001-Respect-LDFLAGS-set-from-OE-build.patch | 105 +++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 meta-optee/recipes-security/optee/optee-client/0001-Respect-LDFLAGS-set-from-OE-build.patch
diff --git a/meta-optee/recipes-security/optee/optee-client.bb b/meta-optee/recipes-security/optee/optee-client.bb index 7b471f3..4c5ac1a 100644 --- a/meta-optee/recipes-security/optee/optee-client.bb +++ b/meta-optee/recipes-security/optee/optee-client.bb @@ -9,6 +9,7 @@ PV = "2.4.0+git${SRCPV}" inherit pythonnative systemd
SRC_URI = "git://github.com/OP-TEE/optee_client.git \ + file://0001-Respect-LDFLAGS-set-from-OE-build.patch \ file://tee-supplicant.service" S = "${WORKDIR}/git"
diff --git a/meta-optee/recipes-security/optee/optee-client/0001-Respect-LDFLAGS-set-from-OE-build.patch b/meta-optee/recipes-security/optee/optee-client/0001-Respect-LDFLAGS-set-from-OE-build.patch new file mode 100644 index 0000000..4d25b76 --- /dev/null +++ b/meta-optee/recipes-security/optee/optee-client/0001-Respect-LDFLAGS-set-from-OE-build.patch @@ -0,0 +1,105 @@ +From 73cb675c16bd63ee0e760a4067ffda4b050d19fa Mon Sep 17 00:00:00 2001 +From: Martin Jansa Martin.Jansa@gmail.com +Date: Thu, 15 Jun 2017 17:20:35 -0700 +Subject: [PATCH] Respect LDFLAGS set from OE build + +* Unify LFLAGS/LDFLAGS variable names (only tee-supplicant was using LDFLAGS). +* Fixes: + ERROR: optee-client-2.4.0+gitAUTOINC+1df4046bd7-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary: 'optee-client/2.4.0+gitAUTOINC+1df4046bd7-r0/packages-split/optee-client/usr/bin/tee-supplicant' + No GNU_HASH in the elf binary: 'optee-client/2.4.0+gitAUTOINC+1df4046bd7-r0/packages-split/optee-client/usr/lib/libteec.so.1.0' [ldflags] + ERROR: optee-client-2.4.0+gitAUTOINC+1df4046bd7-r0 do_package_qa: QA run found fatal errors. Please consider fixing them. + ERROR: optee-client-2.4.0+gitAUTOINC+1df4046bd7-r0 do_package_qa: Function failed: do_package_qa + ERROR: Logfile of failure stored in: optee-client/2.4.0+gitAUTOINC+1df4046bd7-r0/temp/log.do_package_qa.31246 + +Upstream-Status: Pending +Signed-off-by: Martin Jansa Martin.Jansa@gmail.com + +--- + libsqlfs/Makefile | 2 +- + libsqlite3/Makefile | 2 +- + libteec/Makefile | 2 +- + tee-supplicant/Makefile | 10 +++++----- + 4 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/libsqlfs/Makefile b/libsqlfs/Makefile +index b53ccde..7a3bde6 100644 +--- a/libsqlfs/Makefile ++++ b/libsqlfs/Makefile +@@ -38,7 +38,7 @@ SQLFS_CFLAGS := $(addprefix -I, $(SQLFS_INCLUDES)) \ + $(filter-out $(SQLFS_CFLAGS_REMOVE),$(CFLAGS)) \ + -Wno-missing-format-attribute + +-SQLFS_LFLAGS := -lpthread ++SQLFS_LFLAGS := $(LDFLAGS) -lpthread + SQLFS_LIBS := $(OUT_DIR)/../libsqlite3/libsqlite3.a + SQLFS_LIBRARY := $(OUT_DIR)/$(LIB_MAJ_MIN) + +diff --git a/libsqlite3/Makefile b/libsqlite3/Makefile +index a69aabd..6a6d833 100644 +--- a/libsqlite3/Makefile ++++ b/libsqlite3/Makefile +@@ -19,7 +19,7 @@ SQLITE3_CFLAGS_REMOVE := -Wall -Wbad-function-cast -Wswitch-default \ + -Wfloat-equal -Werror -Wwrite-strings -Wcast-align + SQLITE3_CFLAGS := $(addprefix -I, $(SQLITE3_INCLUDES)) \ + $(filter-out $(SQLITE3_CFLAGS_REMOVE),$(CFLAGS)) +-SQLITE3_LFLAGS := ++SQLITE3_LFLAGS := $(LDFLAGS) + SQLITE3_LIBRARY := $(OUT_DIR)/$(LIB_NAME) + + libsqlite3: $(SQLITE3_LIBRARY) +diff --git a/libteec/Makefile b/libteec/Makefile +index 66055a7..d3eb2a1 100644 +--- a/libteec/Makefile ++++ b/libteec/Makefile +@@ -29,7 +29,7 @@ TEEC_CFLAGS := $(addprefix -I, $(TEEC_INCLUDES)) $(CFLAGS) -D_GNU_SOURCE \ + -DDEBUGLEVEL_$(CFG_TEE_CLIENT_LOG_LEVEL) \ + -DBINARY_PREFIX="TEEC" + +-TEEC_LFLAGS := -lpthread ++TEEC_LFLAGS := $(LDFLAGS) -lpthread + TEEC_LIBRARY := $(OUT_DIR)/$(LIB_MAJ_MIN) + + libteec: $(TEEC_LIBRARY) +diff --git a/tee-supplicant/Makefile b/tee-supplicant/Makefile +index 204273f..40df763 100644 +--- a/tee-supplicant/Makefile ++++ b/tee-supplicant/Makefile +@@ -57,7 +57,7 @@ ifeq ($(CFG_TA_TEST_PATH),y) + TEES_CFLAGS += -DCFG_TA_TEST_PATH=1 + endif + TEES_FILE := $(OUT_DIR)/$(PACKAGE_NAME) +-TEES_LDFLAGS := -L$(OUT_DIR)/../libteec -lteec ++TEES_LFLAGS := $(LDFLAGS) -L$(OUT_DIR)/../libteec -lteec + + ifeq ($(CFG_SQL_FS),y) + TEES_CFLAGS += -DCFG_SQL_FS +@@ -67,22 +67,22 @@ TEES_CFLAGS_sql_fs.c := -Wno-strict-prototypes \ + # Note: explicitly requesting a shared library (.so) here, because statically + # linking a LGPL library has licensing implications. Make sure you review + # and comply with libsqlfs/COPYING section 6 before doing so. +-TEES_LDFLAGS += -L$(OUT_DIR)/../libsqlfs -l:libsqlfs.so -ldl ++TEES_LFLAGS += -L$(OUT_DIR)/../libsqlfs -l:libsqlfs.so -ldl + endif + + ifeq ($(CFG_TA_GPROF_SUPPORT),y) + TEES_CFLAGS += -DCFG_TA_GPROF_SUPPORT + endif + +-TEES_LDFLAGS += -lpthread ++TEES_LFLAGS += -lpthread + # Needed to get clock_gettime() for for glibc versions before 2.17 +-TEES_LDFLAGS += -lrt ++TEES_LFLAGS += -lrt + + tee-supplicant: $(TEES_FILE) + + $(TEES_FILE): $(TEES_OBJS) + @echo " LINK $@" +- $(VPREFIX)$(CC) -o $@ $+ $(TEES_LDFLAGS) ++ $(VPREFIX)$(CC) -o $@ $+ $(TEES_LFLAGS) + @echo "" + + $(TEES_OBJ_DIR)/%.o: $(TEES_SRC_DIR)/%.c +-- +1.9.1 +