Closed
Bug 1497
Opened 26 years ago
Closed 26 years ago
--enable-debug autoconf option does not work right
Categories
(SeaMonkey :: Build Config, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: kstailey, Assigned: briano)
Details
When you use --enable-debug it causes
-UDEBUG -DNDEBUG -DTRIMMED -DDEBUG -UNDEBUG
to be generated.
-------- test program to illustrate problem follows ---------
kstailey@cheeta$ cat foo.c
#include <stdio.h>
main()
{
#ifdef FOO
printf("foo\n");
#else
printf("bar\n");
#endif
}
kstailey@cheeta$ gcc -DFOO foo.c
kstailey@cheeta$ ./a.out
foo
kstailey@cheeta$ gcc -DFOO -UFOO foo.c
kstailey@cheeta$ ./a.out
bar
kstailey@cheeta$ gcc -UFOO -DFOO foo.c
kstailey@cheeta$ ./a.out
bar
kstailey@cheeta$ gcc -DFOO -UFOO -DFOO foo.c
kstailey@cheeta$ ./a.out
bar
kstailey@cheeta$ gcc --version
2.8.1
seems that -U takes precedence over -D no matter what the order of -D and -U
options is.
--------
If you look in config/config.mk 3.72 you will see
ifdef USE_AUTOCONF
OPTIMIZER =
DEFINES += -UDEBUG -DNDEBUG -DTRIMMED
XBCFLAGS =
else
[...]
ifdef MOZ_DEBUG
ifdef USE_AUTOCONF
OPTIMIZER =
DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(shell $(WHOAMI)) -DTRACING
else
Something like this is needed:
kstailey@cheeta$ cvs diff -u config.mk
Index: config.mk
===================================================================
RCS file: /cvsroot/mozilla/config/config.mk,v
retrieving revision 3.72
diff -u -r3.72 config.mk
--- config.mk 1998/11/21 00:59:57 3.72
+++ config.mk 1998/11/22 16:06:50
@@ -243,7 +243,9 @@
ifdef USE_AUTOCONF
OPTIMIZER =
+ifndef MOZ_DEBUG
DEFINES += -UDEBUG -DNDEBUG -DTRIMMED
+endif
XBCFLAGS =
else
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 1•26 years ago
|
||
Fixed in revision 3.77 of config.mk.
Build issue, beppe@netscape.com set to qa contact, kstailey please regress and
advise if this is fixed to your satisfaction.
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Comment 3•26 years ago
|
||
presuming kstailey@disclosure.com is happy with the fix, marking as verified.
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•