diff options
author | H. Peter Anvin <hpa@zytor.com> | 2005-03-07 20:01:40 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2005-03-07 20:01:40 +0000 |
commit | 0037d1bc0deaf7daec3778496656cb04b4e4b9d0 (patch) | |
tree | 789ec9854d7130a6fd2aae5145cffad7560bfd4b | |
parent | fc6db92a17568b83c57eb191199eea50df394e28 (diff) | |
download | klibc-0037d1bc0deaf7daec3778496656cb04b4e4b9d0.tar.gz |
Fix -print-klibc and --versionklibc-0.217
-rw-r--r-- | klcc.in | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -115,9 +115,16 @@ while ( defined($a = shift(@ARGV)) ) { # Not an option. Must be a filename then. push(@files, $a); $flang{$a} = $lang || filename2lang($a); - } elsif ( $a =~ /^(-print|-dump|--help)/ ) { - # -print and -dump share prefixes with some other options, - # so put this test early! + } elsif ( $a =~ /^-print-klibc-(.*)$/ ) { + # This test must precede -print + if ( defined($conf{$1}) ) { + print ${$conf{$1}}, "\n"; + exit 0; + } else { + die "$0: unknown option: $a\n"; + } + } elsif ( $a =~ /^(-print|-dump|--help|--version)/ ) { + # These share prefixes with some other options, so put this test early! # Pseudo-operations; just pass to gcc and don't do anything else push(@ccopt, $a); $operation = 'c' if ( $operation eq '' ); @@ -169,13 +176,6 @@ while ( defined($a = shift(@ARGV)) ) { # Libraries push(@libs, $a); push(@libs, shift(@ARGV)) if ( $2 eq '' ); - } elsif ( $a =~ /^-print-klibc-(.*)$/ ) { - if ( defined($conf{$1}) ) { - print ${$conf{$1}}, "\n"; - exit 0; - } else { - die "$0: unknown option: $a\n"; - } } else { die "$0: unknown option: $a\n"; } |