blob: 3bc0db96e621edbc446bfb61dbdaea0154b971a6 [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 Bishop6e60e8b2018-02-01 10:27:11 -050013---
14 aclocal.m4 | 1 -
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015 configure | 140 -------------------------------------------------------------
16 2 files changed, 141 deletions(-)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050017
18diff --git a/aclocal.m4 b/aclocal.m4
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019index 0d14f26..0cefa08 100644
Brad Bishop6e60e8b2018-02-01 10:27:11 -050020--- a/aclocal.m4
21+++ b/aclocal.m4
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080022@@ -1038,7 +1038,6 @@ CF_GCC_VERSION
Brad Bishop6e60e8b2018-02-01 10:27:11 -050023 CF_ACVERSION_CHECK(2.52,
24 [AC_PROG_CC_STDC],
25 [CF_ANSI_CC_REQD])
26-CF_CC_ENV_FLAGS
27 ])dnl
28 dnl ---------------------------------------------------------------------------
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029 dnl CF_PROG_GROFF version: 3 updated: 2018/01/07 13:16:19
Brad Bishop6e60e8b2018-02-01 10:27:11 -050030diff --git a/configure b/configure
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031index d27ae31..077c648 100755
Brad Bishop6e60e8b2018-02-01 10:27:11 -050032--- a/configure
33+++ b/configure
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080034@@ -1946,146 +1946,6 @@ esac
Brad Bishop6e60e8b2018-02-01 10:27:11 -050035 # This should have been defined by AC_PROG_CC
36 : ${CC:=cc}
37
38-echo "$as_me:1949: checking \$CC variable" >&5
39-echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
40-case "$CC" in
41-(*[\ \ ]-*)
42- echo "$as_me:1953: result: broken" >&5
43-echo "${ECHO_T}broken" >&6
44- { echo "$as_me:1955: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
45-echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
46- # humor him...
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080047- cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
48- cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
49- CC="$cf_prog"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050050- for cf_arg in $cf_flags
51- do
52- case "x$cf_arg" in
53- (x-[IUDfgOW]*)
54-
55-cf_fix_cppflags=no
56-cf_new_cflags=
57-cf_new_cppflags=
58-cf_new_extra_cppflags=
59-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080060-for cf_add_cflags in $cf_arg
Brad Bishop6e60e8b2018-02-01 10:27:11 -050061-do
62-case $cf_fix_cppflags in
63-(no)
64- case $cf_add_cflags in
65- (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
66- case $cf_add_cflags in
67- (-D*)
68- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
69-
70- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
71- && test -z "${cf_tst_cflags}" \
72- && cf_fix_cppflags=yes
73-
74- if test $cf_fix_cppflags = yes ; then
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080075-
76- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
77- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
78-
Brad Bishop6e60e8b2018-02-01 10:27:11 -050079- continue
80- elif test "${cf_tst_cflags}" = "\"'" ; then
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080081-
82- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
83- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
84-
Brad Bishop6e60e8b2018-02-01 10:27:11 -050085- continue
86- fi
87- ;;
88- esac
89- case "$CPPFLAGS" in
90- (*$cf_add_cflags)
91- ;;
92- (*)
93- case $cf_add_cflags in
94- (-D*)
95- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
96-
97-CPPFLAGS=`echo "$CPPFLAGS" | \
98- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
99- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
100-
101- ;;
102- esac
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800103-
104- test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
105- cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
106-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500107- ;;
108- esac
109- ;;
110- (*)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800111-
112- test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
113- cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
114-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500115- ;;
116- esac
117- ;;
118-(yes)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800119-
120- test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
121- cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500122-
123- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
124-
125- test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
126- && test -z "${cf_tst_cflags}" \
127- && cf_fix_cppflags=no
128- ;;
129-esac
130-done
131-
132-if test -n "$cf_new_cflags" ; then
133-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800134- test -n "$CFLAGS" && CFLAGS="$CFLAGS "
135- CFLAGS="${CFLAGS}$cf_new_cflags"
136-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500137-fi
138-
139-if test -n "$cf_new_cppflags" ; then
140-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800141- test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
142- CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
143-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500144-fi
145-
146-if test -n "$cf_new_extra_cppflags" ; then
147-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800148- test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
149- EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
150-
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500151-fi
152-
153- ;;
154- (*)
155- CC="$CC $cf_arg"
156- ;;
157- esac
158- done
159- test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
160-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800161-echo "${as_me:-configure}:2072: testing resulting CC: '$CC' ..." 1>&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500162-
163- test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
164-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800165-echo "${as_me:-configure}:2076: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500166-
167- test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
168-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800169-echo "${as_me:-configure}:2080: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500170-
171- ;;
172-(*)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800173- echo "$as_me:2084: result: ok" >&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500174-echo "${ECHO_T}ok" >&6
175- ;;
176-esac
177-
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800178 echo "$as_me:2089: checking whether ${MAKE-make} sets \${MAKE}" >&5
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500179 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
180 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
181--
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001822.7.4
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500183