From 5c62420d2708fd114a26ed0526c5388e77d2af71 Mon Sep 17 00:00:00 2001
From: Max Howell <max@methylblue.com>
Date: Fri, 22 May 2009 00:14:57 +0100
Subject: [PATCH] Apply further optimizations to builds

---
 Cellar/homebrew/brewkit.rb | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/Cellar/homebrew/brewkit.rb b/Cellar/homebrew/brewkit.rb
index 060145b71e..187ba65491 100644
--- a/Cellar/homebrew/brewkit.rb
+++ b/Cellar/homebrew/brewkit.rb
@@ -5,9 +5,19 @@ require 'pathname'
 $agent = "Homebrew 0.1 (Ruby; Mac OS X 10.5 Leopard)"
 $cellar = Pathname.new(__FILE__).dirname.parent.realpath
 
-#TODO don't add the prefixes if we're in /usr or /usr/local
+# optimise all the way to eleven, references:
+# http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel
+# http://forums.mozillazine.org/viewtopic.php?f=12&t=577299
+# http://gcc.gnu.org/onlinedocs/gcc-4.0.1/gcc/i386-and-x86_002d64-Options.html
 ENV['MACOSX_DEPLOYMENT_TARGET']='10.5'
-ENV['CFLAGS']=ENV['CXXFLAGS']='-O3 -w'
+ENV['CFLAGS']=ENV['CXXFLAGS']='-O3 -w -pipe -fomit-frame-pointer -march=prescott'
+
+# lets use gcc 4.2, it is newer and "better", at least I believe so, mail me
+# if I'm wrong
+ENV['CC']='gcc-4.2'
+ENV['CXX']='g++-4.2'
+
+#TODO don't add the prefixes if we're in /usr or /usr/local
 ENV['CPPFLAGS']="-I#{$cellar.parent}/include"
 ENV['LDFLAGS']="-L#{$cellar.parent}/lib"
 
-- 
GitLab