NetBSD Problem Report #58277

From www@netbsd.org  Thu May 23 14:21:30 2024
Return-Path: <www@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 3453A1A923A
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 23 May 2024 14:21:30 +0000 (UTC)
Message-Id: <20240523142128.C83BB1A923C@mollari.NetBSD.org>
Date: Thu, 23 May 2024 14:21:28 +0000 (UTC)
From: hashikaw@mail.ru
Reply-To: hashikaw@mail.ru
To: gnats-bugs@NetBSD.org
Subject: poblem with binutils's ld
X-Send-Pr-Version: www-1.0

>Number:         58277
>Category:       bin
>Synopsis:       poblem with binutils's ld
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 23 14:25:00 +0000 2024
>Originator:     Kouichi Hashikawa
>Release:        NetBSD-current, 10
>Organization:
>Environment:
>Description:
while compiling binutils's ld, (this is amd64)

--- dependall-binutils ---
#    create  ld/.depend.elf_i386
(srcdir=/usr/src/external/gpl3/binutils/usr.bin/ld/../../dist/ld EMULATION_NAME=elf_i386 . /usr/src/external/gpl3/binutils/usr.bin/ld/../../dist/ld/emulparams/elf_i386.sh &&  if [ x"$TEMPLATE_NAME" != x ]; then  temp_name=$TEMPLATE_NAME.em;  else  temp_name=;  fi;  if [ x"$SCRIPT_NAME" != x ]; then  script=$SCRIPT_NAME.sc;  else  script=;  fi;  echo "eelf_i386.c: $temp_name $script"  ) >.depend.elf_i386
/usr/src/external/gpl3/binutils/usr.bin/ld/../../dist/ld/emulparams/elf_i386.sh: source_sh: not found
/usr/src/external/gpl3/binutils/usr.bin/ld/../../dist/ld/emulparams/elf_i386.sh: source_sh: not found
/usr/src/external/gpl3/binutils/usr.bin/ld/../../dist/ld/emulparams/elf_i386.sh: source_sh: not found
/usr/src/external/gpl3/binutils/usr.bin/ld/../../dist/ld/emulparams/elf_i386.sh: source_sh: not found
/usr/src/external/gpl3/binutils/usr.bin/ld/../../dist/ld/emulparams/elf_i386.sh: source_sh: not found

source_sh is defined at /usrs/src/external/gpl3/binutils/usr.bin/ld/dist/ld/genscripts.sh.

Same problem and Other problem, (on powerpc)

#    create  ld/.depend.elf32ppc
(srcdir=/usr/src/external/gpl3/binutils/usr.bin/ld/../../dist/ld EMULATION_NAME=elf32ppc . /usr/src/external/gpl3/binutils/usr.bin/ld/../../dist/ld/emulparams/elf32ppc.sh &&  if [ x"$TEMPLATE_NAME" != x ]; then  temp_name=$TEMPLATE_NAME.em;  else  temp_name=;  fi;  if [ x"$SCRIPT_NAME" != x ]; then  script=$SCRIPT_NAME.sc;  else  script=;  fi;  echo "eelf32ppc.c: $temp_name $script"  ) >.depend.elf32ppc
/usr/src/external/gpl3/binutils/usr.bin/ld/../../dist/ld/emulparams/elf32ppc.sh: source_sh: not found
/usr/src/external/gpl3/binutils/usr.bin/ld/../../dist/ld/emulparams/elf32ppc.sh: source_sh: not found
grep: ldemul-list.h: No such file or directory

(1) elf32ppc.sh include elf32ppccommon.sh via source_sh, SCRIPT_NAME and TEMPLATE_NAME is defined at elf32ppccommon.sh. Then, .depend.elf32ppc* is incorrect.

(2) elf32ppc.sh contains following line,
if grep -q 'ld_elf32_spu_emulation' ldemul-list.h; then
ldemul-list.h is at /usr/src/external/gpl3/binutils/usr.bin/ld/arch/powerpc/ldemul-list.h, cannot find it.
(other emulparams/*.sh don't use grep .. ldemul-list.sh).
>How-To-Repeat:

>Fix:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.