Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/csu/common crt0-common.c is miscompiled by gcc 5.3 on ev...



details:   https://anonhg.NetBSD.org/src/rev/7f19161befe9
branches:  trunk
changeset: 344442:7f19161befe9
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Mar 29 21:23:05 2016 +0000

description:
crt0-common.c is miscompiled by gcc 5.3 on evbarm with -O2 so use -O1.  Do
this for all non-x86 arches.

diffstat:

 lib/csu/common/Makefile.inc |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 44f3f1dd80b0 -r 7f19161befe9 lib/csu/common/Makefile.inc
--- a/lib/csu/common/Makefile.inc       Tue Mar 29 18:42:29 2016 +0000
+++ b/lib/csu/common/Makefile.inc       Tue Mar 29 21:23:05 2016 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.26 2016/03/27 00:03:06 mrg Exp $
+#      $NetBSD: Makefile.inc,v 1.27 2016/03/29 21:23:05 skrll Exp $
 
 .include <bsd.own.mk>
 
@@ -20,6 +20,7 @@
 # XXXGCC5   emits "clr %g1; call %g1", which is effectively jumping to zero.
 . if defined(HAVE_GCC) && ${HAVE_GCC} == 53 && \
      ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "amd64"
+CFLAGS.crt0-common.c+= -O1
 CFLAGS.crtbeginS.c+=   -O1
 . endif
 .endif
@@ -88,7 +89,7 @@
 crt0.o: crt0.S crt0-common.c
        ${_MKTARGET_COMPILE}
        ${COMPILE.S} ${ARCHDIR}/crt0.S -o ${.TARGET}.S.o
-       ${COMPILE.c} ${MY_PICFLAGS} ${COMMON_DIR}/crt0-common.c -o ${.TARGET}.c.o
+       ${COMPILE.c} ${CFLAGS.crt0-common.c} ${MY_PICFLAGS} ${COMMON_DIR}/crt0-common.c -o ${.TARGET}.c.o
        ${LD} -r -o ${.TARGET}.o ${.TARGET}.S.o ${.TARGET}.c.o
        ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}.o ${.TARGET} 
        rm -f ${.TARGET}.S.o ${.TARGET}.c.o ${.TARGET}.o



Home | Main Index | Thread Index | Old Index