blob: 8365da0f90714b3a41ab1a58f2dea4d75eccc47a [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>
Brad Bishop6e60e8b2018-02-01 10:27:11 -050024---
25 aclocal.m4 | 1 -
Andrew Geisslera2681d92020-10-16 10:17:07 -050026 configure | 259 -----------------------------------------------------
Brad Bishop2d39a062019-10-28 08:33:36 -040027 2 files changed, 260 deletions(-)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050028
29diff --git a/aclocal.m4 b/aclocal.m4
Andrew Geissler5199d832021-09-24 16:47:35 -050030index 7a9a8fb..108b6cc 100644
Brad Bishop6e60e8b2018-02-01 10:27:11 -050031--- a/aclocal.m4
32+++ b/aclocal.m4
Andrew Geissler5199d832021-09-24 16:47:35 -050033@@ -1401,7 +1401,6 @@ CF_GCC_VERSION
Brad Bishop6e60e8b2018-02-01 10:27:11 -050034 CF_ACVERSION_CHECK(2.52,
35 [AC_PROG_CC_STDC],
36 [CF_ANSI_CC_REQD])
37-CF_CC_ENV_FLAGS
38 ])dnl
39 dnl ---------------------------------------------------------------------------
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080040 dnl CF_PROG_GROFF version: 3 updated: 2018/01/07 13:16:19
Brad Bishop6e60e8b2018-02-01 10:27:11 -050041diff --git a/configure b/configure
Andrew Geissler5199d832021-09-24 16:47:35 -050042index 5b98a03..e3a4237 100755
Brad Bishop6e60e8b2018-02-01 10:27:11 -050043--- a/configure
44+++ b/configure
Andrew Geissler5199d832021-09-24 16:47:35 -050045@@ -2146,265 +2146,6 @@ esac
Brad Bishop6e60e8b2018-02-01 10:27:11 -050046 # This should have been defined by AC_PROG_CC
Andrew Geissler5199d832021-09-24 16:47:35 -050047 : "${CC:=cc}"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050048
Andrew Geissler5199d832021-09-24 16:47:35 -050049-echo "$as_me:2149: checking \$CFLAGS variable" >&5
Brad Bishop2d39a062019-10-28 08:33:36 -040050-echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
51-case "x$CFLAGS" in
52-(*-[IUD]*)
Andrew Geissler5199d832021-09-24 16:47:35 -050053- echo "$as_me:2153: result: broken" >&5
Brad Bishop2d39a062019-10-28 08:33:36 -040054-echo "${ECHO_T}broken" >&6
Andrew Geissler5199d832021-09-24 16:47:35 -050055- { echo "$as_me:2155: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
Brad Bishop2d39a062019-10-28 08:33:36 -040056-echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
57- cf_flags="$CFLAGS"
58- CFLAGS=
59- for cf_arg in $cf_flags
60- do
61-
62-cf_fix_cppflags=no
63-cf_new_cflags=
64-cf_new_cppflags=
65-cf_new_extra_cppflags=
66-
67-for cf_add_cflags in $cf_arg
68-do
Andrew Geissler5199d832021-09-24 16:47:35 -050069-case "$cf_fix_cppflags" in
Brad Bishop2d39a062019-10-28 08:33:36 -040070-(no)
Andrew Geissler5199d832021-09-24 16:47:35 -050071- case "$cf_add_cflags" in
Brad Bishop2d39a062019-10-28 08:33:36 -040072- (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
Andrew Geissler5199d832021-09-24 16:47:35 -050073- case "$cf_add_cflags" in
Brad Bishop2d39a062019-10-28 08:33:36 -040074- (-D*)
Andrew Geissler5199d832021-09-24 16:47:35 -050075- cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Brad Bishop2d39a062019-10-28 08:33:36 -040076-
77- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
78- && test -z "${cf_tst_cflags}" \
79- && cf_fix_cppflags=yes
80-
Andrew Geissler5199d832021-09-24 16:47:35 -050081- if test "$cf_fix_cppflags" = yes ; then
Brad Bishop2d39a062019-10-28 08:33:36 -040082-
83- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
84- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
85-
86- continue
87- elif test "${cf_tst_cflags}" = "\"'" ; then
88-
89- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
90- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
91-
92- continue
93- fi
94- ;;
95- esac
96- case "$CPPFLAGS" in
97- (*$cf_add_cflags)
98- ;;
99- (*)
Andrew Geissler5199d832021-09-24 16:47:35 -0500100- case "$cf_add_cflags" in
Brad Bishop2d39a062019-10-28 08:33:36 -0400101- (-D*)
102- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
103-
104-CPPFLAGS=`echo "$CPPFLAGS" | \
105- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
106- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
107-
108- ;;
109- esac
110-
111- test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
112- cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
113-
114- ;;
115- esac
116- ;;
117- (*)
118-
119- test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
120- cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
121-
122- ;;
123- esac
124- ;;
125-(yes)
126-
127- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
128- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
129-
Andrew Geissler5199d832021-09-24 16:47:35 -0500130- cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Brad Bishop2d39a062019-10-28 08:33:36 -0400131-
132- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
133- && test -z "${cf_tst_cflags}" \
134- && cf_fix_cppflags=no
135- ;;
136-esac
137-done
138-
139-if test -n "$cf_new_cflags" ; then
140-
141- test -n "$CFLAGS" && CFLAGS="$CFLAGS "
142- CFLAGS="${CFLAGS}$cf_new_cflags"
143-
144-fi
145-
146-if test -n "$cf_new_cppflags" ; then
147-
148- test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
149- CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
150-
151-fi
152-
153-if test -n "$cf_new_extra_cppflags" ; then
154-
155- test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
156- EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
157-
158-fi
159-
160- done
161- ;;
162-(*)
Andrew Geissler5199d832021-09-24 16:47:35 -0500163- echo "$as_me:2263: result: ok" >&5
Brad Bishop2d39a062019-10-28 08:33:36 -0400164-echo "${ECHO_T}ok" >&6
165- ;;
166-esac
167-
Andrew Geissler5199d832021-09-24 16:47:35 -0500168-echo "$as_me:2268: checking \$CC variable" >&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500169-echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
170-case "$CC" in
171-(*[\ \ ]-*)
Andrew Geissler5199d832021-09-24 16:47:35 -0500172- echo "$as_me:2272: result: broken" >&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500173-echo "${ECHO_T}broken" >&6
Andrew Geissler5199d832021-09-24 16:47:35 -0500174- { echo "$as_me:2274: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
Brad Bishop2d39a062019-10-28 08:33:36 -0400175-echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500176- # humor him...
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800177- cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
178- cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
179- CC="$cf_prog"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500180- for cf_arg in $cf_flags
181- do
182- case "x$cf_arg" in
183- (x-[IUDfgOW]*)
184-
185-cf_fix_cppflags=no
186-cf_new_cflags=
187-cf_new_cppflags=
188-cf_new_extra_cppflags=
189-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800190-for cf_add_cflags in $cf_arg
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500191-do
Andrew Geissler5199d832021-09-24 16:47:35 -0500192-case "$cf_fix_cppflags" in
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500193-(no)
Andrew Geissler5199d832021-09-24 16:47:35 -0500194- case "$cf_add_cflags" in
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500195- (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
Andrew Geissler5199d832021-09-24 16:47:35 -0500196- case "$cf_add_cflags" in
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500197- (-D*)
Andrew Geissler5199d832021-09-24 16:47:35 -0500198- cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500199-
200- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
201- && test -z "${cf_tst_cflags}" \
202- && cf_fix_cppflags=yes
203-
Andrew Geissler5199d832021-09-24 16:47:35 -0500204- if test "$cf_fix_cppflags" = yes ; then
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800205-
206- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
207- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
208-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500209- continue
210- elif test "${cf_tst_cflags}" = "\"'" ; then
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800211-
212- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
213- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
214-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500215- continue
216- fi
217- ;;
218- esac
219- case "$CPPFLAGS" in
220- (*$cf_add_cflags)
221- ;;
222- (*)
Andrew Geissler5199d832021-09-24 16:47:35 -0500223- case "$cf_add_cflags" in
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500224- (-D*)
225- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
226-
227-CPPFLAGS=`echo "$CPPFLAGS" | \
228- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
229- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
230-
231- ;;
232- esac
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800233-
234- test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
235- cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
236-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500237- ;;
238- esac
239- ;;
240- (*)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800241-
242- test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
243- cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
244-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500245- ;;
246- esac
247- ;;
248-(yes)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800249-
250- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
251- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500252-
Andrew Geissler5199d832021-09-24 16:47:35 -0500253- cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500254-
255- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
256- && test -z "${cf_tst_cflags}" \
257- && cf_fix_cppflags=no
258- ;;
259-esac
260-done
261-
262-if test -n "$cf_new_cflags" ; then
263-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800264- test -n "$CFLAGS" && CFLAGS="$CFLAGS "
265- CFLAGS="${CFLAGS}$cf_new_cflags"
266-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500267-fi
268-
269-if test -n "$cf_new_cppflags" ; then
270-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800271- test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
272- CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
273-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500274-fi
275-
276-if test -n "$cf_new_extra_cppflags" ; then
277-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800278- test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
279- EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
280-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500281-fi
282-
283- ;;
284- (*)
285- CC="$CC $cf_arg"
286- ;;
287- esac
288- done
289- test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
290-
Andrew Geissler5199d832021-09-24 16:47:35 -0500291-echo "${as_me:-configure}:2391: testing resulting CC: '$CC' ..." 1>&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500292-
293- test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
294-
Andrew Geissler5199d832021-09-24 16:47:35 -0500295-echo "${as_me:-configure}:2395: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500296-
297- test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
298-
Andrew Geissler5199d832021-09-24 16:47:35 -0500299-echo "${as_me:-configure}:2399: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500300-
301- ;;
302-(*)
Andrew Geissler5199d832021-09-24 16:47:35 -0500303- echo "$as_me:2403: result: ok" >&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500304-echo "${ECHO_T}ok" >&6
305- ;;
306-esac
307-
Andrew Geissler5199d832021-09-24 16:47:35 -0500308 echo "$as_me:2408: checking whether ${MAKE-make} sets \${MAKE}" >&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500309 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
310 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
311--
Andrew Geisslera2681d92020-10-16 10:17:07 -05003122.25.1
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500313