> Currently the only ports using USE_LLD=ports are lang/gcc/8 and
> lang/gcc/11, and only on i386.
> 
> After trying many things, I think the diff below is probably the only
> way to fix it (short of fixing the issues that require using llvm 13's
> ld.lld for gcc).

Not really a fix, but as mentioned last night on icb, jca has an ld.bfd
diff that would allow switching lang/gcc/8 to USE_LLD=No. The resulting
gfortran and numpy seem as good as with llvm-13, the numpy 1.25.2 tests
look exactly the same as yours. I didn't try building boost or gcc/11.

I think the issue is that ld.lld from llvm 16 tries to create pie
binaries, but none of the usual flags help. Passing -no-pie links the
tablegen things, but they then immediately segfault.

> I haven't put this through a bulk, but I _have_ done a bulk with the
> IGNORE line commented-out (and not touching the !exists line) which
> I think is an equivalent test, and of course boost and friends are
> now getting built.
> 
> Does anyone have comments/objections or would like to OK?

It makes sense to me. I agree that your test is good enough and this
seems much better than leaving i386 crippled this way.

ok tb

> 
> Index: bsd.port.mk
> ===================================================================
> RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
> diff -u -p -r1.1636 bsd.port.mk
> --- bsd.port.mk       11 Nov 2023 11:53:38 -0000      1.1636
> +++ bsd.port.mk       8 Jan 2024 22:12:34 -0000
> @@ -821,7 +821,7 @@ _NONDEFAULT_LD = Yes
>  .endif
>  _NONDEFAULT_LD ?= No
>  .if ${_NONDEFAULT_LD:L} == "yes"
> -.  if !exists(${_LD_PROGRAM})
> +.  if !exists(${_LD_PROGRAM}) && ${USE_LLD:L} != "ports"
>  IGNORE = "requires ${_LD_PROGRAM}"
>  .  endif
>  .endif
> 

Reply via email to