[Commits] Rev 4354: MDEV-7028 mysql_config produces invalid cflags (was: udf_example.c couldn't compile) in lp:~maria-captains/maria/5.5

Sergei Golubchik serg at mariadb.org
Sun Nov 16 22:18:45 EET 2014


At lp:~maria-captains/maria/5.5

------------------------------------------------------------
revno: 4354
revision-id: sergii at pisem.net-20141116201844-jk291hriqu12fako
parent: sergii at pisem.net-20141115161232-nfm09jbnyshofnd2
fixes bug: https://mariadb.atlassian.net/browse/MDEV-7028
committer: Sergei Golubchik <sergii at pisem.net>
branch nick: 5.5
timestamp: Sun 2014-11-16 21:18:44 +0100
message:
  MDEV-7028 mysql_config produces invalid cflags (was: udf_example.c couldn't compile)
  
  two bugs in mysql_config:
  1. flags like -Werror=format were not stipped out
  2. one-pass s/// command was used that could not remove all matching flags
     (e.g. s/ A */ /g cannot remove all A's in " 1 2 A A A A A 4 5 ")
=== modified file 'scripts/mysql_config.sh'
--- a/scripts/mysql_config.sh	2014-10-08 07:35:00 +0000
+++ b/scripts/mysql_config.sh	2014-11-16 20:18:44 +0000
@@ -136,12 +136,12 @@ cflags="$include @CFLAGS@ " #note: end s
 for remove in DDBUG_OFF DSAFE_MUTEX DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \
               DEXTRA_DEBUG DHAVE_valgrind O 'O[0-9]' 'xO[0-9]' 'W[-A-Za-z]*' \
               'mtune=[-A-Za-z0-9]*' 'mcpu=[-A-Za-z0-9]*' 'march=[-A-Za-z0-9]*' \
-              Xa xstrconst "xc99=none" AC99 \
+              Xa xstrconst "xc99=none" AC99 'W[-A-Za-z]*=[-A-Za-z0-9]*' \
               unroll2 ip mp restrict
 do
   # The first option we might strip will always have a space before it because
   # we set -I$pkgincludedir as the first option
-  cflags=`echo "$cflags"|sed -e "s/ -$remove  */ /g"` 
+  cflags=`echo "$cflags"|sed -e ":again;s/ -$remove  */ /g; t again"` 
 done
 cflags=`echo "$cflags"|sed -e 's/ *\$//'` 
 



More information about the commits mailing list