percona-server: build without exotic optimization flags
Currently we patch mysql_config to sanitize the CFLAGS that are exported to software that queries it during builds, such as the mysql gem. Since there isn't any way to control what compiler is used by Ruby/gem to build native extensions, we must remove any compiler or CPU specific flags. Instead, let's build without these flags to begin with, which will keep mysql_config clean and provide consistency between the flags used to build percona-server and those used to build software that links to it. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
dddd14fe59
commit
5de9676727
1 changed files with 4 additions and 36 deletions
|
@ -28,13 +28,11 @@ class PerconaServer < Formula
|
|||
cause "https://github.com/mxcl/homebrew/issues/issue/144"
|
||||
end
|
||||
|
||||
# The CMAKE patches are so that on Lion we do not detect a private
|
||||
# pthread_init function as linkable. Patch sourced from the MySQL formula.
|
||||
def patches
|
||||
DATA
|
||||
end
|
||||
|
||||
def install
|
||||
# Build without compiler or CPU specific optimization flags to facilitate
|
||||
# compilation of gems and other software that queries `mysql-config`.
|
||||
ENV.minimal_optimization
|
||||
|
||||
# Make sure the var/msql directory exists
|
||||
(var+"percona").mkpath
|
||||
|
||||
|
@ -160,33 +158,3 @@ class PerconaServer < Formula
|
|||
EOPLIST
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
__END__
|
||||
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh
|
||||
index 9296075..a600de2 100644
|
||||
--- a/scripts/mysql_config.sh
|
||||
+++ b/scripts/mysql_config.sh
|
||||
@@ -137,7 +137,8 @@ for remove in DDBUG_OFF DSAFE_MUTEX DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \
|
||||
DEXTRA_DEBUG DHAVE_purify 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 \
|
||||
- unroll2 ip mp restrict
|
||||
+ unroll2 ip mp restrict \
|
||||
+ mmmx 'msse[0-9.]*' 'mfpmath=sse' w pipe 'fomit-frame-pointer' 'mmacosx-version-min=10.[0-9]'
|
||||
do
|
||||
# The first option we might strip will always have a space before it because
|
||||
# we set -I$pkgincludedir as the first option
|
||||
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
|
||||
index 37e0e35..38ad6c8 100644
|
||||
--- a/scripts/mysqld_safe.sh
|
||||
+++ b/scripts/mysqld_safe.sh
|
||||
@@ -558,7 +558,7 @@ else
|
||||
fi
|
||||
|
||||
USER_OPTION=""
|
||||
-if test -w / -o "$USER" = "root"
|
||||
+if test -w /sbin -o "$USER" = "root"
|
||||
then
|
||||
if test "$user" != "root" -o $SET_USER = 1
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue