cc: don't add linker arguments if only -v passed.
Supports configure scripts (e.g., mplayer) that use "gcc -v" to identify compiler. Closes Homebrew/homebrew#27793. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
25c7b49eee
commit
bfc6a73cba
@ -73,6 +73,12 @@ class Cmd
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
def args
|
def args
|
||||||
|
if @args.length == 1 and @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 !cccfg?("O") || tool == "ld" || configure?
|
if !cccfg?("O") || tool == "ld" || configure?
|
||||||
args = @args.dup
|
args = @args.dup
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user