aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-09-14 11:55:21 -0400
committerMax Howell2012-09-14 11:55:59 -0400
commit35b415489b0a0d02a48fc765c37fc39af74cd596 (patch)
tree26686d4b8a2dcb0c9f60fbcaac48ee7b9f8bf4f1 /Library
parentf2c4c960fe27764ca13b05efa918b0c7a7241225 (diff)
downloadhomebrew-35b415489b0a0d02a48fc765c37fc39af74cd596.tar.bz2
Puts build-tool args first
build-tool provided args must be considered first by cc, etc. Generally this already occurred for -I flags, because most of our -I flags were -isystem. However it didn't occur for keg-only flags and -L paths. This was an error. I amended the refurbishment code to ensure any paths we want to control the order of are thoroughly scrubbed out of the build-tool provided args. This ensures reliability for our builds. However this path-scrubbing should always occur, even during configure (I am fairly sure of this). So more work is required. Fixes #14781.
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/ENV/4.3/cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index 5b7753de8..37ebc0400 100755
--- a/Library/ENV/4.3/cc
+++ b/Library/ENV/4.3/cc
@@ -64,24 +64,24 @@ class Cmd
refurbished_args
end
if tool != 'ld'
- args.unshift("--sysroot=#$sdkroot")
+ args << "--sysroot=#$sdkroot"
else
- args.unshift($sdkroot).unshift("-syslibroot")
+ args << "-syslibroot" << $sdkroot
end if nclt?
case mode
when :cpp
- %w{-E} + cppflags + args
+ %w{-E} + args + cppflags
when :ld
ldflags + args
when :cc
- cflags + cppflags + args
+ cflags + args + cppflags
when :ccld
- cflags + cppflags + ldflags + args
+ cflags + args + cppflags + ldflags
end.compact
end
def refurbished_args
- lset = Set.new(syslibpath)
- iset = Set.new(syscpath)
+ lset = Set.new(libpath + syslibpath)
+ iset = Set.new(cpath.flatten)
args = []
whittler = @args.each