[Buildroot] [git commit branch/2022.11.x] package/rtl8192eu: fix build failure on Big Endian architectures

From: Peter Korsgaard <peter@korsgaard.com>
Date: 2022-12-21 18:08:44
Subsystem: the rest · Maintainer: Linus Torvalds

commit: https://git.buildroot.net/buildroot/commit/?id=d878588b532014da392c19030dd03cb804ce8739
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2022.11.x

Let's disable the CONFIG_PLATFORM_I386_PC that is set to y by default
involving the endianness to be set to little. This way we can set the
CFLAGS according to architecture with some default define like:
-DCONFIG_IOCTL_CFG80211
-DRTW_USE_CFG80211_STA_EVENT
-Wno-error

Suggested-by: Arnout Vandecappelle <redacted>
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 447abe169af7e69a82a3e0218670006a42914053)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/rtl8192eu/rtl8192eu.mk | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/package/rtl8192eu/rtl8192eu.mk b/package/rtl8192eu/rtl8192eu.mk
index 0e8ffea5cb..c3bf31a996 100644
--- a/package/rtl8192eu/rtl8192eu.mk
+++ b/package/rtl8192eu/rtl8192eu.mk
@@ -7,9 +7,16 @@
 RTL8192EU_VERSION = 1e15b6d451731bc4d3ffd587194dc4bd0f286ac0
 RTL8192EU_SITE = $(call github,clnhub,rtl8192eu-linux,$(RTL8192EU_VERSION))
 RTL8192EU_LICENSE = GPL-2.0
+
+RTL8192EU_USER_EXTRA_CFLAGS = -DCONFIG_$(call qstrip,$(BR2_ENDIAN))_ENDIAN \
+			      -DCONFIG_IOCTL_CFG80211 \
+			      -DRTW_USE_CFG80211_STA_EVENT \
+			      -Wno-error
+
 RTL8192EU_MODULE_MAKE_OPTS = \
+	CONFIG_PLATFORM_I386_PC=n \
 	CONFIG_RTL8192EU=m \
-	USER_EXTRA_CFLAGS="-Wno-error"
+	USER_EXTRA_CFLAGS="$(RTL8192EU_USER_EXTRA_CFLAGS)"
 
 define RTL8192EU_LINUX_CONFIG_FIXUPS
 	$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help