On Wed, 10 Feb 2021 00:55:49 +0100 Charlene Wendling <juliana...@posteo.jp> wrote:
> > util.o: In function `tvstddev': > > util.c:(.text+0x6f4): undefined reference to `sqrt' > > I thought it was a ld.bfd issue but... > > Very surprisingly, i tried to reproduce on amd64 with USE_LLD=No to no > avail, and the sparc64 bulk reports no failures. I can't compare with > mips64 because no bulk is run currently. ok gkoehler@ The compiler inlines the amd64 cpu instruction for sqrt, but one can reproduce the error on amd64 by, $ make COPTS=-fno-builtin-sqrt powerpc64 clang inlines the instruction "fsqrt", but macppc clang calls sqrt() and needs libm. This is because llvm believes that the G5 has "fsqrt" but G4 and G3 don't have "fsqrt"; and the default target cpu in powerpc64 clang seems to be the G5. --George > Index: Makefile > =================================================================== > RCS file: /cvs/ports/net/echoping/Makefile,v > retrieving revision 1.15 > diff -u -p -u -p -r1.15 Makefile > --- Makefile 1 Feb 2021 19:47:08 -0000 1.15 > +++ Makefile 9 Feb 2021 23:50:36 -0000 > @@ -5,7 +5,7 @@ COMMENT= test performance of remote TCP/ > VER= 6_0_2 > DISTNAME= echoping-RELEASE_${VER} > PKGNAME= echoping-${VER:S/_/./g} > -REVISION= 0 > +REVISION= 1 > CATEGORIES= net > > MASTER_SITES= > https://framagit.org/bortzmeyer/echoping/-/archive/RELEASE_${VER}/ > @@ -36,6 +36,10 @@ CONFIGURE_ARGS+= --enable-plugin="dns ra > --enable-smtp \ > --enable-tos \ > --without-libidn > + > +# Requires libm (uses sqrt(3)), detected by autoconf but not used anywhere > else > +# in the build configuration > +CONFIGURE_ENV+= LDFLAGS="${LDFLAGS} -lm" > > WRKDIST= ${WRKDIR}/${DISTNAME}/SRC > > Index: pkg/DESCR > =================================================================== > RCS file: /cvs/ports/net/echoping/pkg/DESCR,v > retrieving revision 1.3 > diff -u -p -u -p -r1.3 DESCR > --- pkg/DESCR 1 Feb 2021 18:10:44 -0000 1.3 > +++ pkg/DESCR 9 Feb 2021 23:50:36 -0000 > @@ -1,3 +1,3 @@ > -"echoping" is a small program to test (approximately) performance of a > +"echoping" is a small program to test (approximately) performance of a > remote host by sending it packets using various protocols (TCP/UDP echo, > HTTP/HTTPS and some others). > -- George Koehler <kern...@gmail.com>