Created attachment 206135 [details] v1 Only require NASM on i386 and amd64 Strip -O2 when enabling OPTIMIZED_CFLAGS to avoid setting multiple -O FLAGS Compile and Run-time tested on: aarch64, Orange Pi PC2, 13.0-CURRENT armv7, Orange Pi PC, 13.0-CURRENT amd64, Dell T20 (Intel i7-3770), 13.0-CURRENT
(In reply to daniel.engberg.lists from comment #0) > Only require NASM on i386 and amd64 Not optimal. nasm is used on amd64 and i386 and GNU as elsewhere. Some architectures (e.g., sparc64, mips*, riscv*) don't need either. > Strip -O2 when enabling OPTIMIZED_CFLAGS to avoid setting multiple -O FLAGS Redundant. -O3 from OPTIMIZED_CFLAGS is passed *after* -O2 from /usr/share/mk/sys.mk.
Sorry I don't understand what you're trying to say, what do you mean by GNU as elsewhere? Unless I'm reading ffmpeg code wrong it's only required for x86asm so I don't see why we need to build it on other arches. https://github.com/FFmpeg/FFmpeg/blob/release/4.1/configure#L5742 Yes, -O2 it's purely a cosmetic/readability fix but as that considered bad pratice?
(In reply to daniel.engberg.lists from comment #2) > what do you mean by GNU as elsewhere? When building on aarch64 without devel/binutils: ===> Configuring for ffmpeg-4.2,1 GNU assembler not found, install/update gas-preprocessor which is under the following conditional in configure: if enabled_any arm aarch64 || enabled_all ppc altivec && enabled asm; then Do you see x86 there? > Yes, -O2 it's purely a cosmetic/readability fix > but as that considered bad pratice? Cosmetic changes unnecessarily complicate maintenance. .include <bsd.port.options.mk> is also unnecessary given -O2 comes from sys.mk, not bsd.port.mk. And ${CFLAGS:S/-O2//g} maybe better spelled as ${CFLAGS:N-O*}.
A commit references this bug: Author: jbeich Date: Mon Jul 29 19:24:32 UTC 2019 New revision: 507589 URL: https://svnweb.freebsd.org/changeset/ports/507589 Log: multimedia/ffmpeg: both nasm and as(1) are not used powerpcspe doesn't support AltiVec unlike powerpc or powerpc64. PR: 239509 Changes: head/multimedia/ffmpeg/Makefile
Ahh, now I see what you mean. Thanks