All of lore.kernel.org
 help / color / mirror / Atom feed
From: <ting.liu@nxp.com>
To: <meta-freescale@yoctoproject.org>
Subject: [meta-freescale-layer][PATCH 8/9] ipc-ust: obey LDFLAGS to fix GNU_HASH error
Date: Fri, 12 Aug 2016 18:43:56 +0800	[thread overview]
Message-ID: <1470998637-8210-9-git-send-email-ting.liu@nxp.com> (raw)
In-Reply-To: <1470998637-8210-1-git-send-email-ting.liu@nxp.com>

From: Ting Liu <ting.liu@nxp.com>

Signed-off-by: Ting Liu <ting.liu@nxp.com>
---
 .../ipc-ust/Makefile-use-LDFLAGS-if-set.patch      | 86 ++++++++++++++++++++++
 recipes-extended/ipc-ust/ipc-ust_git.bb            |  4 +-
 2 files changed, 89 insertions(+), 1 deletion(-)
 create mode 100644 recipes-extended/ipc-ust/ipc-ust/Makefile-use-LDFLAGS-if-set.patch

diff --git a/recipes-extended/ipc-ust/ipc-ust/Makefile-use-LDFLAGS-if-set.patch b/recipes-extended/ipc-ust/ipc-ust/Makefile-use-LDFLAGS-if-set.patch
new file mode 100644
index 0000000..e991f70
--- /dev/null
+++ b/recipes-extended/ipc-ust/ipc-ust/Makefile-use-LDFLAGS-if-set.patch
@@ -0,0 +1,86 @@
+From 4c0accfce78610e21f5d9b75725a0b9fa2c6cfb9 Mon Sep 17 00:00:00 2001
+From: Ting Liu <ting.liu@nxp.com>
+Date: Fri, 12 Aug 2016 10:41:51 +0800
+Subject: [PATCH] Makefile: use LDFLAGS if set
+
+Signed-off-by: Ting Liu <ting.liu@nxp.com>
+---
+ dsp_boot/Makefile |  6 +++---
+ fsl_shm/Makefile  |  4 ++--
+ ipc/Makefile      | 14 +++++++-------
+ 3 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/dsp_boot/Makefile b/dsp_boot/Makefile
+index 8f30076..59eb648 100644
+--- a/dsp_boot/Makefile
++++ b/dsp_boot/Makefile
+@@ -20,12 +20,12 @@ endif
+ all: fsl_shm lib_dsp_boot dsp_bt
+ lib_dsp_boot:
+ 	$(CC) -c ./libdspboot.c $(CFLAGS) -o ./libdspboot.o
+-	$(CC) -shared -fPIC ./libdspboot.o -o libdspboot.so
++	$(CC) -shared -fPIC $(LDFLAGS) ./libdspboot.o -o libdspboot.so
+ 	$(AR) rcs libdspboot.a ./libdspboot.o ../fsl_shm/lib/lg_shm.o
+ fsl_shm:
+-	$(CC) -c $(CFLAGS) $(SOURCES_FSL_SHM)
++	$(CC) -c $(CFLAGS) $(LDFLAGS) $(SOURCES_FSL_SHM)
+ dsp_bt:
+-	$(CC) $(CFLAGS) $(SOURCES) $(SOURCES_FSL_SHM) -L. -ldspboot -L../ipc -lipc -o $@
++	$(CC) $(CFLAGS) $(LDFLAGS) $(SOURCES) $(SOURCES_FSL_SHM) -L. -ldspboot -L../ipc -lipc -o $@
+ 	cp libdspboot.so  ../ipc/ -v
+ clean:
+ 	rm -rf *.o dsp_bt libdspboot.so *.a
+diff --git a/fsl_shm/Makefile b/fsl_shm/Makefile
+index 0042055..0b9f581 100644
+--- a/fsl_shm/Makefile
++++ b/fsl_shm/Makefile
+@@ -4,11 +4,11 @@ CFLAGS=-fPIC -I ./lib -I ./include -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -W
+ 
+ all: lg_shm_lib lg_shm_test
+ lg_shm_lib:
+-	$(CC) -c ./lib/lg_shm.c $(CFLAGS) -o ./lib/lg_shm.o
++	$(CC) -c ./lib/lg_shm.c $(CFLAGS) $(LDFLAGS) -o ./lib/lg_shm.o
+ 	$(AR) rcs liblg_shm.a ./lib/lg_shm.o
+ 
+ lg_shm_test:
+-	$(CC) ./test/app.c $(CFLAGS) -L. -llg_shm -o app
++	$(CC) ./test/app.c $(CFLAGS) $(LDFLAGS) -L. -llg_shm -o app
+ 
+ clean:
+ 	rm -rf app ./lib/*.o *.a
+diff --git a/ipc/Makefile b/ipc/Makefile
+index 06599f6..cbb63d6 100644
+--- a/ipc/Makefile
++++ b/ipc/Makefile
+@@ -29,21 +29,21 @@ ipc_lib:
+ 	$(CC) -c ./lib/fsl_user_dma.c $(CFLAGS) -o ./lib/fsl_user_dma.o
+ 	$(CC) -c ./lib/fsl_ipc_lock.c $(CFLAGS) -o ./lib/fsl_ipc_lock.o
+ 	$(CC) -c ../dsp_boot/libdspboot.c $(CFLAGS2) -o ../dsp_boot/libdspboot.o
+-	$(CC) -shared -fPIC -lpthread ./lib/fsl_user_dma.o ./lib/fsl_ipc_channel.o ./lib/fsl_ipc_lock.o ../dsp_boot/libdspboot.o -L../fsl_shm -llg_shm -o libipc.so
++	$(CC) -shared -fPIC -lpthread $(LDFLAGS) ./lib/fsl_user_dma.o ./lib/fsl_ipc_channel.o ./lib/fsl_ipc_lock.o ../dsp_boot/libdspboot.o -L../fsl_shm -llg_shm -o libipc.so
+ 	$(AR) rcs libipc.a ./lib/fsl_ipc_channel.o ./lib/fsl_ipc_lock.o ../dsp_boot/libdspboot.o ./lib/fsl_user_dma.o ../fsl_shm/lib/lg_shm.o
+ 
+ mem_lib:
+ 	$(CC) -c ./lib/fsl_usmmgr.c $(CFLAGS) -o ./lib/fsl_usmmgr.o
+ 	$(CC) -c ./lib/fsl_ipc_lock.c $(CFLAGS) -o ./lib/fsl_ipc_lock.o
+-	$(CC) -shared -fPIC ./lib/fsl_usmmgr.o ./lib/fsl_ipc_lock.o -L../fsl_shm -llg_shm  -o libmem.so
++	$(CC) -shared -fPIC $(LDFLAGS) ./lib/fsl_usmmgr.o ./lib/fsl_ipc_lock.o -L../fsl_shm -llg_shm  -o libmem.so
+ 	$(AR) rcs libmem.a ./lib/fsl_usmmgr.o ./lib/fsl_ipc_lock.o ../fsl_shm/lib/lg_shm.o
+ 
+ ipc_test:
+-	$(CC) ./test/ipc_test.c $(CFLAGS) -L. -lipc -lmem -o ipc_test
+-	$(CC) ./test/ipc_test67.c $(CFLAGS) -L. -lipc -lmem -o ipc_test67
+-	$(CC) ./test/dsp_recover.c $(CFLAGS) -L. -lipc -lmem -o dsp_recover
+-	$(CC) ./test/l1_defense_app.c $(CFLAGS) -L. -lipc -lmem -o l1d_app
+-	$(CC) ./test/fsl_dump_memory.c $(CFLAGS) -L. -lipc -lmem -o dump_mem
++	$(CC) ./test/ipc_test.c $(CFLAGS) $(LDFLAGS) -L. -lipc -lmem -o ipc_test
++	$(CC) ./test/ipc_test67.c $(CFLAGS) $(LDFLAGS) -L. -lipc -lmem -o ipc_test67
++	$(CC) ./test/dsp_recover.c $(CFLAGS) $(LDFLAGS) -L. -lipc -lmem -o dsp_recover
++	$(CC) ./test/l1_defense_app.c $(CFLAGS) $(LDFLAGS) -L. -lipc -lmem -o l1d_app
++	$(CC) ./test/fsl_dump_memory.c $(CFLAGS) $(LDFLAGS) -L. -lipc -lmem -o dump_mem
+ 
+ clean:
+ 	rm -rf dump_mem ipc_test ipc_test67 dsp_recover l1d_app ./lib/*.o *.a *.so
+-- 
+1.9.2
+
diff --git a/recipes-extended/ipc-ust/ipc-ust_git.bb b/recipes-extended/ipc-ust/ipc-ust_git.bb
index c2f30e8..6e788e7 100644
--- a/recipes-extended/ipc-ust/ipc-ust_git.bb
+++ b/recipes-extended/ipc-ust/ipc-ust_git.bb
@@ -3,7 +3,9 @@ DESCRIPTION = "DSP boot application and ipc test application"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=fa38cd73d71527dc6efb546474f64d10"
 
-SRC_URI = "git://git.freescale.com/ppc/sdk/ipc.git;branch=sdk-v2.0.x"
+SRC_URI = "git://git.freescale.com/ppc/sdk/ipc.git;branch=sdk-v2.0.x \
+    file://Makefile-use-LDFLAGS-if-set.patch \
+"
 SRCREV = "74d662707558290f070f9589177db730444bc435"
 
 S = "${WORKDIR}/git"
-- 
1.9.2



  parent reply	other threads:[~2016-08-12 10:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12 10:43 [meta-freescale-layer][PATCH 0/9] QorIQ patches ting.liu
2016-08-12 10:43 ` [meta-freescale-layer][PATCH 1/9] linux-qoriq: fix build path of the dtb ting.liu
2016-08-12 10:43 ` [meta-freescale-layer][PATCH 2/9] fsl-kernel-localversion: Make sure build dir exist before create .config ting.liu
2016-08-12 10:43 ` [meta-freescale-layer][PATCH 3/9] c293pcie: c293pcie_36b.dtb -> c293pcie.dtb ting.liu
2016-08-12 10:43 ` [meta-freescale-layer][PATCH 4/9] qoriq-base.inc: set PREFERRED_VERSION_testfloat to 2a ting.liu
2016-08-12 10:43 ` [meta-freescale-layer][PATCH 5/9] usdpaa-apps: obey LDFLAGS to fix GNU_HASH error ting.liu
2016-08-12 10:43 ` [meta-freescale-layer][PATCH 6/9] pme-tools: " ting.liu
2016-08-12 10:43 ` [meta-freescale-layer][PATCH 7/9] skmm-ep: " ting.liu
2016-08-12 10:43 ` ting.liu [this message]
2016-08-12 10:43 ` [meta-freescale-layer][PATCH 9/9] auto-resp: skip ldflags check ting.liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470998637-8210-9-git-send-email-ting.liu@nxp.com \
    --to=ting.liu@nxp.com \
    --cc=meta-freescale@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.