aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/shims/super
diff options
context:
space:
mode:
authorMike McQuaid2016-07-15 19:03:45 +0100
committerGitHub2016-07-15 19:03:45 +0100
commita02be9eea204264ce48827ac365c8b53b986d66a (patch)
treecf85e35e0992204cb9f1f938b831161433ca8fd4 /Library/Homebrew/shims/super
parentde366f71b9c9fded0b5578bb4fef14139834038a (diff)
downloadbrew-a02be9eea204264ce48827ac365c8b53b986d66a.tar.bz2
ENV: move to new paths. (#507)
Move some stuff formerly in `Library/ENV` around: - Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are all superenv wrappers and all symlinks to the same version. We never needed the "separate shims for separate versions" functionality and it just adds confusion. - Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more things under `Library/Homebrew` - Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually used by or related to superenv (or stdenv) in any way.
Diffstat (limited to 'Library/Homebrew/shims/super')
-rwxr-xr-xLibrary/Homebrew/shims/super/ant5
-rwxr-xr-xLibrary/Homebrew/shims/super/apr-1-config15
-rwxr-xr-xLibrary/Homebrew/shims/super/bsdmake3
l---------Library/Homebrew/shims/super/c++1
l---------Library/Homebrew/shims/super/c891
l---------Library/Homebrew/shims/super/c991
-rwxr-xr-xLibrary/Homebrew/shims/super/cc364
l---------Library/Homebrew/shims/super/clang1
l---------Library/Homebrew/shims/super/clang++1
l---------Library/Homebrew/shims/super/cpp1
l---------Library/Homebrew/shims/super/g++1
l---------Library/Homebrew/shims/super/g++-4.21
l---------Library/Homebrew/shims/super/g++-4.31
l---------Library/Homebrew/shims/super/g++-4.41
l---------Library/Homebrew/shims/super/g++-4.51
l---------Library/Homebrew/shims/super/g++-4.61
l---------Library/Homebrew/shims/super/g++-4.71
l---------Library/Homebrew/shims/super/g++-4.81
l---------Library/Homebrew/shims/super/g++-4.91
l---------Library/Homebrew/shims/super/g++-51
l---------Library/Homebrew/shims/super/g++-61
l---------Library/Homebrew/shims/super/gcc1
l---------Library/Homebrew/shims/super/gcc-4.21
l---------Library/Homebrew/shims/super/gcc-4.31
l---------Library/Homebrew/shims/super/gcc-4.41
l---------Library/Homebrew/shims/super/gcc-4.51
l---------Library/Homebrew/shims/super/gcc-4.61
l---------Library/Homebrew/shims/super/gcc-4.71
l---------Library/Homebrew/shims/super/gcc-4.81
l---------Library/Homebrew/shims/super/gcc-4.91
l---------Library/Homebrew/shims/super/gcc-51
l---------Library/Homebrew/shims/super/gcc-61
l---------Library/Homebrew/shims/super/git1
l---------Library/Homebrew/shims/super/gmake1
l---------Library/Homebrew/shims/super/i686-apple-darwin11-llvm-g++-4.21
l---------Library/Homebrew/shims/super/i686-apple-darwin11-llvm-gcc-4.21
l---------Library/Homebrew/shims/super/ld1
l---------Library/Homebrew/shims/super/llvm-g++1
l---------Library/Homebrew/shims/super/llvm-g++-4.21
l---------Library/Homebrew/shims/super/llvm-gcc1
l---------Library/Homebrew/shims/super/llvm-gcc-4.21
-rwxr-xr-xLibrary/Homebrew/shims/super/make3
-rwxr-xr-xLibrary/Homebrew/shims/super/mig3
-rwxr-xr-xLibrary/Homebrew/shims/super/pod2man3
-rwxr-xr-xLibrary/Homebrew/shims/super/sed7
l---------Library/Homebrew/shims/super/svn1
-rwxr-xr-xLibrary/Homebrew/shims/super/xcrun57
47 files changed, 498 insertions, 0 deletions
diff --git a/Library/Homebrew/shims/super/ant b/Library/Homebrew/shims/super/ant
new file mode 100755
index 000000000..f54bc2747
--- /dev/null
+++ b/Library/Homebrew/shims/super/ant
@@ -0,0 +1,5 @@
+#!/bin/bash
+export HOMEBREW_CCCFG="O$HOMEBREW_CCCFG"
+ant=/usr/bin/ant
+[ -x "$ant" ] || ant="$(${HOMEBREW_BREW_FILE} --prefix ant)/bin/ant"
+exec "$ant" "$@"
diff --git a/Library/Homebrew/shims/super/apr-1-config b/Library/Homebrew/shims/super/apr-1-config
new file mode 100755
index 000000000..40ad6478e
--- /dev/null
+++ b/Library/Homebrew/shims/super/apr-1-config
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+if [[ "$HOMEBREW_CCCFG" == *a* ]]; then
+ case "$1" in
+ --cc) echo "cc";;
+ --cpp) echo "cpp";;
+ --includedir) echo "$HOMEBREW_SDKROOT/usr/include/apr-1";;
+ --includes) echo "-isystem$HOMEBREW_SDKROOT/usr/include/apr-1";;
+ --apr-libtool) echo "glibtool";;
+ *)
+ exec xcrun apr-1-config "$@";;
+ esac
+else
+ exec /usr/bin/apr-1-config "$@"
+fi
diff --git a/Library/Homebrew/shims/super/bsdmake b/Library/Homebrew/shims/super/bsdmake
new file mode 100755
index 000000000..b61e1b2bc
--- /dev/null
+++ b/Library/Homebrew/shims/super/bsdmake
@@ -0,0 +1,3 @@
+#!/bin/bash
+export HOMEBREW_CCCFG="O$HOMEBREW_CCCFG"
+exec xcrun bsdmake "$@"
diff --git a/Library/Homebrew/shims/super/c++ b/Library/Homebrew/shims/super/c++
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/c++
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/c89 b/Library/Homebrew/shims/super/c89
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/c89
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/c99 b/Library/Homebrew/shims/super/c99
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/c99
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/cc b/Library/Homebrew/shims/super/cc
new file mode 100755
index 000000000..e7ab6500f
--- /dev/null
+++ b/Library/Homebrew/shims/super/cc
@@ -0,0 +1,364 @@
+#!/bin/sh
+# Make sure this shim uses the same Ruby interpreter that is used by Homebrew.
+unset RUBYLIB
+unset RUBYOPT
+if [ -z "$HOMEBREW_RUBY_PATH" ]
+then
+ echo "${0##*/}: The build tool has reset ENV; --env=std required." >&2
+ exit 1
+fi
+exec "$HOMEBREW_RUBY_PATH" -x "$0" "$@"
+#!/usr/bin/env ruby -W0
+
+require "pathname"
+require "set"
+
+class Cmd
+ attr_reader :config, :prefix, :cellar, :opt, :tmpdir, :sysroot, :deps
+ attr_reader :archflags, :optflags, :keg_regex, :formula_prefix
+
+ def initialize(arg0, args)
+ @arg0 = arg0
+ @args = args.freeze
+ @config = ENV.fetch("HOMEBREW_CCCFG") { "" }
+ @prefix = ENV["HOMEBREW_PREFIX"]
+ @cellar = ENV["HOMEBREW_CELLAR"]
+ @opt = ENV["HOMEBREW_OPT"]
+ @tmpdir = ENV["HOMEBREW_TEMP"]
+ @sysroot = ENV["HOMEBREW_SDKROOT"]
+ @archflags = ENV.fetch("HOMEBREW_ARCHFLAGS") { "" }.split(" ")
+ @optflags = ENV.fetch("HOMEBREW_OPTFLAGS") { "" }.split(" ")
+ @deps = Set.new(ENV.fetch("HOMEBREW_DEPENDENCIES") { "" }.split(","))
+ @formula_prefix = ENV["HOMEBREW_FORMULA_PREFIX"]
+ # matches opt or cellar prefix and formula name
+ @keg_regex = %r[(#{Regexp.escape(opt)}|#{Regexp.escape(cellar)})/([\w\-_\+]+)]
+ end
+
+ def mode
+ if @arg0 == "cpp" || @arg0 == "ld"
+ @arg0.to_sym
+ elsif @args.include? "-c"
+ if @arg0 =~ /(?:c|g|clang)\+\+/
+ :cxx
+ else
+ :cc
+ end
+ elsif @args.include? "-E"
+ :ccE
+ else
+ if @arg0 =~ /(?:c|g|clang)\+\+/
+ :cxxld
+ else
+ :ccld
+ end
+ end
+ end
+
+ def tool
+ @tool ||= case @arg0
+ when "ld" then "ld"
+ when "cpp" then "cpp"
+ when /\w\+\+(-\d(\.\d)?)?$/
+ case ENV["HOMEBREW_CC"]
+ when /clang/
+ "clang++"
+ when /llvm-gcc/
+ "llvm-g++-4.2"
+ when /gcc(-\d(\.\d)?)?$/
+ "g++" + $1.to_s
+ end
+ else
+ # Note that this is a universal fallback, so that we'll always invoke
+ # HOMEBREW_CC regardless of what name under which the tool was invoked.
+ ENV["HOMEBREW_CC"]
+ end
+ end
+
+ def args
+ if @args.length == 1 && @args[0] == "-v"
+ # Don't add linker arguments if -v passed as sole option. This stops gcc
+ # -v with no other arguments from outputting a linker error. Some
+ # software uses gcc -v (wrongly) to sniff the GCC version.
+ return @args.dup
+ end
+
+ if !refurbish_args? || tool == "ld" || configure?
+ args = @args.dup
+ else
+ args = refurbished_args
+ end
+
+ if sysroot
+ if tool == "ld"
+ args << "-syslibroot" << sysroot
+ else
+ args << "-isysroot" << sysroot << "--sysroot=#{sysroot}"
+ end
+ end
+
+ case mode
+ when :ccld
+ cflags + args + cppflags + ldflags
+ when :cxxld
+ cxxflags + args + cppflags + ldflags
+ when :cc
+ cflags + args + cppflags
+ when :cxx
+ cxxflags + args + cppflags
+ when :ccE
+ args + cppflags
+ when :cpp
+ args + cppflags
+ when :ld
+ ldflags + args
+ end
+ end
+
+ def refurbished_args
+ @lset = Set.new(library_paths + system_library_paths)
+ @iset = Set.new(isystem_paths + include_paths)
+
+ args = []
+ enum = @args.each
+
+ loop do
+ case arg = enum.next
+ when "-arch"
+ if permit_arch_flags?
+ args << arg << enum.next
+ else
+ enum.next
+ end
+ when "-m32", "-m64"
+ args << arg if permit_arch_flags?
+ when /^-Xarch_/
+ refurbished = refurbish_arg(enum.next, enum)
+ unless refurbished.empty?
+ args << arg
+ args += refurbished
+ end
+ else
+ args += refurbish_arg(arg, enum)
+ end
+ end
+
+ args
+ end
+
+ def refurbish_arg(arg, enum)
+ args = []
+
+ case arg
+ when /^-g\d?$/, /^-gstabs\d+/, "-gstabs+", /^-ggdb\d?/,
+ /^-march=.+/, /^-mtune=.+/, /^-mcpu=.+/,
+ /^-O[0-9zs]?$/, "-fast", "-no-cpp-precomp",
+ "-pedantic", "-pedantic-errors", "-Wno-long-double",
+ "-Wno-unused-but-set-variable"
+ when "-fopenmp", "-lgomp", "-mno-fused-madd", "-fforce-addr", "-fno-defer-pop",
+ "-mno-dynamic-no-pic", "-fearly-inlining", /^-f(?:no-)?inline-functions-called-once/,
+ /^-finline-limit/, /^-f(?:no-)?check-new/, "-fno-delete-null-pointer-checks",
+ "-fcaller-saves", "-fthread-jumps", "-fno-reorder-blocks", "-fcse-skip-blocks",
+ "-frerun-cse-after-loop", "-frerun-loop-opt", "-fcse-follow-jumps",
+ "-fno-regmove", "-fno-for-scope", "-fno-tree-pre", "-fno-tree-dominator-opts",
+ "-fuse-linker-plugin"
+ # clang doesn't support these flags
+ args << arg unless tool =~ /^clang/
+ when "--fast-math"
+ arg = "-ffast-math" if tool =~ /^clang/
+ args << arg
+ when "-Wno-deprecated-register"
+ # older gccs don't support these flags
+ args << arg unless tool =~ /^g..-4.[02]/
+ when /^-W[alp],/, /^-Wno-/
+ args << arg
+ when /^-W.*/
+ # prune warnings
+ when "-macosx_version_min", "-dylib_install_name"
+ args << "-Wl,#{arg},#{enum.next}"
+ when "-multiply_definedsuppress"
+ args << "-Wl,-multiply_defined,suppress"
+ when "-undefineddynamic_lookup"
+ args << "-Wl,-undefined,dynamic_lookup"
+ when /^-isysroot/, /^--sysroot/
+ sdk = enum.next
+ # We set the sysroot for OS X SDKs
+ args << "-isysroot" << sdk unless sdk.downcase.include? "osx"
+ when "-dylib"
+ args << "-Wl,#{arg}"
+ when /^-I(.+)?/
+ # Support both "-Ifoo" (one argument) and "-I foo" (two arguments)
+ val = chuzzle($1) || enum.next
+ path = canonical_path(val)
+ args << "-I#{val}" if keep?(path) && @iset.add?(path)
+ when /^-L(.+)?/
+ val = chuzzle($1) || enum.next
+ path = canonical_path(val)
+ args << "-L#{val}" if keep?(path) && @lset.add?(path)
+ else
+ args << arg
+ end
+
+ args
+ end
+
+ def keep?(path)
+ # The logic in this method will eventually become the default,
+ # but is currently opt-in.
+ return keep_orig?(path) unless ENV["HOMEBREW_EXPERIMENTAL_FILTER_FLAGS_ON_DEPS"]
+
+ # Allow references to self
+ if formula_prefix && path.start_with?("#{formula_prefix}/")
+ true
+ # first two paths: reject references to Cellar or opt paths
+ # for unspecified dependencies
+ elsif path.start_with?(cellar) || path.start_with?(opt)
+ dep = path[keg_regex, 2]
+ dep && @deps.include?(dep)
+ elsif path.start_with?(prefix)
+ true
+ else
+ # ignore MacPorts, Boxen's Homebrew, X11, fink
+ !path.start_with?("/opt/local", "/opt/boxen/homebrew", "/opt/X11", "/sw", "/usr/X11")
+ end
+ end
+
+ # The original less-smart version of keep_orig; will eventually be removed
+ def keep_orig?(path)
+ path.start_with?(prefix, cellar, tmpdir) || !path.start_with?("/opt/local", "/opt/boxen/homebrew", "/opt/X11", "/sw", "/usr/X11")
+ end
+
+ def cflags
+ args = []
+
+ return args unless refurbish_args? || configure?
+
+ args << "-pipe"
+ args << "-w" unless configure?
+ args << "-#{ENV["HOMEBREW_OPTIMIZATION_LEVEL"]}"
+ args.concat(optflags)
+ args.concat(archflags)
+ args << "-std=#{@arg0}" if @arg0 =~ /c[89]9/
+ args
+ end
+
+ def cxxflags
+ args = cflags
+ args << "-std=c++11" if cxx11?
+ args << "-stdlib=libc++" if libcxx?
+ args << "-stdlib=libstdc++" if libstdcxx?
+ args
+ end
+
+ def cppflags
+ path_flags("-isystem", isystem_paths) + path_flags("-I", include_paths)
+ end
+
+ def ldflags
+ args = path_flags("-L", library_paths)
+ case mode
+ when :ld
+ args << "-headerpad_max_install_names"
+ when :ccld, :cxxld
+ args << "-Wl,-headerpad_max_install_names"
+ end
+ args
+ end
+
+ def isystem_paths
+ path_split("HOMEBREW_ISYSTEM_PATHS")
+ end
+
+ def include_paths
+ path_split("HOMEBREW_INCLUDE_PATHS")
+ end
+
+ def library_paths
+ path_split("HOMEBREW_LIBRARY_PATHS")
+ end
+
+ def system_library_paths
+ %W[#{sysroot}/usr/lib /usr/local/lib]
+ end
+
+ def configure?
+ # configure scripts generated with autoconf 2.61 or later export as_nl
+ ENV.key? "as_nl"
+ end
+
+ def refurbish_args?
+ config.include?("O")
+ end
+
+ def cxx11?
+ config.include?("x")
+ end
+
+ def libcxx?
+ config.include?("g")
+ end
+
+ def libstdcxx?
+ config.include?("h")
+ end
+
+ def permit_arch_flags?
+ config.include?("K")
+ end
+
+ def canonical_path(path)
+ path = Pathname.new(path)
+ path = path.realpath if path.exist?
+ path.to_s
+ end
+
+ def path_flags(prefix, paths)
+ paths = paths.uniq.select { |path| File.directory?(path) }
+ paths.map! { |path| prefix + path }
+ end
+
+ def path_split(key)
+ ENV.fetch(key) { "" }.split(File::PATH_SEPARATOR)
+ end
+
+ def chuzzle(val)
+ return val if val.nil?
+ val = val.chomp
+ return val unless val.empty?
+ end
+end
+
+def log(basename, argv, tool, args)
+ return unless ENV.key?("HOMEBREW_CC_LOG_PATH")
+
+ adds = args - argv
+ dels = argv - args
+
+ s = ""
+ s << "#{basename} called with: #{argv.join(" ")}\n"
+ s << "superenv removed: #{dels.join(" ")}\n" unless dels.empty?
+ s << "superenv added: #{adds.join(" ")}\n" unless adds.empty?
+ s << "superenv executed: #{tool} #{args.join(" ")}\n\n"
+ File.open("#{ENV["HOMEBREW_CC_LOG_PATH"]}.cc", "a+") { |f| f.write(s) }
+end
+
+if __FILE__ == $PROGRAM_NAME
+ ##################################################################### sanity
+
+ if (cc = ENV["HOMEBREW_CC"]).nil? || cc.empty? || cc == "cc"
+ # those values are not allowed
+ ENV["HOMEBREW_CC"] = "clang"
+ end
+
+ ####################################################################### main
+
+ dirname, basename = File.split($0)
+
+ cmd = Cmd.new(basename, ARGV)
+ tool = cmd.tool
+ args = cmd.args
+
+ log(basename, ARGV, tool, args)
+
+ args << { :close_others => false } if RUBY_VERSION >= "2.0"
+ exec "#{dirname}/xcrun", tool, *args
+end
diff --git a/Library/Homebrew/shims/super/clang b/Library/Homebrew/shims/super/clang
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/clang
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/clang++ b/Library/Homebrew/shims/super/clang++
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/clang++
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/cpp b/Library/Homebrew/shims/super/cpp
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/cpp
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/g++ b/Library/Homebrew/shims/super/g++
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/g++
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/g++-4.2 b/Library/Homebrew/shims/super/g++-4.2
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/g++-4.2
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/g++-4.3 b/Library/Homebrew/shims/super/g++-4.3
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/g++-4.3
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/g++-4.4 b/Library/Homebrew/shims/super/g++-4.4
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/g++-4.4
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/g++-4.5 b/Library/Homebrew/shims/super/g++-4.5
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/g++-4.5
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/g++-4.6 b/Library/Homebrew/shims/super/g++-4.6
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/g++-4.6
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/g++-4.7 b/Library/Homebrew/shims/super/g++-4.7
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/g++-4.7
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/g++-4.8 b/Library/Homebrew/shims/super/g++-4.8
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/g++-4.8
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/g++-4.9 b/Library/Homebrew/shims/super/g++-4.9
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/g++-4.9
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/g++-5 b/Library/Homebrew/shims/super/g++-5
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/g++-5
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/g++-6 b/Library/Homebrew/shims/super/g++-6
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/g++-6
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/gcc b/Library/Homebrew/shims/super/gcc
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/gcc
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/gcc-4.2 b/Library/Homebrew/shims/super/gcc-4.2
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/gcc-4.2
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/gcc-4.3 b/Library/Homebrew/shims/super/gcc-4.3
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/gcc-4.3
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/gcc-4.4 b/Library/Homebrew/shims/super/gcc-4.4
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/gcc-4.4
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/gcc-4.5 b/Library/Homebrew/shims/super/gcc-4.5
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/gcc-4.5
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/gcc-4.6 b/Library/Homebrew/shims/super/gcc-4.6
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/gcc-4.6
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/gcc-4.7 b/Library/Homebrew/shims/super/gcc-4.7
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/gcc-4.7
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/gcc-4.8 b/Library/Homebrew/shims/super/gcc-4.8
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/gcc-4.8
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/gcc-4.9 b/Library/Homebrew/shims/super/gcc-4.9
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/gcc-4.9
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/gcc-5 b/Library/Homebrew/shims/super/gcc-5
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/gcc-5
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/gcc-6 b/Library/Homebrew/shims/super/gcc-6
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/gcc-6
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/git b/Library/Homebrew/shims/super/git
new file mode 120000
index 000000000..ba71181a5
--- /dev/null
+++ b/Library/Homebrew/shims/super/git
@@ -0,0 +1 @@
+../scm/git \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/gmake b/Library/Homebrew/shims/super/gmake
new file mode 120000
index 000000000..ac08cdcf9
--- /dev/null
+++ b/Library/Homebrew/shims/super/gmake
@@ -0,0 +1 @@
+make \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/i686-apple-darwin11-llvm-g++-4.2 b/Library/Homebrew/shims/super/i686-apple-darwin11-llvm-g++-4.2
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/i686-apple-darwin11-llvm-g++-4.2
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/i686-apple-darwin11-llvm-gcc-4.2 b/Library/Homebrew/shims/super/i686-apple-darwin11-llvm-gcc-4.2
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/i686-apple-darwin11-llvm-gcc-4.2
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/ld b/Library/Homebrew/shims/super/ld
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/ld
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/llvm-g++ b/Library/Homebrew/shims/super/llvm-g++
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/llvm-g++
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/llvm-g++-4.2 b/Library/Homebrew/shims/super/llvm-g++-4.2
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/llvm-g++-4.2
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/llvm-gcc b/Library/Homebrew/shims/super/llvm-gcc
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/llvm-gcc
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/llvm-gcc-4.2 b/Library/Homebrew/shims/super/llvm-gcc-4.2
new file mode 120000
index 000000000..2652f5f42
--- /dev/null
+++ b/Library/Homebrew/shims/super/llvm-gcc-4.2
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/make b/Library/Homebrew/shims/super/make
new file mode 100755
index 000000000..f7089de36
--- /dev/null
+++ b/Library/Homebrew/shims/super/make
@@ -0,0 +1,3 @@
+#!/bin/bash
+export HOMEBREW_CCCFG="O$HOMEBREW_CCCFG"
+exec xcrun make "$@"
diff --git a/Library/Homebrew/shims/super/mig b/Library/Homebrew/shims/super/mig
new file mode 100755
index 000000000..a7a12557a
--- /dev/null
+++ b/Library/Homebrew/shims/super/mig
@@ -0,0 +1,3 @@
+#!/bin/bash
+pwd="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+exec xcrun mig -cc $pwd/cc "$@"
diff --git a/Library/Homebrew/shims/super/pod2man b/Library/Homebrew/shims/super/pod2man
new file mode 100755
index 000000000..8e83f4bcb
--- /dev/null
+++ b/Library/Homebrew/shims/super/pod2man
@@ -0,0 +1,3 @@
+#!/bin/bash
+POD2MAN=$(/usr/bin/which pod2man5.18 || /usr/bin/which pod2man5.16 || /usr/bin/which pod2man5.12 || /usr/bin/which $HOMEBREW_PREFIX/opt/pod2man/bin/pod2man || echo /usr/bin/pod2man)
+exec $POD2MAN "$@"
diff --git a/Library/Homebrew/shims/super/sed b/Library/Homebrew/shims/super/sed
new file mode 100755
index 000000000..420e39669
--- /dev/null
+++ b/Library/Homebrew/shims/super/sed
@@ -0,0 +1,7 @@
+#!/bin/bash
+if [[ $HOMEBREW_CCCFG == *s* ]]; then
+ # Fix issue with sed barfing on unicode characters on Mountain Lion
+ unset LC_ALL
+ export LC_CTYPE='C'
+fi
+exec /usr/bin/sed "$@"
diff --git a/Library/Homebrew/shims/super/svn b/Library/Homebrew/shims/super/svn
new file mode 120000
index 000000000..e1231dfaa
--- /dev/null
+++ b/Library/Homebrew/shims/super/svn
@@ -0,0 +1 @@
+../scm/svn \ No newline at end of file
diff --git a/Library/Homebrew/shims/super/xcrun b/Library/Homebrew/shims/super/xcrun
new file mode 100755
index 000000000..128f40ba2
--- /dev/null
+++ b/Library/Homebrew/shims/super/xcrun
@@ -0,0 +1,57 @@
+#!/bin/sh
+# Historically, xcrun has had various bugs, and in some cases it didn't
+# work at all (e.g. CLT-only in the Xcode 4.3 era). This script emulates
+# it and attempts to avoid these issues.
+
+# Some build tools set DEVELOPER_DIR, so discard it
+unset DEVELOPER_DIR
+
+if [ $# -eq 0 ]; then
+ exec /usr/bin/xcrun "$@"
+fi
+
+case "$1" in
+ -*) exec /usr/bin/xcrun "$@" ;;
+esac
+
+arg0=$1
+shift
+
+exe="/usr/bin/${arg0}"
+if [ -x "$exe" ]; then
+ if [ -n "$HOMEBREW_PREFER_CLT_PROXIES" ]; then
+ exec "$exe" "$@"
+ elif [ -z "$HOMEBREW_SDKROOT" -o ! -d "$HOMEBREW_SDKROOT" ]; then
+ exec "$exe" "$@"
+ fi
+fi
+
+SUPERBIN=$(cd "${0%/*}" && pwd -P)
+
+exe=$(/usr/bin/xcrun --find "$arg0" 2>/dev/null)
+if [ -x "$exe" -a "${exe%/*}" != "$SUPERBIN" ]; then
+ exec "$exe" "$@"
+fi
+
+old_IFS=$IFS
+IFS=:
+for path in $PATH; do
+ if [ "$path" = "$SUPERBIN" ]; then
+ continue
+ fi
+
+ exe="${path}/${arg0}"
+ if [ -x "$exe" ]; then
+ exec "$exe" "$@"
+ fi
+done
+IFS=$old_IFS
+
+echo >&2 "
+Failed to execute $arg0 $@
+
+Xcode and/or the CLT appear to be misconfigured. Try one or both of the following:
+ xcodebuild -license
+ sudo xcode-select -switch /path/to/Xcode.app
+"
+exit 1