kumquat-buildroot/package/bayer2rgb-neon/bayer2rgb-neon.mk
Fabrice Fontaine 13f8df8ed6 package/bayer2rgb-neon: fix aarch64 build with BR2_OPTIMIZE_0
Fix the following build failure with aarch64 and BR2_OPTIMIZE_0 raised
since commit 0512910e49:

src/convert-neon-body-bayer8.inc.h: In function 'bayer2rgb_convert_neon':
src/convert-neon.c:233:17: error: third argument to '__builtin_prefetch' must be a constant
  233 |                 __builtin_prefetch(((void const *)(_addr)) + 64, 0, (_lvl)); \
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/convert-neon-body-bayer8.inc.h:8:9: note: in expansion of macro 'do_prefetch'
    8 |         do_prefetch(&in[+1*stride - 1], (rows_per_loop) < 3 ? 3 : 0);
      |         ^~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/307c1c448becd99dfba3a17b3ef816db0bb5cad6

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-07 17:24:34 +01:00

33 lines
1.0 KiB
Makefile

################################################################################
#
# bayer2rgb-neon
#
################################################################################
BAYER2RGB_NEON_VERSION = 15feb1115b4828488cc36d09f625e23e8b6a0ec5
BAYER2RGB_NEON_SITE = https://gitlab-ext.sigma-chemnitz.de/ensc/bayer2rgb.git
BAYER2RGB_NEON_SITE_METHOD = git
BAYER2RGB_NEON_LICENSE = GPL-3.0
BAYER2RGB_NEON_LICENSE_FILES = COPYING
BAYER2RGB_NEON_INSTALL_STAGING = YES
BAYER2RGB_NEON_DEPENDENCIES = host-pkgconf host-gengetopt
BAYER2RGB_NEON_AUTORECONF = YES
BAYER2RGB_NEON_CFLAGS = $(TARGET_CFLAGS)
ifeq ($(BR2_arm),y)
BAYER2RGB_NEON_CFLAGS += -mfpu=neon
endif
# __builtin_prefetch() third argument must be a constant, but
# bayer2rgb-neon uses a variable, derived from a constant, so some
# optimization is needed to allow the compiler to turn it into a
# constant, otherwise the build fails
ifeq ($(BR2_OPTIMIZE_0),y)
BAYER2RGB_NEON_CFLAGS += -O1
endif
BAYER2RGB_NEON_CONF_ENV = CFLAGS="$(BAYER2RGB_NEON_CFLAGS)"
$(eval $(autotools-package))