Module Name: src
Committed By: skrll
Date: Wed Nov 13 11:06:53 UTC 2013
Modified Files:
src/doc: HACKS
src/libexec/ld.elf_so: Makefile
Log Message:
Apply hack for gcc 4.8 bug on rtld.c.
To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/doc/HACKS
cvs rdiff -u -r1.123 -r1.124 src/libexec/ld.elf_so/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/doc/HACKS
diff -u src/doc/HACKS:1.141 src/doc/HACKS:1.142
--- src/doc/HACKS:1.141 Sat Nov 9 21:38:57 2013
+++ src/doc/HACKS Wed Nov 13 11:06:53 2013
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.141 2013/11/09 21:38:57 christos Exp $
+# $NetBSD: HACKS,v 1.142 2013/11/13 11:06:53 skrll Exp $
#
# This file is intended to document workarounds for currently unsolved
# (mostly) compiler bugs.
@@ -891,6 +891,16 @@ port x68k
internal compiler error: in cselib_record_set, at cselib.c:1999
kcah
+port x86_64
+ hack gcc 4.8 gcc miscompiles
+ cdate Wed Nov 13 10:16:00 GMT 2013
+ who skrll
+ file libexec/ld.elf_so/Makefile:1.124
+ descr
+ Incorrect code for rtld.o is produced with -fipa-cp-clone - stack
+ becomes unaligned in _rtld_unload_object.
+ kcah
+
hack fallback to /usr/bin/clang-cpp in rpcgen
cdate Wed Jun 5 15:49:27 CEST 2013
who joerg
Index: src/libexec/ld.elf_so/Makefile
diff -u src/libexec/ld.elf_so/Makefile:1.123 src/libexec/ld.elf_so/Makefile:1.124
--- src/libexec/ld.elf_so/Makefile:1.123 Wed Oct 9 22:33:41 2013
+++ src/libexec/ld.elf_so/Makefile Wed Nov 13 11:06:53 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.123 2013/10/09 22:33:41 matt Exp $
+# $NetBSD: Makefile,v 1.124 2013/11/13 11:06:53 skrll Exp $
#
# NOTE: when changing ld.so, ensure that ldd still compiles.
#
@@ -117,6 +117,13 @@ CPPFLAGS+= -DRTLD_DEFAULT_LIBRARY_PATH=\
COPTS.rtld.c+= -Wno-stack-protector
COPTS.symbol.c+=-Wno-stack-protector
+.if ${HAVE_GCC} >= 48
+.if ${LDELFSO_MACHINE_ARCH} == "x86_64"
+# gcc 4.8.1 miscompiles rtld.c when ipa-cp-clone is included.
+COPTS.rtld.c+= -fno-ipa-cp-clone
+.endif
+.endif
+
LDADD+= -L${CLIBOBJ} -L${DESTDIR}${LIBDIR}
.if ${MKPICLIB} != "no"
LDADD+= -lc_pic