NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-pmax/57245: (Most?) MIPS Ports: Error: symbol type "gnu_indirect_function" is not supported by MIPS targets
The following reply was made to PR port-pmax/57245; it has been noted by GNATS.
From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: port-pmax/57245: (Most?) MIPS Ports: Error: symbol type
"gnu_indirect_function" is not supported by MIPS targets
Date: Fri, 12 May 2023 19:38:23 +0000
This mail didn't make it to gnats. (You tend to have to change the
address explicitly to include/be gnats-bugs when replying to yourself,
I'm afraid.)
------
From: Jan-Benedict Glaw <jbglaw%lug-owl.de@localhost>
To: port-pmax-maintainer%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost, Christos Zoulas <christos%zoulas.com@localhost>
Subject: Re: port-pmax/57245: (Most?) MIPS Ports: Error: symbol type
"gnu_indirect_function" is not supported by MIPS targets
Date: Mon, 27 Feb 2023 09:39:48 +0100
Hi!
On Sun, 2023-02-26 23:30:02 +0000, Jan-Benedict Glaw <jbglaw%lug-owl.de@localhost> wrote:
> Not yet done with bisecting, but in the remaining range, I suspect
> this commit:
>
> commit 0d328f22aad77fab31f5e0ca8a976746002f4db0
> Author: christos <christos%NetBSD.org@localhost>
> Date: Wed Jan 25 19:08:41 2023 +0000
>
> disable no ifuncs no mips error for now.
>
> diff --git a/external/gpl3/binutils/dist/gas/config/obj-elf.c b/external/gp=
> l3/binutils/dist/gas/config/obj-elf.c
> index e5ab8514de74..d3fe949adeaa 100644
> --- a/external/gpl3/binutils/dist/gas/config/obj-elf.c
> +++ b/external/gpl3/binutils/dist/gas/config/obj-elf.c
> @@ -2395,10 +2395,12 @@ obj_elf_type (int ignore ATTRIBUTE_UNUSED)
> && bed->elf_osabi !=3D ELFOSABI_FREEBSD)
> as_bad (_("symbol type \"%s\" is supported only by GNU "
> "and FreeBSD targets"), type_name);
> +#ifndef __NetBSD__
> /* MIPS targets do not support IFUNCS. */
> else if (bed->target_id =3D=3D MIPS_ELF_DATA)
> as_bad (_("symbol type \"%s\" is not supported by "
> "MIPS targets"), type_name);
> +#endif
> elf_tdata (stdoutput)->has_gnu_osabi |=3D elf_gnu_osabi_ifunc;
> type =3D BSF_FUNCTION | BSF_GNU_INDIRECT_FUNCTION;
> }
Actually, the above commit is an attempted _fix_, which I guess could
be a simple '#if 0' in this case. Just ftr, the build broke when
mipsel was moved to Binutils 2.39 (I guess that's the first release
doing the IFUNC check?)
commit 58c565ec20c718b8cd8733f9c60d40935ad741e0
Author: christos <christos%NetBSD.org@localhost>
Date: Wed Jan 25 22:36:56 2023 +0000
add mipsel and m68k to binutils 2.39
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index c37e8f45f446..e9db8e480a8a 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.own.mk,v 1.1301 2023/01/25 00:16:50 christos Exp $
+# $NetBSD: bsd.own.mk,v 1.1302 2023/01/25 22:36:56 christos Exp $
# This needs to be before bsd.init.mk
.if defined(BSD_MK_COMPAT_FILE)
@@ -102,12 +102,14 @@ MKGCCCMDS?= no
${MACHINE_ARCH:Maarch64*} || \
${MACHINE_ARCH} == "alpha" || \
${MACHINE_ARCH} == "i386" || \
- ${MACHINE_CPU} == "hppa" || \
- ${MACHINE_CPU} == "powerpc" || \
- ${MACHINE_CPU} == "riscv" || \
+ ${MACHINE_ARCH} == "m68k" || \
+ ${MACHINE_ARCH} == "mipsel" || \
${MACHINE_ARCH:Msparc*} || \
${MACHINE_ARCH} == "x86_64" || \
${MACHINE_ARCH} == "vax" || \
+ ${MACHINE_CPU} == "hppa" || \
+ ${MACHINE_CPU} == "powerpc" || \
+ ${MACHINE_CPU} == "riscv" || \
${MACHINE} == "sun2"
HAVE_BINUTILS?= 239
.else
So... My suggested fix is to either not have IFUNC symbols and/or just
'#if 0' the check.
MfG, JBG
--
Home |
Main Index |
Thread Index |
Old Index