Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/net Specify "-fno-tree-ter" to getaddrinfo.c and ge...
details: https://anonhg.NetBSD.org/src/rev/2da72aeb4c87
branches: trunk
changeset: 772207:2da72aeb4c87
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sat Dec 24 04:59:00 2011 +0000
description:
Specify "-fno-tree-ter" to getaddrinfo.c and gethnamaddr.c on arm and gcc45
for workaround of a possible optimazation bug.
On my W-ZERO3 and Zaurus, hostname lookup against CNAME by some commands
(ping(8), ftp(1) etc.) fails even though nslookup(8) returns a proper name
against the same CNAME, after NetBSD/arm ports has been switched to
gcc 4.5 since 201110311420Z (i.e 201110310000Z binaries worked but
201111010000Z ones not).
Building getaddrinfo.c and gethnamaddr.c in libc with "-O2 -fno-tree-ter"
(or using objects built by old gcc 4.1) seems to fix this issue.
Accroding to nonaka@, the following gcc bugzilla test case also fails
with -O2 but works with -O2 -fno-tree-ter on NetBSD/zaurus 5.99.57:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48863#c4
but CNAME lookup didn't fail on his environment even without this workaround.
diffstat:
lib/libc/net/Makefile.inc | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r 4133d767fdd4 -r 2da72aeb4c87 lib/libc/net/Makefile.inc
--- a/lib/libc/net/Makefile.inc Sat Dec 24 02:28:50 2011 +0000
+++ b/lib/libc/net/Makefile.inc Sat Dec 24 04:59:00 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.78 2009/10/02 02:45:29 tsarna Exp $
+# $NetBSD: Makefile.inc,v 1.79 2011/12/24 04:59:00 tsutsui Exp $
# @(#)Makefile.inc 8.2 (Berkeley) 9/5/93
# net sources
@@ -41,6 +41,11 @@
.include "${ARCHDIR}/net/Makefile.inc"
+.if defined(HAVE_GCC) && ${HAVE_GCC} == "45" && ${MACHINE_CPU} == "arm"
+COPTS.getaddrinfo.c+= -fno-tree-ter
+COPTS.gethnamaddr.c+= -fno-tree-ter
+.endif
+
MAN+= byteorder.3 ethers.3 gethostbyname.3 getifaddrs.3 \
getnetent.3 getprotoent.3 getpeereid.3 \
getservent.3 inet.3 inet_net.3 iso_addr.3 linkaddr.3 \
Home |
Main Index |
Thread Index |
Old Index