0001-byacc-do-not-reorder-CC-and-CFLAGS.patch 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. Subject: byacc: do not reorder $CC and $CFLAGS
  2. byacc tries to process $CC and decide which part should belong to CC and which
  3. part should below to CFLAGS and then do reordering. It doesn't make much sense
  4. for OE. And it doesn't do its work correctly. Some options are dropped.
  5. Delete all these stuff so that we could have all options we need.
  6. Upstream-Status: Inappropriate [OE Specific]
  7. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
  8. Update for 20190617.
  9. Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
  10. Update for 20191103.
  11. Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
  12. Update for 20200910.
  13. Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
  14. ---
  15. aclocal.m4 | 1 -
  16. configure | 259 -----------------------------------------------------
  17. 2 files changed, 260 deletions(-)
  18. diff --git a/aclocal.m4 b/aclocal.m4
  19. index 1c6a3ee..2f7e9b5 100644
  20. --- a/aclocal.m4
  21. +++ b/aclocal.m4
  22. @@ -1317,7 +1317,6 @@ CF_GCC_VERSION
  23. CF_ACVERSION_CHECK(2.52,
  24. [AC_PROG_CC_STDC],
  25. [CF_ANSI_CC_REQD])
  26. -CF_CC_ENV_FLAGS
  27. ])dnl
  28. dnl ---------------------------------------------------------------------------
  29. dnl CF_PROG_GROFF version: 3 updated: 2018/01/07 13:16:19
  30. diff --git a/configure b/configure
  31. index 378f27d..8f40229 100755
  32. --- a/configure
  33. +++ b/configure
  34. @@ -2066,265 +2066,6 @@ esac
  35. # This should have been defined by AC_PROG_CC
  36. : ${CC:=cc}
  37. -echo "$as_me:2069: checking \$CFLAGS variable" >&5
  38. -echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
  39. -case "x$CFLAGS" in
  40. -(*-[IUD]*)
  41. - echo "$as_me:2073: result: broken" >&5
  42. -echo "${ECHO_T}broken" >&6
  43. - { echo "$as_me:2075: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
  44. -echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
  45. - cf_flags="$CFLAGS"
  46. - CFLAGS=
  47. - for cf_arg in $cf_flags
  48. - do
  49. -
  50. -cf_fix_cppflags=no
  51. -cf_new_cflags=
  52. -cf_new_cppflags=
  53. -cf_new_extra_cppflags=
  54. -
  55. -for cf_add_cflags in $cf_arg
  56. -do
  57. -case $cf_fix_cppflags in
  58. -(no)
  59. - case $cf_add_cflags in
  60. - (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
  61. - case $cf_add_cflags in
  62. - (-D*)
  63. - cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
  64. -
  65. - test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
  66. - && test -z "${cf_tst_cflags}" \
  67. - && cf_fix_cppflags=yes
  68. -
  69. - if test $cf_fix_cppflags = yes ; then
  70. -
  71. - test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
  72. - cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
  73. -
  74. - continue
  75. - elif test "${cf_tst_cflags}" = "\"'" ; then
  76. -
  77. - test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
  78. - cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
  79. -
  80. - continue
  81. - fi
  82. - ;;
  83. - esac
  84. - case "$CPPFLAGS" in
  85. - (*$cf_add_cflags)
  86. - ;;
  87. - (*)
  88. - case $cf_add_cflags in
  89. - (-D*)
  90. - cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
  91. -
  92. -CPPFLAGS=`echo "$CPPFLAGS" | \
  93. - sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
  94. - -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
  95. -
  96. - ;;
  97. - esac
  98. -
  99. - test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
  100. - cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
  101. -
  102. - ;;
  103. - esac
  104. - ;;
  105. - (*)
  106. -
  107. - test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
  108. - cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
  109. -
  110. - ;;
  111. - esac
  112. - ;;
  113. -(yes)
  114. -
  115. - test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
  116. - cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
  117. -
  118. - cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
  119. -
  120. - test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
  121. - && test -z "${cf_tst_cflags}" \
  122. - && cf_fix_cppflags=no
  123. - ;;
  124. -esac
  125. -done
  126. -
  127. -if test -n "$cf_new_cflags" ; then
  128. -
  129. - test -n "$CFLAGS" && CFLAGS="$CFLAGS "
  130. - CFLAGS="${CFLAGS}$cf_new_cflags"
  131. -
  132. -fi
  133. -
  134. -if test -n "$cf_new_cppflags" ; then
  135. -
  136. - test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
  137. - CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
  138. -
  139. -fi
  140. -
  141. -if test -n "$cf_new_extra_cppflags" ; then
  142. -
  143. - test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
  144. - EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
  145. -
  146. -fi
  147. -
  148. - done
  149. - ;;
  150. -(*)
  151. - echo "$as_me:2183: result: ok" >&5
  152. -echo "${ECHO_T}ok" >&6
  153. - ;;
  154. -esac
  155. -
  156. -echo "$as_me:2188: checking \$CC variable" >&5
  157. -echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
  158. -case "$CC" in
  159. -(*[\ \ ]-*)
  160. - echo "$as_me:2192: result: broken" >&5
  161. -echo "${ECHO_T}broken" >&6
  162. - { echo "$as_me:2194: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
  163. -echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
  164. - # humor him...
  165. - cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
  166. - cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
  167. - CC="$cf_prog"
  168. - for cf_arg in $cf_flags
  169. - do
  170. - case "x$cf_arg" in
  171. - (x-[IUDfgOW]*)
  172. -
  173. -cf_fix_cppflags=no
  174. -cf_new_cflags=
  175. -cf_new_cppflags=
  176. -cf_new_extra_cppflags=
  177. -
  178. -for cf_add_cflags in $cf_arg
  179. -do
  180. -case $cf_fix_cppflags in
  181. -(no)
  182. - case $cf_add_cflags in
  183. - (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
  184. - case $cf_add_cflags in
  185. - (-D*)
  186. - cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
  187. -
  188. - test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
  189. - && test -z "${cf_tst_cflags}" \
  190. - && cf_fix_cppflags=yes
  191. -
  192. - if test $cf_fix_cppflags = yes ; then
  193. -
  194. - test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
  195. - cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
  196. -
  197. - continue
  198. - elif test "${cf_tst_cflags}" = "\"'" ; then
  199. -
  200. - test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
  201. - cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
  202. -
  203. - continue
  204. - fi
  205. - ;;
  206. - esac
  207. - case "$CPPFLAGS" in
  208. - (*$cf_add_cflags)
  209. - ;;
  210. - (*)
  211. - case $cf_add_cflags in
  212. - (-D*)
  213. - cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
  214. -
  215. -CPPFLAGS=`echo "$CPPFLAGS" | \
  216. - sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
  217. - -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
  218. -
  219. - ;;
  220. - esac
  221. -
  222. - test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
  223. - cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
  224. -
  225. - ;;
  226. - esac
  227. - ;;
  228. - (*)
  229. -
  230. - test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
  231. - cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
  232. -
  233. - ;;
  234. - esac
  235. - ;;
  236. -(yes)
  237. -
  238. - test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
  239. - cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
  240. -
  241. - cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
  242. -
  243. - test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
  244. - && test -z "${cf_tst_cflags}" \
  245. - && cf_fix_cppflags=no
  246. - ;;
  247. -esac
  248. -done
  249. -
  250. -if test -n "$cf_new_cflags" ; then
  251. -
  252. - test -n "$CFLAGS" && CFLAGS="$CFLAGS "
  253. - CFLAGS="${CFLAGS}$cf_new_cflags"
  254. -
  255. -fi
  256. -
  257. -if test -n "$cf_new_cppflags" ; then
  258. -
  259. - test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
  260. - CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
  261. -
  262. -fi
  263. -
  264. -if test -n "$cf_new_extra_cppflags" ; then
  265. -
  266. - test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
  267. - EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
  268. -
  269. -fi
  270. -
  271. - ;;
  272. - (*)
  273. - CC="$CC $cf_arg"
  274. - ;;
  275. - esac
  276. - done
  277. - test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
  278. -
  279. -echo "${as_me:-configure}:2311: testing resulting CC: '$CC' ..." 1>&5
  280. -
  281. - test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
  282. -
  283. -echo "${as_me:-configure}:2315: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
  284. -
  285. - test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
  286. -
  287. -echo "${as_me:-configure}:2319: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
  288. -
  289. - ;;
  290. -(*)
  291. - echo "$as_me:2323: result: ok" >&5
  292. -echo "${ECHO_T}ok" >&6
  293. - ;;
  294. -esac
  295. -
  296. echo "$as_me:2328: checking whether ${MAKE-make} sets \${MAKE}" >&5
  297. echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
  298. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
  299. --
  300. 2.25.1