Skip to contentSkip to conversation

tgt: ensure build LDFLAGS apply to all executables

PATCH In review Mark Asselstine 2 participants 2 messages Jan 9, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tgt: ensure build LDFLAGS apply to all executables

Some of the tgt executables were not being built with the gnu-hash causing a QA error. There is no apparent reason to have differences in how the tgt executables are built so ensure they all use the LDFLAGS.

---
 .../tgt/files/0001-usr-Makefile-WARNING-fix.patch  |  2 +-
 ...Makefile-apply-LDFLAGS-to-all-executables.patch | 35 ++++++++++++++++++++++
 meta-openstack/recipes-support/tgt/tgt_git.bb      |  8 +++--
 3 files changed, 41 insertions(+), 4 deletions(-)
 create mode 100644 meta-openstack/recipes-support/tgt/files/usr-Makefile-apply-LDFLAGS-to-all-executables.patch
meta-openstack/recipes-support/tgt/files/0001-usr-Makefile-WARNING-fix.patch +1 -1
index 15f5482..f749101 100644
@@ -22,7 +22,7 @@ index 1fae7e7..2db109c 100644
  TGTD_DEP = $(TGTD_OBJS:.o=.d)
  
 -LDFLAGS = -Wl,-E,-rpath=$(libdir)
-+LDFLAGS = -Wl,-E
++LDFLAGS += -Wl,-E
  
  .PHONY:all
  all: $(PROGRAMS) $(MODULES)
meta-openstack/recipes-support/tgt/files/usr-Makefile-apply-LDFLAGS-to-all-executables.patch new file +35 -0
new file mode 100644
index 0000000..d480ef7
@@ -0,0 +1,35 @@
+From a815ac8ee16b344d9e24b445957f32bf2aafa532 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <[email protected]>
+Date: Thu, 5 Jan 2017 11:07:51 -0500
+Subject: [PATCH] usr/Makefile: apply LDFLAGS to all executables
+
+Signed-off-by: Mark Asselstine <[email protected]>
+---
+ usr/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/usr/Makefile b/usr/Makefile
+index cc8df11..c55fd68 100644
+--- a/usr/Makefile
++++ b/usr/Makefile
+@@ -78,7 +78,7 @@ TGTADM_OBJS = tgtadm.o concat_buf.o
+ TGTADM_DEP = $(TGTADM_OBJS:.o=.d)
+ 
+ tgtadm: $(TGTADM_OBJS)
+-	$(CC) $^ -o $@
++	$(CC) $^ -o $@ $(LDFLAGS)
+ 
+ -include $(TGTADM_DEP)
+ 
+@@ -86,7 +86,7 @@ TGTIMG_OBJS = tgtimg.o libssc.o libcrc32c.o
+ TGTIMG_DEP = $(TGTIMG_OBJS:.o=.d)
+ 
+ tgtimg: $(TGTIMG_OBJS)
+-	$(CC) $^ -o $@
++	$(CC) $^ -o $@ $(LDFLAGS)
+ 
+ -include $(TGTIMG_DEP)
+ 
+-- 
+2.7.4
+
meta-openstack/recipes-support/tgt/tgt_git.bb +5 -3
index 5c594b1..9ca181a 100644
@@ -10,6 +10,7 @@ PV = "1.0.67+git${SRCPV}"
 SRC_URI = "git://github.com/fujita/tgt.git \
 	file://0001-Correct-the-path-of-header-files-check-in-Yocto-buil.patch \
         file://0001-usr-Makefile-WARNING-fix.patch \
+        file://usr-Makefile-apply-LDFLAGS-to-all-executables.patch \
 "
 SRC_URI += "file://tgtd.init"
 
@@ -21,9 +22,10 @@ inherit update-rc.d
 
 CFLAGS += ' -I. -DUSE_SIGNALFD -DUSE_TIMERFD -D_GNU_SOURCE -DTGT_VERSION=\\"1.0.63\\" -DBSDIR=\\"${libdir}/backing-store\\"'
 
-do_compile() {
-    oe_runmake SYSROOT="${STAGING_DIR_TARGET}" -e programs conf scripts
-}
+#do_compile() {
+#    oe_runmake SYSROOT="${STAGING_DIR_TARGET}" -e programs conf scripts
+#}
+EXTRA_OEMAKE = "-e programs conf scripts"
 
 do_install() {
     oe_runmake -e DESTDIR="${D}" install-programs install-conf install-scripts
Signature · 1 line
2.7.4
#1 lore raw
Quoted 3 lines · Mark Asselstine

Some of the tgt executables were not being built with the gnu-hash causing a QA error. There is no apparent reason to have differences in how the tgt executables are built so ensure they all use the LDFLAGS.

merged.

Bruce

Quoted 90 lines
---
 .../tgt/files/0001-usr-Makefile-WARNING-fix.patch  |  2 +-
 ...Makefile-apply-LDFLAGS-to-all-executables.patch | 35 ++++++++++++++++++++++
 meta-openstack/recipes-support/tgt/tgt_git.bb      |  8 +++--
 3 files changed, 41 insertions(+), 4 deletions(-)
 create mode 100644 meta-openstack/recipes-support/tgt/files/usr-Makefile-apply-LDFLAGS-to-all-executables.patch
meta-openstack/recipes-support/tgt/files/0001-usr-Makefile-WARNING-fix.patch +1 -1
index 15f5482..f749101 100644
@@ -22,7 +22,7 @@ index 1fae7e7..2db109c 100644
  TGTD_DEP = $(TGTD_OBJS:.o=.d)
 
 -LDFLAGS = -Wl,-E,-rpath=$(libdir)
-+LDFLAGS = -Wl,-E
++LDFLAGS += -Wl,-E
 
  .PHONY:all
  all: $(PROGRAMS) $(MODULES)
meta-openstack/recipes-support/tgt/files/usr-Makefile-apply-LDFLAGS-to-all-executables.patch new file +35 -0
new file mode 100644
index 0000000..d480ef7
@@ -0,0 +1,35 @@
+From a815ac8ee16b344d9e24b445957f32bf2aafa532 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <[email protected]>
+Date: Thu, 5 Jan 2017 11:07:51 -0500
+Subject: [PATCH] usr/Makefile: apply LDFLAGS to all executables
+
+Signed-off-by: Mark Asselstine <[email protected]>
+---
+ usr/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/usr/Makefile b/usr/Makefile
+index cc8df11..c55fd68 100644
+--- a/usr/Makefile
++++ b/usr/Makefile
+@@ -78,7 +78,7 @@ TGTADM_OBJS = tgtadm.o concat_buf.o
+ TGTADM_DEP = $(TGTADM_OBJS:.o=.d)
+
+ tgtadm: $(TGTADM_OBJS)
+-	$(CC) $^ -o $@
++	$(CC) $^ -o $@ $(LDFLAGS)
+
+ -include $(TGTADM_DEP)
+
+@@ -86,7 +86,7 @@ TGTIMG_OBJS = tgtimg.o libssc.o libcrc32c.o
+ TGTIMG_DEP = $(TGTIMG_OBJS:.o=.d)
+
+ tgtimg: $(TGTIMG_OBJS)
+-	$(CC) $^ -o $@
++	$(CC) $^ -o $@ $(LDFLAGS)
+
+ -include $(TGTIMG_DEP)
+
+--
+2.7.4
+
meta-openstack/recipes-support/tgt/tgt_git.bb +5 -3
index 5c594b1..9ca181a 100644
@@ -10,6 +10,7 @@ PV = "1.0.67+git${SRCPV}"
 SRC_URI = "git://github.com/fujita/tgt.git \
 	file://0001-Correct-the-path-of-header-files-check-in-Yocto-buil.patch \
         file://0001-usr-Makefile-WARNING-fix.patch \
+        file://usr-Makefile-apply-LDFLAGS-to-all-executables.patch \
 "
 SRC_URI += "file://tgtd.init"
 
@@ -21,9 +22,10 @@ inherit update-rc.d
 
 CFLAGS += ' -I. -DUSE_SIGNALFD -DUSE_TIMERFD -D_GNU_SOURCE -DTGT_VERSION=\\"1.0.63\\" -DBSDIR=\\"${libdir}/backing-store\\"'
 
-do_compile() {
-    oe_runmake SYSROOT="${STAGING_DIR_TARGET}" -e programs conf scripts
-}
+#do_compile() {
+#    oe_runmake SYSROOT="${STAGING_DIR_TARGET}" -e programs conf scripts
+#}
+EXTRA_OEMAKE = "-e programs conf scripts"
 
 do_install() {
     oe_runmake -e DESTDIR="${D}" install-programs install-conf install-scripts