kumquat-buildroot/package/opus/opus.mk
Peter Korsgaard 43e859d47a package/opus: fix build with BR2_OPTIMIZE_FAST
Fixes:
http://autobuild.buildroot.net/results/194/1941e194e1f5ad0bc4982ad39c3e34d266bc49c6/

opus requires that it is configured with --enable-float-approx when
-ffast-math (BR2_OPTIMIZE_FAST) is used, otherwise it errors out at build
time:

celt/arch.h:198:2: error: #error Cannot build libopus with -ffast-math
unless FLOAT_APPROX is defined.  This could result in crashes on extreme
(e.g.  NaN) input

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-04-05 19:12:30 +02:00

37 lines
933 B
Makefile

################################################################################
#
# opus
#
################################################################################
OPUS_VERSION = 1.3.1
OPUS_SITE = https://downloads.xiph.org/releases/opus
OPUS_LICENSE = BSD-3-Clause
OPUS_LICENSE_FILES = COPYING
OPUS_INSTALL_STAGING = YES
OPUS_CFLAGS = $(TARGET_CFLAGS)
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
OPUS_CFLAGS += -O0
endif
OPUS_CONF_ENV = CFLAGS="$(OPUS_CFLAGS)"
OPUS_CONF_OPTS = --enable-custom-modes
ifeq ($(BR2_PACKAGE_OPUS_FIXED_POINT),y)
OPUS_CONF_OPTS += --enable-fixed-point
endif
ifeq ($(BR2_OPTIMIZE_FAST),y)
OPUS_CONF_OPTS += --enable-float-approx
endif
# When we're on ARM, but we don't have ARM instructions (only
# Thumb-2), disable the usage of assembly as it is not Thumb-ready.
ifeq ($(BR2_arm)$(BR2_armeb):$(BR2_ARM_CPU_HAS_ARM),y:)
OPUS_CONF_OPTS += --disable-asm
endif
$(eval $(autotools-package))