We need to set CC and CXX for many formula
Fixes Homebrew/homebrew#807; Fixes Homebrew/homebrew#808
This commit is contained in:
parent
37189cbe34
commit
1149b082bb
@ -31,8 +31,6 @@ module HomebrewEnvExtension
|
|||||||
ENV.delete('CDPATH')
|
ENV.delete('CDPATH')
|
||||||
ENV.delete('CPPFLAGS')
|
ENV.delete('CPPFLAGS')
|
||||||
ENV.delete('LDFLAGS')
|
ENV.delete('LDFLAGS')
|
||||||
ENV.delete('CC')
|
|
||||||
ENV.delete('CXX')
|
|
||||||
|
|
||||||
ENV['MAKEFLAGS']="-j#{Hardware.processor_count}"
|
ENV['MAKEFLAGS']="-j#{Hardware.processor_count}"
|
||||||
|
|
||||||
@ -53,6 +51,9 @@ module HomebrewEnvExtension
|
|||||||
ENV['CXX'] = "#{prefix}/usr/bin/llvm-g++"
|
ENV['CXX'] = "#{prefix}/usr/bin/llvm-g++"
|
||||||
cflags = %w{-O4} # link time optimisation baby!
|
cflags = %w{-O4} # link time optimisation baby!
|
||||||
else
|
else
|
||||||
|
# if we don't set these, many formula fail to build
|
||||||
|
ENV['CC'] = '/usr/bin/cc'
|
||||||
|
ENV['CXX'] = '/usr/bin/c++'
|
||||||
cflags = ['-O3']
|
cflags = ['-O3']
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -60,7 +61,7 @@ module HomebrewEnvExtension
|
|||||||
# to use a specific linker, however doing this in general causes formula to
|
# to use a specific linker, however doing this in general causes formula to
|
||||||
# build more successfully because we are changing CC and many build systems
|
# build more successfully because we are changing CC and many build systems
|
||||||
# don't react properly to that
|
# don't react properly to that
|
||||||
ENV['LD'] = ENV['CC'] if ENV['CC']
|
ENV['LD'] = ENV['CC']
|
||||||
|
|
||||||
# optimise all the way to eleven, references:
|
# optimise all the way to eleven, references:
|
||||||
# http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel
|
# http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user