aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2005-03-02 20:25:33 +0000
committerH. Peter Anvin <hpa@zytor.com>2005-03-02 20:25:33 +0000
commit95c02e6cc18321be87ded7d0598582f77fb1a0d9 (patch)
tree91c3339bf6e5b3d70469acdf0e7caad008113495
parent83fdecab8b21e009b617eb349bfe85420316feff (diff)
downloadklibc-95c02e6cc18321be87ded7d0598582f77fb1a0d9.tar.gz
Handle conjoined and disjoint versions of -D -U -Iklibc-0.204
-rw-r--r--klcc.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/klcc.in b/klcc.in
index 7a5262c0c7965..a49fb8b056413 100644
--- a/klcc.in
+++ b/klcc.in
@@ -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);