aboriginal

changeset 1327:64d310e39a12

Teach ccwrap to switch off -xc after command line sources listed, so cc doesn't try to interpret libc and such as C sources.
author Rob Landley <rob@landley.net>
date Sat, 22 Jan 2011 14:40:00 -0600
parents be1f24b10864
children 08d92a215472
files sources/toys/ccwrap.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/sources/toys/ccwrap.c	Wed Feb 09 21:10:04 2011 -0600
     1.2 +++ b/sources/toys/ccwrap.c	Sat Jan 22 14:40:00 2011 -0600
     1.3 @@ -112,7 +112,7 @@
     1.4  
     1.5  int main(int argc, char **argv)
     1.6  {
     1.7 -	int linking = 1, use_static_linking = 0, use_shared_libgcc;
     1.8 +	int linking = 1, use_static_linking = 0, use_shared_libgcc, used_x = 0;
     1.9  	int use_stdinc = 1, use_start = 1, use_stdlib = 1, use_shared = 0;
    1.10  	int source_count = 0, verbose = 0;
    1.11  	int i, argcnt, lplen;
    1.12 @@ -357,6 +357,10 @@
    1.13  					if (strcmp("-fprofile-arcs",argv[i]) == 0) profile = 1;
    1.14  					break;
    1.15  
    1.16 +				case 'x':
    1.17 +					used_x++;
    1.18 +					break;
    1.19 +
    1.20  				// --longopts
    1.21  
    1.22  				case '-':
    1.23 @@ -433,6 +437,8 @@
    1.24  
    1.25  		for (i=1; i<argc; i++) if (argv[i]) cc_argv[argcnt++] = argv[i];
    1.26  
    1.27 +		if (used_x) cc_argv[argcnt++] = "-xnone";
    1.28 +
    1.29  		// Add standard libraries
    1.30  
    1.31  		if (use_stdlib) {