buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/rtl8189fs: fix build with big endian
@ 2023-07-16 21:28 Giulio Benetti
  2023-07-18  9:20 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 6+ messages in thread
From: Giulio Benetti @ 2023-07-16 21:28 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Sergey Matyukevich

Add local patch to allow to override CFLAGS and undefine
CONFIG_LITTLE_ENDIAN by default and use the correct endianness according
to target architecture.

Upstream: https://github.com/jwrdegoede/rtl8189ES_linux/pull/101

Fixes:
http://autobuild.buildroot.net/results/fe67db3884573ef750eda9d0dccd5f97b3ae698e

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 ...TRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch | 39 +++++++++++++++++++
 package/rtl8189fs/rtl8189fs.mk                |  6 ++-
 2 files changed, 44 insertions(+), 1 deletion(-)
 create mode 100644 package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch

diff --git a/package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch b/package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch
new file mode 100644
index 0000000000..93ce8ee33e
--- /dev/null
+++ b/package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch
@@ -0,0 +1,39 @@
+From f48d99fab8b79e573850067a3ff2d8c16aa95ce1 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Wed, 28 Sep 2022 21:17:17 +0200
+Subject: [PATCH] Makefile: move 'EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)' at the
+ end of EXTRA_FLAGS assignment
+
+At the moment USER_EXTRA_CFLAGS can't override local Makfile EXTRA_CFLAGS
+since it's assigned at the beginning of the Makefile. For example it's not
+possible to undefine the hardcoded CONFIG_LITTLE_ENDIAN and this doesn't
+allow to build these modules for big endian architectures. So let's move
+the assignment of USER_EXTRA_CFLAGS to EXTRA_CFLAGS after the last
+EXTRA_CFLAGS assignment.
+
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index dfca305..6f91d0a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,3 @@
+-EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
+ EXTRA_CFLAGS += -O1
+ #EXTRA_CFLAGS += -O3
+ #EXTRA_CFLAGS += -Wall
+@@ -2208,6 +2207,8 @@ ifneq ($(USER_MODULE_NAME),)
+ MODULE_NAME := $(USER_MODULE_NAME)
+ endif
+ 
++EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
++
+ ifneq ($(KERNELRELEASE),)
+ 
+ ########### this part for *.mk ############################
+-- 
+2.34.1
+
diff --git a/package/rtl8189fs/rtl8189fs.mk b/package/rtl8189fs/rtl8189fs.mk
index c3eef6e071..359cee3e67 100644
--- a/package/rtl8189fs/rtl8189fs.mk
+++ b/package/rtl8189fs/rtl8189fs.mk
@@ -8,10 +8,14 @@ RTL8189FS_VERSION = 75a566a830037c7d1309c5a9fe411562772a1cf2
 RTL8189FS_SITE = $(call github,jwrdegoede,rtl8189ES_linux,$(RTL8189FS_VERSION))
 RTL8189FS_LICENSE = GPL-2.0
 
+RTL8189FS_USER_EXTRA_CFLAGS = -UCONFIG_LITTLE_ENDIAN \
+			      -DCONFIG_$(call qstrip,$(BR2_ENDIAN))_ENDIAN
+
 RTL8189FS_MODULE_MAKE_OPTS = \
 	CONFIG_RTL8189FS=m \
 	KVER=$(LINUX_VERSION_PROBED) \
-	KSRC=$(LINUX_DIR)
+	KSRC=$(LINUX_DIR) \
+	USER_EXTRA_CFLAGS="$(RTL8189FS_USER_EXTRA_CFLAGS)"
 
 ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),)
 RTL8189FS_MODULE_MAKE_OPTS += CONFIG_RTW_DEBUG=n
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH] package/rtl8189fs: fix build with big endian
  2023-07-16 21:28 [Buildroot] [PATCH] package/rtl8189fs: fix build with big endian Giulio Benetti
@ 2023-07-18  9:20 ` Thomas Petazzoni via buildroot
  2023-07-18  9:36   ` [Buildroot] [PATCH v2] " Giulio Benetti
  2023-07-18  9:38   ` [Buildroot] [PATCH] " Giulio Benetti
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-18  9:20 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Sergey Matyukevich, buildroot

On Sun, 16 Jul 2023 23:28:56 +0200
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> Add local patch to allow to override CFLAGS and undefine
> CONFIG_LITTLE_ENDIAN by default and use the correct endianness according
> to target architecture.
> 
> Upstream: https://github.com/jwrdegoede/rtl8189ES_linux/pull/101

This Upstream tag...

> diff --git a/package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch b/package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch
> new file mode 100644
> index 0000000000..93ce8ee33e
> --- /dev/null
> +++ b/package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch
> @@ -0,0 +1,39 @@
> +From f48d99fab8b79e573850067a3ff2d8c16aa95ce1 Mon Sep 17 00:00:00 2001
> +From: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +Date: Wed, 28 Sep 2022 21:17:17 +0200
> +Subject: [PATCH] Makefile: move 'EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)' at the
> + end of EXTRA_FLAGS assignment
> +
> +At the moment USER_EXTRA_CFLAGS can't override local Makfile EXTRA_CFLAGS
> +since it's assigned at the beginning of the Makefile. For example it's not
> +possible to undefine the hardcoded CONFIG_LITTLE_ENDIAN and this doesn't
> +allow to build these modules for big endian architectures. So let's move
> +the assignment of USER_EXTRA_CFLAGS to EXTRA_CFLAGS after the last
> +EXTRA_CFLAGS assignment.
> +

... needs to be here. Otherwise, "make check-package" will complain.

> +Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +---

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2] package/rtl8189fs: fix build with big endian
  2023-07-18  9:20 ` Thomas Petazzoni via buildroot
@ 2023-07-18  9:36   ` Giulio Benetti
  2023-08-24 21:41     ` Thomas Petazzoni via buildroot
  2023-09-13 16:06     ` Peter Korsgaard
  2023-07-18  9:38   ` [Buildroot] [PATCH] " Giulio Benetti
  1 sibling, 2 replies; 6+ messages in thread
From: Giulio Benetti @ 2023-07-18  9:36 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Sergey Matyukevich

Add local patch to allow to override CFLAGS and undefine
CONFIG_LITTLE_ENDIAN by default and use the correct endianness according
to target architecture.

Fixes:
http://autobuild.buildroot.net/results/fe67db3884573ef750eda9d0dccd5f97b3ae698e

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 ...TRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch | 41 +++++++++++++++++++
 package/rtl8189fs/rtl8189fs.mk                |  6 ++-
 2 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch

diff --git a/package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch b/package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch
new file mode 100644
index 0000000000..f9e2d6845d
--- /dev/null
+++ b/package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch
@@ -0,0 +1,41 @@
+From f48d99fab8b79e573850067a3ff2d8c16aa95ce1 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Wed, 28 Sep 2022 21:17:17 +0200
+Subject: [PATCH] Makefile: move 'EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)' at the
+ end of EXTRA_FLAGS assignment
+
+At the moment USER_EXTRA_CFLAGS can't override local Makfile EXTRA_CFLAGS
+since it's assigned at the beginning of the Makefile. For example it's not
+possible to undefine the hardcoded CONFIG_LITTLE_ENDIAN and this doesn't
+allow to build these modules for big endian architectures. So let's move
+the assignment of USER_EXTRA_CFLAGS to EXTRA_CFLAGS after the last
+EXTRA_CFLAGS assignment.
+
+Upstream: https://github.com/jwrdegoede/rtl8189ES_linux/pull/101
+
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index dfca305..6f91d0a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,3 @@
+-EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
+ EXTRA_CFLAGS += -O1
+ #EXTRA_CFLAGS += -O3
+ #EXTRA_CFLAGS += -Wall
+@@ -2208,6 +2207,8 @@ ifneq ($(USER_MODULE_NAME),)
+ MODULE_NAME := $(USER_MODULE_NAME)
+ endif
+ 
++EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
++
+ ifneq ($(KERNELRELEASE),)
+ 
+ ########### this part for *.mk ############################
+-- 
+2.34.1
+
diff --git a/package/rtl8189fs/rtl8189fs.mk b/package/rtl8189fs/rtl8189fs.mk
index c3eef6e071..359cee3e67 100644
--- a/package/rtl8189fs/rtl8189fs.mk
+++ b/package/rtl8189fs/rtl8189fs.mk
@@ -8,10 +8,14 @@ RTL8189FS_VERSION = 75a566a830037c7d1309c5a9fe411562772a1cf2
 RTL8189FS_SITE = $(call github,jwrdegoede,rtl8189ES_linux,$(RTL8189FS_VERSION))
 RTL8189FS_LICENSE = GPL-2.0
 
+RTL8189FS_USER_EXTRA_CFLAGS = -UCONFIG_LITTLE_ENDIAN \
+			      -DCONFIG_$(call qstrip,$(BR2_ENDIAN))_ENDIAN
+
 RTL8189FS_MODULE_MAKE_OPTS = \
 	CONFIG_RTL8189FS=m \
 	KVER=$(LINUX_VERSION_PROBED) \
-	KSRC=$(LINUX_DIR)
+	KSRC=$(LINUX_DIR) \
+	USER_EXTRA_CFLAGS="$(RTL8189FS_USER_EXTRA_CFLAGS)"
 
 ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),)
 RTL8189FS_MODULE_MAKE_OPTS += CONFIG_RTW_DEBUG=n
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH] package/rtl8189fs: fix build with big endian
  2023-07-18  9:20 ` Thomas Petazzoni via buildroot
  2023-07-18  9:36   ` [Buildroot] [PATCH v2] " Giulio Benetti
@ 2023-07-18  9:38   ` Giulio Benetti
  1 sibling, 0 replies; 6+ messages in thread
From: Giulio Benetti @ 2023-07-18  9:38 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Sergey Matyukevich, buildroot

On 18/07/23 11:20, Thomas Petazzoni via buildroot wrote:
> On Sun, 16 Jul 2023 23:28:56 +0200
> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> 
>> Add local patch to allow to override CFLAGS and undefine
>> CONFIG_LITTLE_ENDIAN by default and use the correct endianness according
>> to target architecture.
>>
>> Upstream: https://github.com/jwrdegoede/rtl8189ES_linux/pull/101
> 
> This Upstream tag...
> 
>> diff --git a/package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch b/package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch
>> new file mode 100644
>> index 0000000000..93ce8ee33e
>> --- /dev/null
>> +++ b/package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch
>> @@ -0,0 +1,39 @@
>> +From f48d99fab8b79e573850067a3ff2d8c16aa95ce1 Mon Sep 17 00:00:00 2001
>> +From: Giulio Benetti <giulio.benetti@benettiengineering.com>
>> +Date: Wed, 28 Sep 2022 21:17:17 +0200
>> +Subject: [PATCH] Makefile: move 'EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)' at the
>> + end of EXTRA_FLAGS assignment
>> +
>> +At the moment USER_EXTRA_CFLAGS can't override local Makfile EXTRA_CFLAGS
>> +since it's assigned at the beginning of the Makefile. For example it's not
>> +possible to undefine the hardcoded CONFIG_LITTLE_ENDIAN and this doesn't
>> +allow to build these modules for big endian architectures. So let's move
>> +the assignment of USER_EXTRA_CFLAGS to EXTRA_CFLAGS after the last
>> +EXTRA_CFLAGS assignment.
>> +
> 
> ... needs to be here. Otherwise, "make check-package" will complain.

Oops, sorry. Just sent v2 for this

Thank you
Best regards
-- 
Giulio Benetti
CEO&CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH v2] package/rtl8189fs: fix build with big endian
  2023-07-18  9:36   ` [Buildroot] [PATCH v2] " Giulio Benetti
@ 2023-08-24 21:41     ` Thomas Petazzoni via buildroot
  2023-09-13 16:06     ` Peter Korsgaard
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-08-24 21:41 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Sergey Matyukevich, buildroot

On Tue, 18 Jul 2023 11:36:16 +0200
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> Add local patch to allow to override CFLAGS and undefine
> CONFIG_LITTLE_ENDIAN by default and use the correct endianness according
> to target architecture.
> 
> Fixes:
> http://autobuild.buildroot.net/results/fe67db3884573ef750eda9d0dccd5f97b3ae698e
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  ...TRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch | 41 +++++++++++++++++++
>  package/rtl8189fs/rtl8189fs.mk                |  6 ++-
>  2 files changed, 46 insertions(+), 1 deletion(-)
>  create mode 100644 package/rtl8189fs/0001-Makefile-move-EXTRA_CFLAGS-USER_EXTRA_CFLAGS-at-the-.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH v2] package/rtl8189fs: fix build with big endian
  2023-07-18  9:36   ` [Buildroot] [PATCH v2] " Giulio Benetti
  2023-08-24 21:41     ` Thomas Petazzoni via buildroot
@ 2023-09-13 16:06     ` Peter Korsgaard
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2023-09-13 16:06 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Sergey Matyukevich, buildroot

>>>>> "Giulio" == Giulio Benetti <giulio.benetti@benettiengineering.com> writes:

 > Add local patch to allow to override CFLAGS and undefine
 > CONFIG_LITTLE_ENDIAN by default and use the correct endianness according
 > to target architecture.

 > Fixes:
 > http://autobuild.buildroot.net/results/fe67db3884573ef750eda9d0dccd5f97b3ae698e

 > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Committed to 2023.02.x and 2023.05.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-13 16:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-16 21:28 [Buildroot] [PATCH] package/rtl8189fs: fix build with big endian Giulio Benetti
2023-07-18  9:20 ` Thomas Petazzoni via buildroot
2023-07-18  9:36   ` [Buildroot] [PATCH v2] " Giulio Benetti
2023-08-24 21:41     ` Thomas Petazzoni via buildroot
2023-09-13 16:06     ` Peter Korsgaard
2023-07-18  9:38   ` [Buildroot] [PATCH] " Giulio Benetti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).