From 329a6e9c2225096ac7301204cec828d38f30e4a6 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Jan 2005 03:43:37 +0100 Subject: Protect flags like -Wl,-O2 from being mangled by mysql_config (Bug #6964) (Second commit of this patch -- first included wrong changes.) scripts/mysql_config.sh: Make sure we are only removing whole options (protects -Wl,-O2, for example) --- scripts/mysql_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index 86cbe944416..35ddbcac471 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -100,7 +100,7 @@ for remove in DDBUG_OFF DSAFEMALLOC USAFEMALLOC DSAFE_MUTEX \ DPEDANTIC_SAFEMALLOC DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \ DEXTRA_DEBUG DHAVE_purify 'O[0-9]' 'W[-A-Za-z]*' do - cflags=`echo "$cflags"|sed -e "s/-$remove *//g"` + cflags=`echo "$cflags"|sed -e "s/ -$remove */ /g"` done cflags=`echo "$cflags"|sed -e 's/ *\$//'` -- cgit v1.2.1 From eb6f4f85f054094d9c6cfd0394d455e7c55a9c57 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 Jan 2005 19:57:02 +0100 Subject: Add comment to make code for option-stripping in mysql_config more clear scripts/mysql_config.sh: Add comment to clarify why we can safely only strip flags with a leading space --- scripts/mysql_config.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts') diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index 35ddbcac471..3676e03ab48 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -100,6 +100,8 @@ for remove in DDBUG_OFF DSAFEMALLOC USAFEMALLOC DSAFE_MUTEX \ DPEDANTIC_SAFEMALLOC DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \ DEXTRA_DEBUG DHAVE_purify 'O[0-9]' 'W[-A-Za-z]*' 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"` done cflags=`echo "$cflags"|sed -e 's/ *\$//'` -- cgit v1.2.1