diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-21 18:01:51 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-21 18:01:51 +0000 |
commit | 655a58fa0f1db54ef4c004590e2d952dd2ca5526 (patch) | |
tree | cb0efe07a757f09a75c26e74d5e3d29b0e63d2fa /gcc/protoize.c | |
parent | d8c5d866d60034e50391f92ee5725376fbc8066e (diff) | |
download | gcc-655a58fa0f1db54ef4c004590e2d952dd2ca5526.tar.gz |
* gcc.c (do_spec_1): Implement %j spec flag.
Remove dead comment.
* gcc.texi (The Configuration File): Document HOST_BIT_BUCKET.
* system.h (HOST_BIT_BUCKET): Default to "/dev/null".
* config/i386/xm-dos.h (HOST_BIT_BUCKET): Define as "NUL".
* config/i386/xm-os2.h, config/winnt/winnt.h: Likewise.
* protoize.c (munge_compile_params): Use HOST_BIT_BUCKET (if
writable) instead of hardcoded value.
* toplev.c (compile_file): Output to a file even if -fsyntax-only.
* gcc.c, config/i386/xm-dos.h, config/i386/xm-os2.h: Kill
MKTEMP_EACH_FILE.
* gcc.c (cc1_options): Do not process -o or
run the assembler if -fsyntax-only.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35849 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/protoize.c')
-rw-r--r-- | gcc/protoize.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/protoize.c b/gcc/protoize.c index 7a58df23ef7..1a51a7d20fa 100644 --- a/gcc/protoize.c +++ b/gcc/protoize.c @@ -1952,6 +1952,7 @@ munge_compile_params (params_list) = (const char **) alloca ((strlen (params_list) + 8) * sizeof (char *)); int param_count = 0; const char *param; + struct stat st; temp_params[param_count++] = compiler_file_name; for (;;) @@ -1998,11 +1999,15 @@ munge_compile_params (params_list) temp_params[param_count++] = "-S"; temp_params[param_count++] = "-o"; -#if defined (_WIN32) && ! defined (__CYGWIN__) && ! defined (_UWIN) - temp_params[param_count++] = "NUL"; -#else - temp_params[param_count++] = "/dev/null"; -#endif + + if ((stat (HOST_BIT_BUCKET, &st) == 0) && (!S_ISDIR (st.st_mode)) + (access (HOST_BIT_BUCKET, W_OK) == 0)) + temp_params[param_count++] = HOST_BIT_BUCKET; + else + /* FIXME: This is hardly likely to be right, if HOST_BIT_BUCKET is not + writable. But until this is rejigged to use make_temp_file(), this + is the best we can do. */ + temp_params[param_count++] = "/dev/null"; /* Leave room for the input file name argument. */ input_file_name_index = param_count; |