Bug 229339 - audio/faad: Fix build on powerpc (and maybe powerpc64?)
Summary: audio/faad: Fix build on powerpc (and maybe powerpc64?)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Thomas Zander
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2018-06-26 07:54 UTC by Tobias Kortkamp
Modified: 2018-07-07 13:33 UTC (History)
3 users (show)

See Also:
riggs: maintainer-feedback+


Attachments
faad.diff (1.23 KB, patch)
2018-06-26 07:54 UTC, Tobias Kortkamp
tobik: maintainer-approval? (multimedia)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Kortkamp freebsd_committer freebsd_triage 2018-06-26 07:54:40 UTC
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.
Comment 1 Thomas Zander freebsd_committer freebsd_triage 2018-07-07 13:28:45 UTC
Tested on mips. There it works too. Well spotted!
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-07-07 13:30:53 UTC
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
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-07-07 13:31:56 UTC
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