blob: 7cd2510c8ed5d4dceeed4789db36524875c7331d [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001Subject: byacc: do not reorder $CC and $CFLAGS
2
3byacc tries to process $CC and decide which part should belong to CC and which
4part should below to CFLAGS and then do reordering. It doesn't make much sense
5for OE. And it doesn't do its work correctly. Some options are dropped.
6
7Delete all these stuff so that we could have all options we need.
8
9Upstream-Status: Inappropriate [OE Specific]
10
11Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
12---
13 aclocal.m4 | 1 -
14 configure | 119 -------------------------------------------------------------
15 2 files changed, 120 deletions(-)
16
17diff --git a/aclocal.m4 b/aclocal.m4
18index 917a848..62ef241 100644
19--- a/aclocal.m4
20+++ b/aclocal.m4
21@@ -1021,7 +1021,6 @@ CF_GCC_VERSION
22 CF_ACVERSION_CHECK(2.52,
23 [AC_PROG_CC_STDC],
24 [CF_ANSI_CC_REQD])
25-CF_CC_ENV_FLAGS
26 ])dnl
27 dnl ---------------------------------------------------------------------------
28 dnl CF_PROG_GROFF version: 2 updated: 2015/07/04 11:16:27
29diff --git a/configure b/configure
30index 9707e50..4f0497c 100755
31--- a/configure
32+++ b/configure
33@@ -1946,125 +1946,6 @@ esac
34 # This should have been defined by AC_PROG_CC
35 : ${CC:=cc}
36
37-echo "$as_me:1949: checking \$CC variable" >&5
38-echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
39-case "$CC" in
40-(*[\ \ ]-*)
41- echo "$as_me:1953: result: broken" >&5
42-echo "${ECHO_T}broken" >&6
43- { echo "$as_me:1955: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
44-echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
45- # humor him...
46- cf_flags=`echo "$CC" | sed -e 's/^.*[ ]\(-[^ ]\)/\1/'`
47- CC=`echo "$CC " | sed -e 's/[ ]-[^ ].*$//' -e 's/[ ]*$//'`
48- for cf_arg in $cf_flags
49- do
50- case "x$cf_arg" in
51- (x-[IUDfgOW]*)
52-
53-cf_fix_cppflags=no
54-cf_new_cflags=
55-cf_new_cppflags=
56-cf_new_extra_cppflags=
57-
58-for cf_add_cflags in $cf_flags
59-do
60-case $cf_fix_cppflags in
61-(no)
62- case $cf_add_cflags in
63- (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
64- case $cf_add_cflags in
65- (-D*)
66- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
67-
68- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
69- && test -z "${cf_tst_cflags}" \
70- && cf_fix_cppflags=yes
71-
72- if test $cf_fix_cppflags = yes ; then
73- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
74- continue
75- elif test "${cf_tst_cflags}" = "\"'" ; then
76- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
77- continue
78- fi
79- ;;
80- esac
81- case "$CPPFLAGS" in
82- (*$cf_add_cflags)
83- ;;
84- (*)
85- case $cf_add_cflags in
86- (-D*)
87- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
88-
89-CPPFLAGS=`echo "$CPPFLAGS" | \
90- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
91- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
92-
93- ;;
94- esac
95- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
96- ;;
97- esac
98- ;;
99- (*)
100- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
101- ;;
102- esac
103- ;;
104-(yes)
105- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
106-
107- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
108-
109- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
110- && test -z "${cf_tst_cflags}" \
111- && cf_fix_cppflags=no
112- ;;
113-esac
114-done
115-
116-if test -n "$cf_new_cflags" ; then
117-
118- CFLAGS="$CFLAGS $cf_new_cflags"
119-fi
120-
121-if test -n "$cf_new_cppflags" ; then
122-
123- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
124-fi
125-
126-if test -n "$cf_new_extra_cppflags" ; then
127-
128- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
129-fi
130-
131- ;;
132- (*)
133- CC="$CC $cf_arg"
134- ;;
135- esac
136- done
137- test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
138-
139-echo "${as_me:-configure}:2051: testing resulting CC: '$CC' ..." 1>&5
140-
141- test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
142-
143-echo "${as_me:-configure}:2055: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
144-
145- test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
146-
147-echo "${as_me:-configure}:2059: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
148-
149- ;;
150-(*)
151- echo "$as_me:2063: result: ok" >&5
152-echo "${ECHO_T}ok" >&6
153- ;;
154-esac
155-
156 echo "$as_me:2068: checking whether ${MAKE-make} sets \${MAKE}" >&5
157 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
158 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
159--
1602.8.3
161