NetBSD Problem Report #56180

From cjep@netbsd.org  Sun May 16 12:47:38 2021
Return-Path: <cjep@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2F0901A9287
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 16 May 2021 12:47:38 +0000 (UTC)
Message-Id: <20210516124736.D7C1E1A928D@mollari.NetBSD.org>
Date: Sun, 16 May 2021 12:47:36 +0000 (UTC)
From: cjep@netbsd.org
Reply-To: cjep@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: build.sh fails on OpenBSD 6.9 #2 - liblto plugin major/minor number
X-Send-Pr-Version: 3.95

>Number:         56180
>Category:       toolchain
>Synopsis:       build.sh fails on OpenBSD 6.9 #2 - liblto plugin major/minor number
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 16 12:50:00 +0000 2021
>Closed-Date:    Mon Jun 28 09:14:38 +0000 2021
>Last-Modified:  Tue Jun 29 08:55:01 +0000 2021
>Originator:     Chris Pinnock
>Release:        NetBSD-current, recent sources as of 16/5/2021
>Organization:
>Environment:
OpenBSD blowfish.home 6.9 GENERIC.MP#473 amd64
OpenBSD clang version 10.0.1
Target: amd64-unknown-openbsd6.9
Thread model: posix

>Description:
cf PR#56179

liblto_plugin is installed in the tools with a major & minor number 0.
The toolchain expects it without a major and minor number. I believe this
is simply the way that OpenBSD handles shared objects. It's not clear
to me here what the best approach is: a) flags to linker; b) flags to
installer; c) symbolic link hack. It looks like this is the only
shared object in our build toolchain.

(A workaround is to copy or symlink the file to liblto_plugin.so)
cjep@blowfish% pwd
/home/cjep/src/NetBSD/obj/amd64-x86_64/home/cjep/usr/src/tooldir.OpenBSD-6.9-amd64/libexec/gcc/x86_64--netbsd/10.3.0
cjep@blowfish% ls -la liblto_plugin.so
-rwxr-xr-x  1 cjep  cjep  113112 May 13 22:05 liblto_plugin.so.0.0

>How-To-Repeat:
Install OpenBSD 6.9
Grab src
./build -U -m amd64 release
(Note that whilst PR#56179 remains open, you will need to skip past the 
nbmakeinfo problem - building tools twice with -u is one way to do it.)


>Fix:

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: cjep@NetBSD.org
State-Changed-When: Mon, 28 Jun 2021 09:14:38 +0000
State-Changed-Why:
config.host in our gcc tree has been adjusted to provide config so that
OpenBSD cross-builds work.



From: "Chris Pinnock" <cjep@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/56180 CVS commit: src/external/gpl3/gcc/dist/gcc
Date: Mon, 28 Jun 2021 09:13:11 +0000

 Module Name:	src
 Committed By:	cjep
 Date:		Mon Jun 28 09:13:11 UTC 2021

 Modified Files:
 	src/external/gpl3/gcc/dist/gcc: config.host

 Log Message:
 PR toolchain/56180. Add configuration so that gcc can find the LTO
 plugin when cross-building NetBSD from OpenBSD hosts. Discussed with mrg.


 To generate a diff of this commit:
 cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/dist/gcc/config.host

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

From: "Chris Pinnock" <cjep@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/56180 CVS commit: src/external/gpl3/gcc.old/dist/gcc
Date: Tue, 29 Jun 2021 08:51:04 +0000

 Module Name:	src
 Committed By:	cjep
 Date:		Tue Jun 29 08:51:04 UTC 2021

 Modified Files:
 	src/external/gpl3/gcc.old/dist/gcc: config.host

 Log Message:
 PR toolchain/56180. Additional to yesterday's commit in gcc, also needed in
 gcc.old. Add configuration so that gcc can find the LTO plugin when
 cross-building NetBSD from OpenBSD hosts.


 To generate a diff of this commit:
 cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc.old/dist/gcc/config.host

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

>Unformatted:

NetBSD Home
NetBSD PR Database Search

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