On Sun, Jun 29, 2025 at 01:28:43PM +0200, Landry Breuil wrote:
> Le Sun, Jun 29, 2025 at 10:04:42AM +0200, Antoine Jacoutot a écrit :
> > On Sat, Jun 28, 2025 at 04:14:14PM -0400, Kurt Mosiejczuk wrote:
> > > On Thu, Jun 26, 2025 at 02:30:11AM -0600, Antoine Jacoutot wrote:
> > > > CVSROOT:        /cvs
> > > > Module name:    ports
> > > > Changes by:     [email protected]       2025/06/26 02:30:11
> > > 
> > > > Modified files:
> > > >         devel/spidermonkey128: Makefile distinfo 
> > > 
> > > > Log message:
> > > > Update to spidermonkey128-128.12.0.
> > > 
> > > This broke the build on sparc64
> > 
> > Are you sure?
> > It seems more likely that this broke it:
> > 
> > https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/devel/spidermonkey128/Makefile.diff?ipk=6Q29DlydD6-Wa-cMqI82V0EWxIPa8TWiORvy5v7qtU4&r1=1.16&r2=1.17&f=h
> 
> probably, but is one of the compilers available on sparc64 able to use
> such construct which seems a somewhat basic and useful feature, in our
> case ? or it's time for more .if MACHINE_ARCH fuckery ?

Switching to ports-clang doesn't work. nsinstall crashes early in the
build because of a segfault somewhere deep in the guts of ld.so:

(gdb) bt
#0  _dl_md_reloc (object=0xdc824d5000, rel=<optimized out>, relasz=<optimized 
out>)
    at rtld_machine.c:248
#1  0x000000dc00c08260 in _dl_rtld (object=0xdc824d5000) at loader.c:794
#2  0x000000dc00c00eac in _dl_boot (warning: (Error: pc 0xdc00c00fbf in address 
map, but not in symtab.)
warning: (Internal error: pc 0xdc00c00fc0 in read in CU, but not in symtab.)
[...]
(gdb) p type
$1 = 3161264
(gdb) l
243                     if (type == R_TYPE(NONE) || type == R_TYPE(JMP_SLOT))
244                             continue;
245     
246                     where = (Elf_Addr *)(relas->r_offset + loff);
247     
248                     if (RELOC_USE_ADDEND(type))
249                             value = relas->r_addend;
250                     else
251                             value = 0;
252     
(gdb)

No idea...

This diff builds on amd64 and sparc64. Feel free to adapt it to your
liking.

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/spidermonkey128/Makefile,v
diff -u -p -r1.20 Makefile
--- Makefile    26 Jun 2025 08:30:11 -0000      1.20
+++ Makefile    29 Jun 2025 14:17:14 -0000
@@ -91,8 +91,11 @@ CONFIGURE_ENV =              LIBS=-lncurses \
 CONFIGURE_ENV +=       M4=/usr/local/bin/gm4
 BUILD_DEPENDS +=       devel/m4
 
+LDFLAGS_base-clang =   --ld-path=${WRKDIR}/bin/ld
+LDFLAGS +=             ${LDFLAGS_${CHOSEN_COMPILER}}
+
 # use the ld wrapper for nobtcfi
-CONFIGURE_ENV +=       LDFLAGS="--ld-path=${WRKDIR}/bin/ld"
+CONFIGURE_ENV +=       LDFLAGS="${LDFLAGS}"
 
 MAKE_ENV =             SHELL=/bin/sh \
                        SO_VERSION=${SO_VERSION}

Reply via email to