NetBSD Problem Report #55248

From  Sat May  9 00:26:31 2020
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 6A3151A9213
	for <>; Sat,  9 May 2020 00:26:31 +0000 (UTC)
Message-Id: <>
Date: Sat,  9 May 2020 00:26:30 +0000 (UTC)
Subject: ld.elf_so on 9.0/aarch64 might need reduced optimization for rtld.c
X-Send-Pr-Version: www-1.0

>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
>Last-Modified:  Sat May 09 01:00:01 +0000 2020
>Originator:     Tobias Nygren
>Release:        9.0_STABLE
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.

run "java -version"

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
+++ 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

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

From: "Tobias Nygren" <>
Subject: PR/55248 CVS commit: pkgsrc/lang/openjdk11
Date: Sat, 9 May 2020 00:55:44 +0000

 Module Name:	pkgsrc
 Committed By:	tnn
 Date:		Sat May  9 00:55:44 UTC 2020

 Modified Files:
 	pkgsrc/lang/openjdk11: distinfo

 Log Message:
 openjdk11: enable support for NetBSD-*-aarch64. Add bootstrap binaries.

 Only works on -current. See PR port-evbarm/55248 for 9.0 caveats.

 To generate a diff of this commit:
 cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/openjdk11/
 cvs rdiff -u -r1.15 -r1.16 pkgsrc/lang/openjdk11/distinfo

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.