Article View: gnu.gcc.bug
Article #5995-save-temps should override -pipe
From: Marty Leisner
Date: Tue, 24 Dec 1996 00:00
Date: Tue, 24 Dec 1996 00:00
67 lines
2025 bytes
2025 bytes
I think -save-temps should negate -pipe if they appear together.
The following is not ideal (but its simple), nor will it deal (yet)
with --pipe (I didn't even know double hyphens are accepted).
The problem is in many systems, they have -pipe embedded in
the makefiles, and if you want to do -save-temps (to figure out what's
wrong), it difficult.
Its wrt gcc 2.7.2
--- gcc.c 1996/12/16 02:42:06 1.1
+++ gcc.c 1996/12/21 05:50:18 1.2
@@ -4198,6 +4198,38 @@
kill (getpid (), signum);
}
+static void
+check_for_pipe_and_savetemps(argc, argv)
+ int argc;
+ char **argv;
+{
+ int have_pipe;
+ int have_savetemps;
+ int i;
+
+ have_pipe = 0;
+ have_savetemps = 0;
+
+ for(i = 0; i < argc; i++) {
+ if(!strcmp(argv[i], "-pipe"))
+ have_pipe = 1;
+ if(!strcmp(argv[i], "-save-temps"))
+ have_savetemps = 1;
+ }
+
+ if(have_savetemps && have_pipe) {
+ for(i = 0; i < argc; i++) {
+ if(!strcmp(argv[i], "-pipe"))
+ /* this seems to be the easiest thing to
+ * do -- any empty option causes problems
+ */
+ argv[i] = "-save-temps";
+ }
+ }
+
+}
+
+
int
main (argc, argv)
int argc;
@@ -4227,6 +4259,7 @@
if (signal (SIGPIPE, SIG_IGN) != SIG_IGN)
signal (SIGPIPE, fatal_error);
#endif
+ check_for_pipe_and_savetemps(argc, argv);
argbuf_length = 10;
argbuf = (char **) xmalloc (argbuf_length * sizeof (char *));
marty leisner@sdsp.mc.xerox.com
Don't confuse education with schooling.
Milton Friedman to Yogi Berra
Technical Details
Message-ID:
<9612241648.AA09408@gnu.sdsp.mc.xerox.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113d02,3e561e7b7a1c7df,start X-Google-Attributes: gid113d02,public From: "Marty Leisner" <leisner@sdsp.mc.xerox.com> Subject: -save-temps should override -pipe Date: 1996/12/24 Message-ID: <9612241648.AA09408@gnu.sdsp.mc.xerox.com> X-Deja-AN: 205796858 sender: bug-gcc-request@prep.ai.mit.edu x-gateway: relay6.UU.NET from bug-gcc to gnu.gcc.bug; Tue, 24 Dec 1996 11:51:19 EST newsgroups: gnu.gcc.bug