blob: f761ccbdc8a32d7800572e527c423eec79f06a8e [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 Bishop2f973922019-11-11 07:58:48 -050015
16Update for 20191103.
17Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Andrew Geisslera2681d92020-10-16 10:17:07 -050018
19Update for 20200910.
20Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Andrew Geissler5199d832021-09-24 16:47:35 -050021
22Update for 20210808.
23Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Patrick Williams864cc432023-02-09 14:54:44 -060024
25Update for 20210201
26Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Brad Bishop6e60e8b2018-02-01 10:27:11 -050027---
28 aclocal.m4 | 1 -
Andrew Geisslera2681d92020-10-16 10:17:07 -050029 configure | 259 -----------------------------------------------------
Brad Bishop2d39a062019-10-28 08:33:36 -040030 2 files changed, 260 deletions(-)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050031
32diff --git a/aclocal.m4 b/aclocal.m4
Patrick Williams864cc432023-02-09 14:54:44 -060033index 832d0c8..63b03f2 100644
Brad Bishop6e60e8b2018-02-01 10:27:11 -050034--- a/aclocal.m4
35+++ b/aclocal.m4
Patrick Williams864cc432023-02-09 14:54:44 -060036@@ -1421,7 +1421,6 @@ CF_GCC_VERSION
Brad Bishop6e60e8b2018-02-01 10:27:11 -050037 CF_ACVERSION_CHECK(2.52,
38 [AC_PROG_CC_STDC],
39 [CF_ANSI_CC_REQD])
40-CF_CC_ENV_FLAGS
41 ])dnl
42 dnl ---------------------------------------------------------------------------
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080043 dnl CF_PROG_GROFF version: 3 updated: 2018/01/07 13:16:19
Brad Bishop6e60e8b2018-02-01 10:27:11 -050044diff --git a/configure b/configure
Patrick Williams864cc432023-02-09 14:54:44 -060045index cb47b4c..c72b6e4 100755
Brad Bishop6e60e8b2018-02-01 10:27:11 -050046--- a/configure
47+++ b/configure
Patrick Williams864cc432023-02-09 14:54:44 -060048@@ -2144,265 +2144,6 @@ esac
Brad Bishop6e60e8b2018-02-01 10:27:11 -050049 # This should have been defined by AC_PROG_CC
Andrew Geissler5199d832021-09-24 16:47:35 -050050 : "${CC:=cc}"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050051
Patrick Williams864cc432023-02-09 14:54:44 -060052-echo "$as_me:2147: checking \$CFLAGS variable" >&5
Brad Bishop2d39a062019-10-28 08:33:36 -040053-echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
54-case "x$CFLAGS" in
55-(*-[IUD]*)
Patrick Williams864cc432023-02-09 14:54:44 -060056- echo "$as_me:2151: result: broken" >&5
Brad Bishop2d39a062019-10-28 08:33:36 -040057-echo "${ECHO_T}broken" >&6
Patrick Williams864cc432023-02-09 14:54:44 -060058- { echo "$as_me:2153: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
Brad Bishop2d39a062019-10-28 08:33:36 -040059-echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
60- cf_flags="$CFLAGS"
61- CFLAGS=
62- for cf_arg in $cf_flags
63- do
64-
65-cf_fix_cppflags=no
66-cf_new_cflags=
67-cf_new_cppflags=
68-cf_new_extra_cppflags=
69-
70-for cf_add_cflags in $cf_arg
71-do
Andrew Geissler5199d832021-09-24 16:47:35 -050072-case "$cf_fix_cppflags" in
Brad Bishop2d39a062019-10-28 08:33:36 -040073-(no)
Andrew Geissler5199d832021-09-24 16:47:35 -050074- case "$cf_add_cflags" in
Brad Bishop2d39a062019-10-28 08:33:36 -040075- (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
Andrew Geissler5199d832021-09-24 16:47:35 -050076- case "$cf_add_cflags" in
Brad Bishop2d39a062019-10-28 08:33:36 -040077- (-D*)
Andrew Geissler5199d832021-09-24 16:47:35 -050078- cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Brad Bishop2d39a062019-10-28 08:33:36 -040079-
80- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
81- && test -z "${cf_tst_cflags}" \
82- && cf_fix_cppflags=yes
83-
Andrew Geissler5199d832021-09-24 16:47:35 -050084- if test "$cf_fix_cppflags" = yes ; then
Brad Bishop2d39a062019-10-28 08:33:36 -040085-
86- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
87- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
88-
89- continue
90- elif test "${cf_tst_cflags}" = "\"'" ; then
91-
92- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
93- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
94-
95- continue
96- fi
97- ;;
98- esac
99- case "$CPPFLAGS" in
100- (*$cf_add_cflags)
101- ;;
102- (*)
Andrew Geissler5199d832021-09-24 16:47:35 -0500103- case "$cf_add_cflags" in
Brad Bishop2d39a062019-10-28 08:33:36 -0400104- (-D*)
105- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
106-
107-CPPFLAGS=`echo "$CPPFLAGS" | \
108- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
109- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
110-
111- ;;
112- esac
113-
114- test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
115- cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
116-
117- ;;
118- esac
119- ;;
120- (*)
121-
122- test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
123- cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
124-
125- ;;
126- esac
127- ;;
128-(yes)
129-
130- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
131- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
132-
Andrew Geissler5199d832021-09-24 16:47:35 -0500133- cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Brad Bishop2d39a062019-10-28 08:33:36 -0400134-
135- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
136- && test -z "${cf_tst_cflags}" \
137- && cf_fix_cppflags=no
138- ;;
139-esac
140-done
141-
142-if test -n "$cf_new_cflags" ; then
143-
144- test -n "$CFLAGS" && CFLAGS="$CFLAGS "
145- CFLAGS="${CFLAGS}$cf_new_cflags"
146-
147-fi
148-
149-if test -n "$cf_new_cppflags" ; then
150-
151- test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
152- CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
153-
154-fi
155-
156-if test -n "$cf_new_extra_cppflags" ; then
157-
158- test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
159- EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
160-
161-fi
162-
163- done
164- ;;
165-(*)
Patrick Williams864cc432023-02-09 14:54:44 -0600166- echo "$as_me:2261: result: ok" >&5
Brad Bishop2d39a062019-10-28 08:33:36 -0400167-echo "${ECHO_T}ok" >&6
168- ;;
169-esac
170-
Patrick Williams864cc432023-02-09 14:54:44 -0600171-echo "$as_me:2266: checking \$CC variable" >&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500172-echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
173-case "$CC" in
174-(*[\ \ ]-*)
Patrick Williams864cc432023-02-09 14:54:44 -0600175- echo "$as_me:2270: result: broken" >&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500176-echo "${ECHO_T}broken" >&6
Patrick Williams864cc432023-02-09 14:54:44 -0600177- { echo "$as_me:2272: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
Brad Bishop2d39a062019-10-28 08:33:36 -0400178-echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500179- # humor him...
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800180- cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
181- cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
182- CC="$cf_prog"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500183- for cf_arg in $cf_flags
184- do
185- case "x$cf_arg" in
186- (x-[IUDfgOW]*)
187-
188-cf_fix_cppflags=no
189-cf_new_cflags=
190-cf_new_cppflags=
191-cf_new_extra_cppflags=
192-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800193-for cf_add_cflags in $cf_arg
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500194-do
Andrew Geissler5199d832021-09-24 16:47:35 -0500195-case "$cf_fix_cppflags" in
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500196-(no)
Andrew Geissler5199d832021-09-24 16:47:35 -0500197- case "$cf_add_cflags" in
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500198- (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
Andrew Geissler5199d832021-09-24 16:47:35 -0500199- case "$cf_add_cflags" in
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500200- (-D*)
Andrew Geissler5199d832021-09-24 16:47:35 -0500201- cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500202-
203- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
204- && test -z "${cf_tst_cflags}" \
205- && cf_fix_cppflags=yes
206-
Andrew Geissler5199d832021-09-24 16:47:35 -0500207- if test "$cf_fix_cppflags" = yes ; then
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800208-
209- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
210- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
211-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500212- continue
213- elif test "${cf_tst_cflags}" = "\"'" ; then
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800214-
215- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
216- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
217-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500218- continue
219- fi
220- ;;
221- esac
222- case "$CPPFLAGS" in
223- (*$cf_add_cflags)
224- ;;
225- (*)
Andrew Geissler5199d832021-09-24 16:47:35 -0500226- case "$cf_add_cflags" in
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500227- (-D*)
228- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
229-
230-CPPFLAGS=`echo "$CPPFLAGS" | \
231- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
232- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
233-
234- ;;
235- esac
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800236-
237- test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
238- cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
239-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500240- ;;
241- esac
242- ;;
243- (*)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800244-
245- test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
246- cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
247-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500248- ;;
249- esac
250- ;;
251-(yes)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800252-
253- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
254- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500255-
Andrew Geissler5199d832021-09-24 16:47:35 -0500256- cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500257-
258- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
259- && test -z "${cf_tst_cflags}" \
260- && cf_fix_cppflags=no
261- ;;
262-esac
263-done
264-
265-if test -n "$cf_new_cflags" ; then
266-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800267- test -n "$CFLAGS" && CFLAGS="$CFLAGS "
268- CFLAGS="${CFLAGS}$cf_new_cflags"
269-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500270-fi
271-
272-if test -n "$cf_new_cppflags" ; then
273-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800274- test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
275- CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
276-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500277-fi
278-
279-if test -n "$cf_new_extra_cppflags" ; then
280-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800281- test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
282- EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
283-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500284-fi
285-
286- ;;
287- (*)
288- CC="$CC $cf_arg"
289- ;;
290- esac
291- done
292- test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
293-
Patrick Williams864cc432023-02-09 14:54:44 -0600294-echo "${as_me:-configure}:2389: testing resulting CC: '$CC' ..." 1>&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500295-
296- test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
297-
Patrick Williams864cc432023-02-09 14:54:44 -0600298-echo "${as_me:-configure}:2393: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500299-
300- test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
301-
Patrick Williams864cc432023-02-09 14:54:44 -0600302-echo "${as_me:-configure}:2397: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500303-
304- ;;
305-(*)
Patrick Williams864cc432023-02-09 14:54:44 -0600306- echo "$as_me:2401: result: ok" >&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500307-echo "${ECHO_T}ok" >&6
308- ;;
309-esac
310-
Patrick Williams864cc432023-02-09 14:54:44 -0600311 echo "$as_me:2406: checking whether ${MAKE-make} sets \${MAKE}" >&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500312 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
313 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
314--
Patrick Williams864cc432023-02-09 14:54:44 -06003152.34.1
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500316