NetBSD-Bugs archive

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

port-evbarm/55248: ld.elf_so on 9.0/aarch64 might need reduced optimization for rtld.c



>Number:         55248
>Category:       port-evbarm
>Synopsis:       ld.elf_so on 9.0/aarch64 might need reduced optimization for rtld.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-evbarm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 09 00:30:00 +0000 2020
>Originator:     Tobias Nygren
>Release:        9.0_STABLE
>Organization:
>Environment:
>Description:
pkgsrc/lang/openjdk11 segfaults on NetBSD-9.0_STABLE-aarch64.
If /libexec/ld.elf_so is replaced with a copy from -current, it works fine.

This might be due to different GCC major version (7.4.0 vs 8.4.0).
ld.elf_so is built with optimization level -O3.
I suspect GCC 7 generates bad code.

>How-To-Repeat:
run "java -version"

>Fix:
Not sure how to request this change for NetBSD-9. It should not be applied to -current.

--- libexec/ld.elf_so/Makefile  26 Nov 2019 08:12:26 -0000      1.141.2.1
+++ libexec/ld.elf_so/Makefile  8 May 2020 20:46:00 -0000
@@ -129,6 +129,10 @@ COPTS.symbol.c+=-Wno-stack-protector
 COPTS.rtld.c+= -O0
 .endif

+.if ${MACHINE_CPU} == "aarch64"
+COPTS.rtld.c+= -O2
+.endif
+



Home | Main Index | Thread Index | Old Index