pkgsrc/multimedia/mplayer-share/Makefile.cflags
tsutsui c2c1348491 mencoder, mplayer, gmplayer: avoid text relocations on NetBSD/i386 8.0.
* specify --disable-sse4 to avoid non-PIE asm ops in libmpcodecs/vf_ass.c
  that cause text relocations on NetBSD/i386
* explicitly pull pkgsrc/multimedia/libass to avoid internal libass
  (which seems usually enabled by configure's autodetect)
* specify -fpic in configure for NetBSD/i386 to enable __PIC__ blocks
  in some sources
* while here, use -mtune rather than -mcpu for not only gcc4 but
  also 5.x and later

Bump PKGREVISIONs.  Ok'ed by wiz@ in PR pkg/53319.
2018-05-27 15:27:13 +00:00

24 lines
903 B
Text

# $NetBSD: Makefile.cflags,v 1.9 2018/05/27 15:27:13 tsutsui Exp $
# This must be included after everything else to truly clear ${CFLAGS}
# in the non-runtime-cpu-detection case. If ${CFLAGS} is non-empty, the
# configure script refuses to add any optimizations at all.
.if !empty(PKG_OPTIONS:Mmplayer-default-cflags)
. if ${MACHINE_ARCH} == "i386" && !empty(PKGSRC_COMPILER:Mgcc)
# Schedule for the typical machine fast enough to run mplayer. This
# is nearly optimal for K6-2 as well. Anything slower will still run
# (but would probably benefit greatly from turning off the run-time
# cpu detection).
. include "../../mk/compiler.mk"
. if !empty(CC_VERSION:Mgcc-[4567]*)
CFLAGS+= -O3 -ffast-math -fomit-frame-pointer -mtune=pentiumpro
. else
CFLAGS+= -O3 -ffast-math -fomit-frame-pointer -mcpu=pentiumpro
. endif
. else
CFLAGS+= -O3 -ffast-math -fomit-frame-pointer
. endif
.endif