package/sdl2: force arm mode instead of Thumb mode

Fix the following build failure in Thumb mode:

/home/autobuild/autobuild/instance-12/output-1/build/sdl2-2.28.5/src/atomic/SDL_atomic.c:292:2: error: #error This file should be built in arm mode so the mcr instruction is available for memory barriers
  292 | #error This file should be built in arm mode so the mcr instruction is available for memory barriers
      |  ^~~~~

Fixes:
 - http://autobuild.buildroot.org/results/70587e7c2452563d655d054a7623bb2fd969862e
 - http://autobuild.buildroot.org/results/2cb11b1f3c013c1f49e2b5383a11ba3f1db6a24c

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Fabrice Fontaine 2024-01-31 21:37:39 +01:00 committed by Peter Korsgaard
parent 854ea58174
commit ecedc4ae8c

View File

@ -54,6 +54,10 @@ SDL2_POST_INSTALL_STAGING_HOOKS += SDL2_FIX_SDL2_CONFIG_CMAKE
# We must enable static build to get compilation successful.
SDL2_CONF_OPTS += --enable-static
ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
SDL2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -marm"
endif
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
SDL2_DEPENDENCIES += udev
SDL2_CONF_OPTS += --enable-libudev
@ -76,7 +80,7 @@ endif
ifeq ($(BR2_PACKAGE_SDL2_DIRECTFB),y)
SDL2_DEPENDENCIES += directfb
SDL2_CONF_OPTS += --enable-video-directfb
SDL2_CONF_ENV = ac_cv_path_DIRECTFBCONFIG=$(STAGING_DIR)/usr/bin/directfb-config
SDL2_CONF_ENV += ac_cv_path_DIRECTFBCONFIG=$(STAGING_DIR)/usr/bin/directfb-config
else
SDL2_CONF_OPTS += --disable-video-directfb
endif