Created attachment 194643 [details] faad.diff Building faad on powerpc fails with Making all in frontend gmake[3]: Entering directory '/construction/usr/ports/audio/faad/work/faad2-2.8.8/frontend' /bin/sh ../libtool --tag=CC --mode=link cc -O2 -pipe -fno-strict-aliasing -lpthread -L/usr/local/lib -o faad mp4read.o audio.o main.o unicode_support.o ../libfaad/libfaad.la libtool: link: cc -O2 -pipe -fno-strict-aliasing -o .libs/faad mp4read.o audio.o main.o unicode_support.o -L/usr/local/lib ../libfaad/.libs/libfaad.so -lpthread -lm -Wl,-rpath -Wl,/usr/local/lib mp4read.o: In function `u16in': mp4read.c:(.text+0x674): undefined reference to `__builtin_bswap16' frontend/mp4read.c doesn't include config.h so WORDS_BIGENDIAN is not defined and bswap16() breaks. I'm attaching a fix. The error message on powerpc64 seems to be the same, so I'm cautiously optimistic that this might fix the build on powerpc64 too. But I have no way to test.
Tested on mips. There it works too. Well spotted!
A commit references this bug: Author: riggs Date: Sat Jul 7 13:30:08 UTC 2018 New revision: 474080 URL: https://svnweb.freebsd.org/changeset/ports/474080 Log: Fix build on several architectures (ensure __builtin_bswap16 is available) PR: 229339 Submitted by: tobik MFH: 2018Q3 Changes: head/audio/faad/Makefile head/audio/faad/files/patch-frontend_mp4read.c
A commit references this bug: Author: riggs Date: Sat Jul 7 13:31:27 UTC 2018 New revision: 474081 URL: https://svnweb.freebsd.org/changeset/ports/474081 Log: MFH: r474080 Fix build on several architectures (ensure __builtin_bswap16 is available) PR: 229339 Submitted by: tobik Approved by: ports-secteam (riggs) Changes: _U branches/2018Q3/ branches/2018Q3/audio/faad/Makefile branches/2018Q3/audio/faad/files/patch-frontend_mp4read.c