Skip to content

Commit

Permalink
Merge pull request LibreELEC#4943 from jernejsk/rtl
Browse files Browse the repository at this point in the history
RTL8812AU: Fix build for 32-bit ARM SoCs
  • Loading branch information
chewitt committed Jan 13, 2021
2 parents 38dde59 + d81b9a5 commit 90845c4
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
From a6daa2907399a2df2c3c1b576fe6256805766c71 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@siol.net>
Date: Tue, 12 Jan 2021 22:16:43 +0100
Subject: [PATCH] Revert "issue #768: don't apply ARM options to ARM64"

This reverts commit 3325543154cd8900490385eb6326f5e7911c6e7d.

Commit 3325543154cd ("issue #768: don't apply ARM options to ARM64")
breaks compilation of driver on 32-bit ARM platforms. Issue is that each
and every 32-bit ARM kernel was always compiled with soft-fp ABI, not
just that for RPi. Commit author probably thinks on userspace which is
entirely different thing. Furthermore, same issue is very likely present
also on 32-bit x86 platforms. There too is soft float flag already part
of compile flags and can't be overriden with custom ones.

One last thing - these flags are useful only when
CONFIG_MP_VHT_HW_TX_MODE is set to y. This is probably never used.
---
Makefile | 26 ++++++++++----------------
1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/Makefile b/Makefile
index 7ba03bb7e9f8..a23673bc3b42 100755
--- a/Makefile
+++ b/Makefile
@@ -1118,6 +1118,16 @@ endif

ifeq ($(CONFIG_MP_VHT_HW_TX_MODE), y)
EXTRA_CFLAGS += -DCONFIG_MP_VHT_HW_TX_MODE
+ifeq ($(CONFIG_PLATFORM_I386_PC), y)
+## For I386 X86 ToolChain use Hardware FLOATING
+EXTRA_CFLAGS += -mhard-float
+EXTRA_CFLAGS += -DMARK_KERNEL_PFU
+else
+## For ARM ToolChain use Hardware FLOATING
+# Raspbian kernel is with soft-float.
+# 'softfp' allows FP instructions, but no FP on function call interfaces
+EXTRA_CFLAGS += -mfloat-abi=softfp
+endif
endif

ifeq ($(CONFIG_APPEND_VENDOR_IE_ENABLE), y)
@@ -2124,22 +2134,6 @@ endif

endif

-ifeq ($(ARCH), i386)
-EXTRA_CFLAGS += -mhard-float
-EXTRA_CFLAGS += -DMARK_KERNEL_PFU
-else ifeq ($(ARCH), x86_64)
-EXTRA_CFLAGS += -mhard-float
-EXTRA_CFLAGS += -DMARK_KERNEL_PFU
-else ifeq ($(ARCH), arm)
-# Raspbian kernel is with soft-float.
-# 'softfp' allows FP instructions, but no FP on function call interfaces
-ifeq ($(CONFIG_PLATFORM_ARM_RPI), y)
-EXTRA_CFLAGS += -mfloat-abi=softfp
-else
-EXTRA_CFLAGS += -mfloat-abi=hard
-endif
-endif
-
########### CUSTOMER ################################
ifeq ($(CONFIG_CUSTOMER_HUAWEI_GENERAL), y)
CONFIG_CUSTOMER_HUAWEI = y
--
2.30.0

This file was deleted.

0 comments on commit 90845c4

Please sign in to comment.