diff options
| author | Jack Nagel | 2012-08-17 11:13:07 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-08-17 11:22:20 -0500 |
| commit | faaa6c1524f93743228fb276b53e984187a8683d (patch) | |
| tree | 6f5cb6d5f5d130c0a81c449ad92d50e6cdb72083 /Library | |
| parent | 74a63bed548ff0c922ef19da94eaf528b299d55d (diff) | |
| download | homebrew-faaa6c1524f93743228fb276b53e984187a8683d.tar.bz2 | |
mysql: 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 mysql and those used to build software that links to it.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/mysql.rb | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/Library/Formula/mysql.rb b/Library/Formula/mysql.rb index 33b8c938e..9a3a88e18 100644 --- a/Library/Formula/mysql.rb +++ b/Library/Formula/mysql.rb @@ -35,12 +35,14 @@ class Mysql < Formula skip_clean :all # So "INSTALL PLUGIN" can work. - # Remove optimization flags from `mysql_config --cflags` - # This facilitates easy compilation of gems using a brewed mysql - # Also fix compilation with Xcode and no CLT: http://bugs.mysql.com/bug.php?id=66001 + # Fix compilation with Xcode and no CLT: http://bugs.mysql.com/bug.php?id=66001 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/mysql directory exists (var+"mysql").mkpath @@ -170,23 +172,7 @@ class Mysql < Formula end end - __END__ -diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh -index 9296075..70c18db 100644 ---- a/scripts/mysql_config.sh -+++ b/scripts/mysql_config.sh -@@ -137,7 +137,9 @@ 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]' \ -+ aes Os - 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/cmake/libutils.cmake b/cmake/libutils.cmake index 89a9de9..677c68d 100644 --- a/cmake/libutils.cmake |
