Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] arch: remove support for BR2_ARC_PAGE_SIZE_4K
@ 2022-07-17 20:04 Thomas Petazzoni via buildroot
  2022-07-17 21:13 ` [Buildroot] [arc-buildroot] " Alexey Brodkin via buildroot
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-07-17 20:04 UTC (permalink / raw)
  To: buildroot; +Cc: ARC Maintainers, Thomas Petazzoni

BR2_ARC_PAGE_SIZE_4K=y is broken with both glibc and uClibc. The link
of the C library fails with:

ld: common page size (0x2000) > maximum page size (0x1000)

This is due to BR2_ARC_PAGE_SIZE_4K=y settings
-Wl,-z,max-page-size=4096, but binutils apparently defaulting to
common-page-size=8192.

While this could potentially be fixed by passing
-Wl,-z,common-page-size=4096, these failures indicates that nobody has
tested 4KB page sizes on ARC in the context of Buildroot, so it is
more sensible to drop support for this feature. Should anybody need
this, and have the ability to ensure that it works, we would certainly
be able to re-introduce the feature.

Fixes:

  http://autobuild.buildroot.net/results/c8b2f331c98453670cd982558144c4fd84674a3d/ (uclibc)
  http://autobuild.buildroot.net/results/3a22f7aac38145b26c549254b819f87329e7a77e/ (glibc)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 Config.in.legacy   | 7 +++++++
 arch/Config.in.arc | 5 -----
 arch/arch.mk.arc   | 4 +---
 linux/linux.mk     | 4 ----
 4 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index 956da10a9f..1590a9fa25 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -146,6 +146,13 @@ endif
 
 comment "Legacy options removed in 2022.08"
 
+config BR2_ARC_PAGE_SIZE_4K
+	bool "Support for 4KB pages on ARC removed"
+	select BR2_LEGACY
+	help
+	  The support to use 4KB pages on the ARC architecture has
+	  been removed, as it was broken with both glibc and uClibc.
+
 config BR2_PACKAGE_PHP_EXT_WDDX
 	bool "php wddx removed"
 	select BR2_LEGACY
diff --git a/arch/Config.in.arc b/arch/Config.in.arc
index 388d3496bc..58103ad171 100644
--- a/arch/Config.in.arc
+++ b/arch/Config.in.arc
@@ -103,10 +103,6 @@ choice
 	  size matching the hardware configuration. Otherwise
 	  user-space applications will fail at runtime.
 
-config BR2_ARC_PAGE_SIZE_4K
-	bool "4KB"
-	depends on !BR2_arc750d
-
 config BR2_ARC_PAGE_SIZE_8K
 	bool "8KB"
 	help
@@ -121,7 +117,6 @@ endchoice
 
 config BR2_ARC_PAGE_SIZE
 	string
-	default "4K" if BR2_ARC_PAGE_SIZE_4K
 	default "8K" if BR2_ARC_PAGE_SIZE_8K
 	default "16K" if BR2_ARC_PAGE_SIZE_16K
 
diff --git a/arch/arch.mk.arc b/arch/arch.mk.arc
index 32b818b0e0..697c0ff524 100644
--- a/arch/arch.mk.arc
+++ b/arch/arch.mk.arc
@@ -6,9 +6,7 @@ ARCH_TOOLCHAIN_WRAPPER_OPTS = -matomic
 endif
 
 # Explicitly set LD's "max-page-size" instead of relying on some defaults
-ifeq ($(BR2_ARC_PAGE_SIZE_4K),y)
-ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=4096
-else ifeq ($(BR2_ARC_PAGE_SIZE_8K),y)
+ifeq ($(BR2_ARC_PAGE_SIZE_8K),y)
 ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=8192
 else ifeq ($(BR2_ARC_PAGE_SIZE_16K),y)
 ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=16384
diff --git a/linux/linux.mk b/linux/linux.mk
index 322ccabbd9..f012689a9e 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -362,10 +362,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI))
 	$(if $(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_PPC_DISABLE_WERROR))
-	$(if $(BR2_ARC_PAGE_SIZE_4K),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K)
-		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K)
-		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_16K))
 	$(if $(BR2_ARC_PAGE_SIZE_8K),
 		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K)
-- 
2.36.1

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

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

end of thread, other threads:[~2022-08-11 20:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-17 20:04 [Buildroot] [PATCH] arch: remove support for BR2_ARC_PAGE_SIZE_4K Thomas Petazzoni via buildroot
2022-07-17 21:13 ` [Buildroot] [arc-buildroot] " Alexey Brodkin via buildroot
2022-07-18  7:13   ` Thomas Petazzoni via buildroot
2022-07-19 18:20     ` Alexey Brodkin via buildroot
2022-07-26 13:21       ` Thomas Petazzoni via buildroot
     [not found]         ` <IA1PR12MB6210D4881185B436788BF05EA1969@IA1PR12MB6210.namprd12.prod.outlook.com>
2022-08-03 17:22           ` Thomas Petazzoni via buildroot
2022-08-11 20:34             ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox