From c19b32dfc409e39439f27c22f78a4cd1423e1a11 Mon Sep 17 00:00:00 2001 From: Stephen Allred Date: Fri, 1 Oct 2010 20:56:55 +0100 Subject: Added --use-gcc flag. This allows you to use llvm as your default compiler and keep the cc symlink pointed at llvm, while allowing you to build forumla that requires the gcc. Signed-off-by: Adam Vandenberg --- Library/Homebrew/cmd/--env.rb | 3 ++- Library/Homebrew/cmd/doctor.rb | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/--env.rb b/Library/Homebrew/cmd/--env.rb index 07623171d..2f6e421a0 100644 --- a/Library/Homebrew/cmd/--env.rb +++ b/Library/Homebrew/cmd/--env.rb @@ -10,6 +10,7 @@ module Homebrew extend self def dump_build_env env puts %["--use-llvm" was specified] if ARGV.include? '--use-llvm' + puts "\"--use-gcc\" was specified" if ARGV.include? '--use-gcc' %w[ CC CXX LD ].each do |k| value = env[k] @@ -24,7 +25,7 @@ module Homebrew extend self end %w[ CFLAGS CXXFLAGS CPPFLAGS LDFLAGS MACOSX_DEPLOYMENT_TARGET MAKEFLAGS PKG_CONFIG_PATH - HOMEBREW_DEBUG HOMEBREW_VERBOSE HOMEBREW_USE_LLVM HOMEBREW_SVN ].each do |k| + HOMEBREW_DEBUG HOMEBREW_VERBOSE HOMEBREW_USE_GCC HOMEBREW_USE_LLVM HOMEBREW_SVN ].each do |k| value = env[k] puts "#{k}: #{value}" if value end diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 7ea616d76..9cbc9b832 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -147,6 +147,9 @@ def check_cc_symlink To force Homebrew to use LLVM, you can set the "HOMEBREW_LLVM" environmental variable, or pass "--use-llvm" to "brew install". + To force Homebrew to use gcc, you can set the "HOMEBREW_GCC" environmental + variable, or pass "--use-gcc" to "brew install". + EOS end end -- cgit v1.2.3