bin/61087: wacky string constant merging in isdnd
Colin Percival
cperciva at daemonology.net
Thu Jan 8 10:01:12 PST 2004
>Number: 61087
>Category: bin
>Synopsis: wacky string constant merging in isdnd
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Jan 08 10:00:33 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Colin Percival
>Release: FreeBSD 5.2-RC i386
>Organization:
>Environment:
System: FreeBSD fafnir.daemonology.net 5.2-RC FreeBSD 5.2-RC #3: Sun Jan 4 16:13:57 GMT 2004 cperciva at fafnir.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
>Description:
isdnd contains a build timestamp. It also contains the
strings "1", "2", "3", ... , "32".
If isdnd is built at 1-32 seconds past a minute, gcc
will, very helpfully, merge the two constant strings.
This is
1. A problem for FreeBSD Update, since this causes
cascading differences, and
2. Rather astonishing behaviour.
>How-To-Repeat:
>Fix:
Tell gcc not to merge the string constants in this
particular case.
--- isdnd.diff begins here ---
Index: Makefile
===================================================================
RCS file: /usr/cvsroot/src/usr.sbin/i4b/isdnd/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- usr.sbin/i4b/isdnd/Makefile 4 Apr 2003 17:49:14 -0000 1.12
+++ usr.sbin/i4b/isdnd/Makefile 8 Jan 2004 17:23:04 -0000
@@ -10,6 +10,10 @@
# compile debug support
COPTS+= -DDEBUG
+# avoid wacky merging of string constants from
+# source code with compile-time timestamp
+COPTS+= -fno-merge-constants
+
# enable rtprio usage
COPTS+= -DUSE_RTPRIO
--- isdnd.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list