diff options
author | H. Peter Anvin <hpa@zytor.com> | 2005-03-02 20:25:33 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2005-03-02 20:25:33 +0000 |
commit | 95c02e6cc18321be87ded7d0598582f77fb1a0d9 (patch) | |
tree | 91c3339bf6e5b3d70469acdf0e7caad008113495 | |
parent | 83fdecab8b21e009b617eb349bfe85420316feff (diff) | |
download | klibc-95c02e6cc18321be87ded7d0598582f77fb1a0d9.tar.gz |
Handle conjoined and disjoint versions of -D -U -Iklibc-0.204
-rw-r--r-- | klcc.in | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -109,9 +109,14 @@ while ( defined($a = shift(@ARGV)) ) { } elsif ( $a =~ /^-Wl,(.*)$/ ) { # -Wl used to pass options to the linker push(@ldopt, split(/,/, $1)); - } elsif ( $a =~ /^-([fmwWQdODUI]|std=|ansi|pedantic)/ ) { + } elsif ( $a =~ /^-([fmwWQdO]|std=|ansi|pedantic)/ ) { # Options to gcc push(@ccopt, $a); + } elsif ( $a =~ /^-([DUI])(.*)$/ ) { + # Options to gcc, which can take either a conjoined argument + # (-DFOO) or a disjoint argument (-D FOO) + push(@ccopt, $a); + push(@ccopt, shift(@ARGV)) if ( $2 eq '' ); } elsif ( $a =~ /^-[gp]/ ) { # Debugging options to gcc *and* ld push(@ccopt, $a); |