csu: test: explicitly add libm as build parameter

CSU tests build fails with '/usr/lib/libgcc_s.so: undefined reference to
fma' when built with LLVM 14 for powerpcspe, so '-lm' is being added
explicitly.

It may be linked to https://reviews.llvm.org/D77558

Reviewed by:	imp (earlier version)
MFC after:	2 days
Sponsored by:	Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D35691
This commit is contained in:
Alfredo Dal'Ava Junior 2022-07-01 12:13:04 -03:00
parent 0b09867f67
commit 4f5890a0fb
2 changed files with 16 additions and 0 deletions

View File

@ -2,6 +2,11 @@
.PATH: ${.CURDIR:H}
.if exists(./Makefile.${MACHINE_ARCH})
.include "./Makefile.${MACHINE_ARCH}"
.endif
.include <src.opts.mk>
MK_PIE= no

View File

@ -0,0 +1,11 @@
# $FreeBSD$
# TODO: investigate and try a better fix on compiler side
#
# CSU tests build fails with '/usr/lib/libgcc_s.so: undefined reference to fma'
# when built with LLVM 14, so '-lm' is being added explicitly here. Only
# the powerpcspe target is affected and it may be linked to
# https://reviews.llvm.org/D77558
LDFLAGS+= -lm