diff options
author | Jeff Law <law@gcc.gnu.org> | 2000-08-21 12:01:51 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2000-08-21 12:01:51 -0600 |
commit | 49009afdf737a82926f3f3a245508ef6db51c33e (patch) | |
tree | cb0efe07a757f09a75c26e74d5e3d29b0e63d2fa /gcc/protoize.c | |
parent | dc13bad72b60849788b55675d3ded5674b7dbdc8 (diff) | |
download | gcc-49009afdf737a82926f3f3a245508ef6db51c33e.zip gcc-49009afdf737a82926f3f3a245508ef6db51c33e.tar.gz gcc-49009afdf737a82926f3f3a245508ef6db51c33e.tar.bz2 |
gcc.c (do_spec_1): Implement %j spec flag.
* 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.
From-SVN: r35849
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 7a58df2..1a51a7d 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; |