aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/ENV/4.3/cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index b4cc177b4..67bb0df07 100755
--- a/Library/ENV/4.3/cc
+++ b/Library/ENV/4.3/cc
@@ -73,6 +73,12 @@ class Cmd
end
end
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?
args = @args.dup
else