Bug 240979 - multimedia/gstreamer1-libav: remove -mminimal-toc on powerpc64
Summary: multimedia/gstreamer1-libav: remove -mminimal-toc on 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: freebsd-multimedia (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-01 19:56 UTC by Piotr Kubaj
Modified: 2019-11-20 13:42 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (multimedia)


Attachments
patch (314 bytes, patch)
2019-10-01 19:56 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (multimedia)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2019-10-01 19:56:37 UTC
Created attachment 207992 [details]
patch

It's not needed anymore, the port builds.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2019-10-03 02:06:07 UTC
Can you check if FFMPEG=off builds? ports r479994 added the line when FFMPEG was not in OPTIONS_DEFAULT.
Otherwise, removing arch-specific quirks can be done under portmgr blanket.
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2019-10-03 10:14:46 UTC
It doesn't build with FFMPEG=off, but because of:
libavcodec/ppc/hevcdsp.c:60: error: argument 1 must be a 5-bit signed literal

I suppose USES=compiler:c11 would fix it, but there's already USES=compiler:features.

Since this is non-default option, I suppose we can just leave it as is.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2019-10-03 19:51:59 UTC
(In reply to Piotr Kubaj from comment #2)
> I suppose USES=compiler:c11 would fix it, but there's already
> USES=compiler:features.

Then replace USES=compiler:features with USES=compiler:c11 because:

# Mk/Uses/compiler.mk
.if ${_COMPILER_ARGS:Mc++*} || ${_COMPILER_ARGS:Mc11}
_COMPILER_ARGS+=	features
.endif

> Since this is non-default option, I suppose we can just leave it as is.

gstreamer1-libav is often non-trivial to unbreak during major ffmpeg updates (e.g., 3.* -> 4.0), so the option is used as an interim fix. If -mminimal-toc is still required convert to

# Place after _MAKE_ENV
FFMPEG_CFLAGS_OFF=	${"${ARCH:Mpowerpc64}":?-mminimal-toc:}
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2019-10-03 20:57:30 UTC
I can confirm that the port builds for me with the patch, but only tested with the default options.
Comment 5 Piotr Kubaj freebsd_committer freebsd_triage 2019-10-04 21:01:01 UTC
Doesn't build with GCC9 as well (FFMPEG=off):
/usr/local/bin/as -I. -I./ -isystem /usr/local/include -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DZLIB_CONST -fPIC -g  -c -o libavcodec/ppc/fft_altivec.o lib
avcodec/ppc/fft_altivec.S
/usr/local/bin/as: unrecognized option `-isystem'
Comment 6 commit-hook freebsd_committer freebsd_triage 2019-11-20 13:42:15 UTC
A commit references this bug:

Author: pkubaj
Date: Wed Nov 20 13:41:32 UTC 2019
New revision: 518010
URL: https://svnweb.freebsd.org/changeset/ports/518010

Log:
  multimedia/gstreamer1-libav: remove -mminimal-toc

  The port now builds fine on elfv1 without it and it breaks build on elfv2.

  PR:		240979
  Approved by:	linimon (mentor), multimedia (maintainer timeout)

Changes:
  head/multimedia/gstreamer1-libav/Makefile