summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/ncurses/files
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2017-02-14 02:02:19 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-23 12:29:20 -0800
commite5d1cbbc1a04b0b190f3706e7ab7421c87d46c78 (patch)
tree47e36d4b1861f212ce85b5302202aae793150b93 /meta/recipes-core/ncurses/files
parente9471f8da3946439141ccdd8284200aa614df46c (diff)
downloadopenembedded-core-e5d1cbbc1a04b0b190f3706e7ab7421c87d46c78.tar.gz
ncurses: 6.0+20160625 -> 6.0+20161126
Add a patch to fix the CC/CFLAGS mangling that broke builds. [RB] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/ncurses/files')
-rw-r--r--meta/recipes-core/ncurses/files/fix-cflags-mangle.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/meta/recipes-core/ncurses/files/fix-cflags-mangle.patch b/meta/recipes-core/ncurses/files/fix-cflags-mangle.patch
new file mode 100644
index 0000000000..e9447c5b81
--- /dev/null
+++ b/meta/recipes-core/ncurses/files/fix-cflags-mangle.patch
@@ -0,0 +1,18 @@
+configure has a piece of logic to detect users "abusing" CC to hold compiler
+flags (which we do). It also has logic to "correct" this by moving the flags
+from CC to CFLAGS, but the sed only handles a single argument in CC.
+
+Replace the sed with awk to filter out all words that start with a hyphen.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure b/configure
+index 7f31208..1a29cfc 100755
+--- a/configure
++++ b/configure
+@@ -2191,2 +2191,2 @@ echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/C
+- cf_flags=`echo "$CC" | sed -e 's/^.*[ ]\(-[^ ]\)/\1/'`
+- CC=`echo "$CC " | sed -e 's/[ ]-[^ ].*$//' -e 's/[ ]*$//'`
++ cf_flags=`echo "$CC" | awk 'BEGIN{ORS=" ";RS=" "} /^-.+/ {print $1}'`
++ CC=`echo "$CC " | awk 'BEGIN{ORS=" ";RS=" "} /^[^-].+/ {print $1}'`