blob: 24864ea606bfefba5b1359d18862a3d7ed0f3f02 [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>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012
Brad Bishop2d39a062019-10-28 08:33:36 -040013Update for 20190617.
14Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Brad Bishop6e60e8b2018-02-01 10:27:11 -050015---
16 aclocal.m4 | 1 -
Brad Bishop2d39a062019-10-28 08:33:36 -040017 configure | 259 -------------------------------------------------------------
18 2 files changed, 260 deletions(-)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050019
20diff --git a/aclocal.m4 b/aclocal.m4
Brad Bishop2d39a062019-10-28 08:33:36 -040021index 338465f..3311057 100644
Brad Bishop6e60e8b2018-02-01 10:27:11 -050022--- a/aclocal.m4
23+++ b/aclocal.m4
Brad Bishop2d39a062019-10-28 08:33:36 -040024@@ -1231,7 +1231,6 @@ CF_GCC_VERSION
Brad Bishop6e60e8b2018-02-01 10:27:11 -050025 CF_ACVERSION_CHECK(2.52,
26 [AC_PROG_CC_STDC],
27 [CF_ANSI_CC_REQD])
28-CF_CC_ENV_FLAGS
29 ])dnl
30 dnl ---------------------------------------------------------------------------
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031 dnl CF_PROG_GROFF version: 3 updated: 2018/01/07 13:16:19
Brad Bishop6e60e8b2018-02-01 10:27:11 -050032diff --git a/configure b/configure
Brad Bishop2d39a062019-10-28 08:33:36 -040033index ebb1f0f..a56cb17 100755
Brad Bishop6e60e8b2018-02-01 10:27:11 -050034--- a/configure
35+++ b/configure
Brad Bishop2d39a062019-10-28 08:33:36 -040036@@ -1957,265 +1957,6 @@ esac
Brad Bishop6e60e8b2018-02-01 10:27:11 -050037 # This should have been defined by AC_PROG_CC
38 : ${CC:=cc}
39
Brad Bishop2d39a062019-10-28 08:33:36 -040040-echo "$as_me:1960: checking \$CFLAGS variable" >&5
41-echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
42-case "x$CFLAGS" in
43-(*-[IUD]*)
44- echo "$as_me:1964: result: broken" >&5
45-echo "${ECHO_T}broken" >&6
46- { echo "$as_me:1966: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
47-echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
48- cf_flags="$CFLAGS"
49- CFLAGS=
50- for cf_arg in $cf_flags
51- do
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_arg
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-
74- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
75- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
76-
77- continue
78- elif test "${cf_tst_cflags}" = "\"'" ; then
79-
80- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
81- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
82-
83- continue
84- fi
85- ;;
86- esac
87- case "$CPPFLAGS" in
88- (*$cf_add_cflags)
89- ;;
90- (*)
91- case $cf_add_cflags in
92- (-D*)
93- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
94-
95-CPPFLAGS=`echo "$CPPFLAGS" | \
96- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
97- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
98-
99- ;;
100- esac
101-
102- test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
103- cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
104-
105- ;;
106- esac
107- ;;
108- (*)
109-
110- test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
111- cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
112-
113- ;;
114- esac
115- ;;
116-(yes)
117-
118- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
119- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
120-
121- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
122-
123- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
124- && test -z "${cf_tst_cflags}" \
125- && cf_fix_cppflags=no
126- ;;
127-esac
128-done
129-
130-if test -n "$cf_new_cflags" ; then
131-
132- test -n "$CFLAGS" && CFLAGS="$CFLAGS "
133- CFLAGS="${CFLAGS}$cf_new_cflags"
134-
135-fi
136-
137-if test -n "$cf_new_cppflags" ; then
138-
139- test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
140- CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
141-
142-fi
143-
144-if test -n "$cf_new_extra_cppflags" ; then
145-
146- test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
147- EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
148-
149-fi
150-
151- done
152- ;;
153-(*)
154- echo "$as_me:2074: result: ok" >&5
155-echo "${ECHO_T}ok" >&6
156- ;;
157-esac
158-
159-echo "$as_me:2079: checking \$CC variable" >&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500160-echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
161-case "$CC" in
162-(*[\ \ ]-*)
Brad Bishop2d39a062019-10-28 08:33:36 -0400163- echo "$as_me:2083: result: broken" >&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500164-echo "${ECHO_T}broken" >&6
Brad Bishop2d39a062019-10-28 08:33:36 -0400165- { echo "$as_me:2085: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
166-echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500167- # humor him...
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800168- cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
169- cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
170- CC="$cf_prog"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500171- for cf_arg in $cf_flags
172- do
173- case "x$cf_arg" in
174- (x-[IUDfgOW]*)
175-
176-cf_fix_cppflags=no
177-cf_new_cflags=
178-cf_new_cppflags=
179-cf_new_extra_cppflags=
180-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800181-for cf_add_cflags in $cf_arg
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500182-do
183-case $cf_fix_cppflags in
184-(no)
185- case $cf_add_cflags in
186- (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
187- case $cf_add_cflags in
188- (-D*)
189- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
190-
191- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
192- && test -z "${cf_tst_cflags}" \
193- && cf_fix_cppflags=yes
194-
195- if test $cf_fix_cppflags = yes ; then
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800196-
197- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
198- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
199-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500200- continue
201- elif test "${cf_tst_cflags}" = "\"'" ; then
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800202-
203- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
204- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
205-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500206- continue
207- fi
208- ;;
209- esac
210- case "$CPPFLAGS" in
211- (*$cf_add_cflags)
212- ;;
213- (*)
214- case $cf_add_cflags in
215- (-D*)
216- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
217-
218-CPPFLAGS=`echo "$CPPFLAGS" | \
219- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
220- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
221-
222- ;;
223- esac
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800224-
225- test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
226- cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
227-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500228- ;;
229- esac
230- ;;
231- (*)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800232-
233- test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
234- cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
235-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500236- ;;
237- esac
238- ;;
239-(yes)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800240-
241- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
242- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500243-
244- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
245-
246- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
247- && test -z "${cf_tst_cflags}" \
248- && cf_fix_cppflags=no
249- ;;
250-esac
251-done
252-
253-if test -n "$cf_new_cflags" ; then
254-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800255- test -n "$CFLAGS" && CFLAGS="$CFLAGS "
256- CFLAGS="${CFLAGS}$cf_new_cflags"
257-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500258-fi
259-
260-if test -n "$cf_new_cppflags" ; then
261-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800262- test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
263- CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
264-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500265-fi
266-
267-if test -n "$cf_new_extra_cppflags" ; then
268-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800269- test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
270- EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
271-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500272-fi
273-
274- ;;
275- (*)
276- CC="$CC $cf_arg"
277- ;;
278- esac
279- done
280- test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
281-
Brad Bishop2d39a062019-10-28 08:33:36 -0400282-echo "${as_me:-configure}:2202: testing resulting CC: '$CC' ..." 1>&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500283-
284- test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
285-
Brad Bishop2d39a062019-10-28 08:33:36 -0400286-echo "${as_me:-configure}:2206: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500287-
288- test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
289-
Brad Bishop2d39a062019-10-28 08:33:36 -0400290-echo "${as_me:-configure}:2210: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500291-
292- ;;
293-(*)
Brad Bishop2d39a062019-10-28 08:33:36 -0400294- echo "$as_me:2214: result: ok" >&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500295-echo "${ECHO_T}ok" >&6
296- ;;
297-esac
298-
Brad Bishop2d39a062019-10-28 08:33:36 -0400299 echo "$as_me:2219: checking whether ${MAKE-make} sets \${MAKE}" >&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500300 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
301 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
302--
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08003032.7.4
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500304