public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: preprocessor/5899: -M disables -dM
@ 2002-03-10 13:54 neil
0 siblings, 0 replies; 8+ messages in thread
From: neil @ 2002-03-10 13:54 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, schwab
Synopsis: -M disables -dM
State-Changed-From-To: analyzed->closed
State-Changed-By: neil
State-Changed-When: Sun Mar 10 13:54:39 2002
State-Changed-Why:
Fixed for 3.1 and 3.2. Updated documentation is in the works.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5899
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: preprocessor/5899: -M disables -dM
@ 2002-03-09 13:16 Andreas Schwab
0 siblings, 0 replies; 8+ messages in thread
From: Andreas Schwab @ 2002-03-09 13:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 864 bytes --]
The following reply was made to PR preprocessor/5899; it has been noted by GNATS.
From: Andreas Schwab <schwab@suse.de>
To: Neil Booth <neil@daikokuya.demon.co.uk>
Cc: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/5899: -M disables -dM
Date: Sat, 09 Mar 2002 22:10:27 +0100
Neil Booth <neil@daikokuya.demon.co.uk> writes:
|> Andreas Schwab wrote:-
|>
|> > glibc uses the equivalent functionality provided by SUNPRO_DEPENDENCIES:
|>
|> Ah, OK. Would you confirm this works for you? If so, I'll send a
|> formal patch and explicitly document this behaviour.
Yes, this works for me.
Thanks, Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: preprocessor/5899: -M disables -dM
@ 2002-03-09 13:16 Neil Booth
0 siblings, 0 replies; 8+ messages in thread
From: Neil Booth @ 2002-03-09 13:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR preprocessor/5899; it has been noted by GNATS.
From: Neil Booth <neil@daikokuya.demon.co.uk>
To: Andreas Schwab <schwab@suse.de>
Cc: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/5899: -M disables -dM
Date: Sat, 9 Mar 2002 21:08:49 +0000
Andreas Schwab wrote:-
> glibc uses the equivalent functionality provided by SUNPRO_DEPENDENCIES:
Ah, OK. Would you confirm this works for you? If so, I'll send a
formal patch and explicitly document this behaviour.
Neil.
Index: cppinit.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cppinit.c,v
retrieving revision 1.202
diff -u -p -r1.202 cppinit.c
--- cppinit.c 2002/02/23 13:42:40 1.202
+++ cppinit.c 2002/03/09 21:06:21
@@ -1886,11 +1886,9 @@ init_dependency_output (pfile)
with -o. out_fname is non-NULL here. */
CPP_OPTION (pfile, deps_file) = CPP_OPTION (pfile, out_fname);
- /* When doing dependencies, we should suppress all output, including
- -dM, -dI etc. */
+ /* When doing dependencies, suppress normal preprocessed output.
+ Still do -dM, -dI etc. as e.g. glibc depends on this. */
CPP_OPTION (pfile, no_output) = 1;
- CPP_OPTION (pfile, dump_macros) = 0;
- CPP_OPTION (pfile, dump_includes) = 0;
}
/* Handle --help output. */
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: preprocessor/5899: -M disables -dM
@ 2002-03-09 12:56 Neil Booth
0 siblings, 0 replies; 8+ messages in thread
From: Neil Booth @ 2002-03-09 12:56 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR preprocessor/5899; it has been noted by GNATS.
From: Neil Booth <neil@daikokuya.demon.co.uk>
To: Andreas Schwab <schwab@suse.de>
Cc: neil@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/5899: -M disables -dM
Date: Sat, 9 Mar 2002 20:48:36 +0000
Andreas Schwab wrote:-
> IMHO neither -dM nor -M produce "normal output", so it would not
> contradict the docs to output both.
Sure, but it wasn't mentioned that it outputs to two streams
simultaneously. 2.95 didn't.
> Both 2.95 and 3.0.4 behave as expected by glibc.
What is "expected by glibc"? It's not what you posted, since 2.95.4
didn't support -MF.
Neil.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: preprocessor/5899: -M disables -dM
@ 2002-03-09 12:56 Andreas Schwab
0 siblings, 0 replies; 8+ messages in thread
From: Andreas Schwab @ 2002-03-09 12:56 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1963 bytes --]
The following reply was made to PR preprocessor/5899; it has been noted by GNATS.
From: Andreas Schwab <schwab@suse.de>
To: Neil Booth <neil@daikokuya.demon.co.uk>
Cc: neil@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/5899: -M disables -dM
Date: Sat, 09 Mar 2002 21:50:56 +0100
Neil Booth <neil@daikokuya.demon.co.uk> writes:
|> Andreas Schwab wrote:-
|>
|> > IMHO neither -dM nor -M produce "normal output", so it would not
|> > contradict the docs to output both.
|>
|> Sure, but it wasn't mentioned that it outputs to two streams
|> simultaneously. 2.95 didn't.
|>
|> > Both 2.95 and 3.0.4 behave as expected by glibc.
|>
|> What is "expected by glibc"? It's not what you posted, since 2.95.4
|> didn't support -MF.
glibc uses the equivalent functionality provided by SUNPRO_DEPENDENCIES:
# Generate the list of SYS_* macros for the system calls (__NR_* macros).
$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h
rm -f $(@:.h=.d)-t
{ \
echo '/* Generated at libc build time from kernel syscall list. */';\
echo ''; \
echo '#ifndef _SYSCALL_H'; \
echo '# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \
echo '#endif'; \
echo ''; \
SUNPRO_DEPENDENCIES='$(@:.h=.d)-t $@' \
$(CC) -E -x c $(sysincludes) $< -D_LIBC -dM | \
sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p'; \
} > $(@:.d=.h).new
mv -f $(@:.d=.h).new $(@:.d=.h)
sed < $(@:.h=.d)-t > $(@:.h=.d)-t2 \
-e 's,$(subst .,\.,$@),$(patsubst $(objpfx)%,$$(objpfx)%,\
$(@:.d=.h) $(@:.h=.d)),'
rm -f $(@:.h=.d)-t
mv -f $(@:.h=.d)-t2 $(@:.h=.d)
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: preprocessor/5899: -M disables -dM
@ 2002-03-09 11:56 Andreas Schwab
0 siblings, 0 replies; 8+ messages in thread
From: Andreas Schwab @ 2002-03-09 11:56 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1426 bytes --]
The following reply was made to PR preprocessor/5899; it has been noted by GNATS.
From: Andreas Schwab <schwab@suse.de>
To: neil@gcc.gnu.org
Cc: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/5899: -M disables -dM
Date: Sat, 09 Mar 2002 20:46:45 +0100
neil@gcc.gnu.org writes:
|> I'm not sure this behaviour is a good idea. The documentation in 3.0 for -dM begins "Instead of the normal output", and the documentation for -M begins "Instead of outputting the result of preprocessing, output a rule suitable for make". In other words, I think you're relying on undocumented behaviour that just happened to work.
IMHO neither -dM nor -M produce "normal output", so it would not
contradict the docs to output both.
|> What did 2.95 do? I believe it output both to the same place. I'm waiting for confirmation from Chris Demetriou that the semantics of 3.1 now match 2.95 for -M etc., which is a regression that was fixed, and is pending for 3.0.5. If the 3.0 behaviour is not a regression from 2.95 then I see no reason to preserve it, particularly if it was undocumented.
Both 2.95 and 3.0.4 behave as expected by glibc.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: preprocessor/5899: -M disables -dM
@ 2002-03-09 11:40 neil
0 siblings, 0 replies; 8+ messages in thread
From: neil @ 2002-03-09 11:40 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, schwab
Synopsis: -M disables -dM
State-Changed-From-To: open->analyzed
State-Changed-By: neil
State-Changed-When: Sat Mar 9 11:40:58 2002
State-Changed-Why:
I'm not sure this behaviour is a good idea. The documentation in 3.0 for -dM begins "Instead of the normal output", and the documentation for -M begins "Instead of outputting the result of preprocessing, output a rule suitable for make". In other words, I think you're relying on undocumented behaviour that just happened to work.
What did 2.95 do? I believe it output both to the same place. I'm waiting for confirmation from Chris Demetriou that the semantics of 3.1 now match 2.95 for -M etc., which is a regression that was fixed, and is pending for 3.0.5. If the 3.0 behaviour is not a regression from 2.95 then I see no reason to preserve it, particularly if it was undocumented.
Neil.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5899
^ permalink raw reply [flat|nested] 8+ messages in thread
* preprocessor/5899: -M disables -dM
@ 2002-03-09 10:26 schwab
0 siblings, 0 replies; 8+ messages in thread
From: schwab @ 2002-03-09 10:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 5899
>Category: preprocessor
>Synopsis: -M disables -dM
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 09 10:26:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: schwab@suse.de
>Release: 3.1 20020225 (experimental)
>Organization:
>Environment:
>Description:
Using -M together with -dM suppresses the output of the latter. This
breaks building glibc.
>How-To-Repeat:
$ echo '#include <limits.h>' | gcc -E -xc - -dM -M -MF x.dep
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-03-10 21:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-10 13:54 preprocessor/5899: -M disables -dM neil
-- strict thread matches above, loose matches on Subject: below --
2002-03-09 13:16 Andreas Schwab
2002-03-09 13:16 Neil Booth
2002-03-09 12:56 Andreas Schwab
2002-03-09 12:56 Neil Booth
2002-03-09 11:56 Andreas Schwab
2002-03-09 11:40 neil
2002-03-09 10:26 schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).