0001-Makefile.am-add-CFLAGS-and-LDFLAGS-definiton.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From 75c1d3b8667328d874590a5321eb244256b7d932 Mon Sep 17 00:00:00 2001
  2. From: Mingli Yu <Mingli.Yu@windriver.com>
  3. Date: Wed, 18 Jan 2017 07:35:58 +0000
  4. Subject: [PATCH] Makefile.am: add CFLAGS and LDFLAGS definiton
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. * When build libatasmart, we need first build strpool in host
  9. env. To build strpool, the compiler is host compiler, but
  10. the CFLAGS and LDFLAGS are for cross-compiler, so unify them
  11. to fix below error.
  12. | make -C strpool strpool
  13. | make[1]: Entering directory '../libatasmart/0.19-r0/build/strpool'
  14. | gcc -DHAVE_CONFIG_H -I. -I../../git/strpool -I.. -isystem../build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -O2 -pipe -g -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -c -o strpool.o `test -f '../strpool.c' || echo '../../git/strpool/'`../strpool.c
  15. | gcc: error: unrecognized command line option ‘-fstack-protector-strong’
  16. | make[1]: *** [Makefile:404: strpool.o] Error 1
  17. Upstream-Status: Pending
  18. Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
  19. ---
  20. strpool/Makefile.am | 2 ++
  21. 1 file changed, 2 insertions(+)
  22. diff --git a/strpool/Makefile.am b/strpool/Makefile.am
  23. index b041cea..013fcd3 100644
  24. --- a/strpool/Makefile.am
  25. +++ b/strpool/Makefile.am
  26. @@ -17,6 +17,8 @@
  27. # <http://www.gnu.org/licenses/>.
  28. CC = @CC_FOR_BUILD@
  29. +CFLAGS = @BUILD_CFLAGS@
  30. +LDFLAGS = @BUILD_LDFLAGS@
  31. AM_CFLAGS = @BUILD_CFLAGS@
  32. AM_LDFLAGS = @BUILD_LDFLAGS@
  33. --
  34. 2.11.0