Re: git: 5fd1759d2a4e - main - multimedia/svt-av1: disable LTO on riscv64

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Mon, 25 Oct 2021 12:26:50 UTC
Piotr Kubaj <pkubaj@FreeBSD.org> writes:

> The branch main has been updated by pkubaj:
>
> URL: https://cgit.FreeBSD.org/ports/commit/?id=5fd1759d2a4e031d77db7504c718eb7c8d69de4c
>
> commit 5fd1759d2a4e031d77db7504c718eb7c8d69de4c
> Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
> AuthorDate: 2021-10-25 09:44:59 +0000
> Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
> CommitDate: 2021-10-25 09:44:59 +0000
>
>     multimedia/svt-av1: disable LTO on riscv64
>     
>     Untested, but probably fixes build:
>     ld: error: lto.tmp: cannot link object files with different floating-point ABI

Likely a bug in base system. Either -mabi=* should be added to LDFLAGS
similar to mips* or base Clang should stop defaulting to soft-float ABI
on a hard-float target.

share/mk/bsd.cpu.mk:

  .if ${MACHINE_CPUARCH} == "riscv"
  .if ${MACHINE_ARCH:Mriscv*sf}
  CFLAGS += -march=rv64imac -mabi=lp64
  .else
  CFLAGS += -march=rv64imafdc -mabi=lp64d
  .endif
  .endif

http://www.ipv6proxy.net/go.php?u=http://beefy7.nyi.freebsd.org/data/130releng-riscv64-quarterly/028d5f4c5419/logs/errors/svt-av1-0.8.7_1.log