Hello All!

(patch attached, now)

Description:
------------

As previously suggested, here is a patch that gets rid of the ARM variant
choice in the menuconfig.

The patch also removes setting the CFLAGS/LDFLAGS for endianness for the
same reason, although the menuconfig entries are still there.

This patch is just a proof of concept, to serve as a base of discussion.
Should this proove the correct aproach, then the other architectures could
then also see their variant choice removed.

Build-tested for armel, EABI.

Rationale:
----------

If the user selects a specific variant, but the gcc that builds uClibc does
not recognise that variant (because that gcc version is too old), then the
uClibc build would break, and the user would complain to us.

Also, as new variants appears, we would have to add them in the choice, and
we'd have to support the burden of testing on a new variant that no maintainer
may have.

Solution:
---------

The idea is that the user is responsible for either:
 - setting the toolchain so that it emits appropriate opcodes for
   the target CPU variant
or
 - setting CLIBC_EXTRA_CFLAGS to contain some incarnation of -mcpu= -mtune=
   -march= and the likes.

If the build breaks, then it will be time to see what went wrong on that
variant, in close interaction between the user and us.

Signed-off-by: Yann E. MORIN <yann.morin.1...@anciens.enib.fr>

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
`------------------------------^-------^------------------^--------------------'
Index: uClibc/extra/Configs/Config.arm
===================================================================
--- uClibc/extra/Configs/Config.arm	(revision 26012)
+++ uClibc/extra/Configs/Config.arm	(working copy)
@@ -36,101 +36,5 @@
 config USE_BX
 	bool "Use BX in function return"
 	default y
-	depends on !CONFIG_GENERIC_ARM && !CONFIG_ARM610 && !CONFIG_ARM710
 	help
 	  Use BX instruction for THUMB aware architectures.
-
-choice
-	prompt "Target Processor Type"
-	default CONFIG_GENERIC_ARM
-	help
-	  This is the processor type of your CPU. This information is used for
-	  optimizing purposes.  To build a library that will run on all ARMCPU
-	  types (albeit not optimally fast), you can specify "Generic Arm" here.
-	  If you pick anything other than "Generic Arm", there is no guarantee 
-	  that uClibc will even run on anything other than the selected
-	  processor type.
-
-	  Here are the settings recommended for greatest speed:
-	  - "Generic Arm" select this if your compiler is already setup to
-	    optimize things properly, or if you want to run on pretty much
-	    everything, or you just don't much care.
-	  - For anything else, pick the ARM core type that best matches the
-	    cpu you will be using on your device.
-
-	  If you don't know what to do, choose "Generic Arm".
-
-config CONFIG_GENERIC_ARM
-	bool "Generic Arm"
-
-config CONFIG_ARM610
-	bool "Arm 610"
-	select ARCH_HAS_MMU
-
-config CONFIG_ARM710
-	bool "Arm 710"
-	select ARCH_HAS_MMU
-
-config CONFIG_ARM7TDMI
-	bool "Arm 7TDMI"
-	select ARCH_HAS_NO_MMU
-
-config CONFIG_ARM720T
-	bool "Arm 720T"
-	select ARCH_HAS_MMU
-
-config CONFIG_ARM920T
-	bool "Arm 920T"
-	select ARCH_HAS_MMU
-
-config CONFIG_ARM922T
-	bool "Arm 922T"
-	select ARCH_HAS_MMU
-
-config CONFIG_ARM926T
-	bool "Arm 926T"
-	select ARCH_HAS_MMU
-
-config CONFIG_ARM10T
-	bool "Arm 10T"
-	select ARCH_HAS_MMU
-
-config CONFIG_ARM1136JF_S
-	bool "Arm 1136JF-S"
-	select ARCH_HAS_MMU
-
-config CONFIG_ARM1176JZ_S
-	bool "Arm 1176JZ-S"
-	select ARCH_HAS_MMU
-
-config CONFIG_ARM1176JZF_S
-	bool "Arm 1176JZF-S"
-	select ARCH_HAS_MMU
-
-config CONFIG_ARM_CORTEX_M3
-	bool "Arm Cortex-M3"
-	select ARCH_HAS_NO_MMU
-	select USE_BX
-
-config CONFIG_ARM_CORTEX_M1
-	bool "Arm Cortex-M1"
-	select ARCH_HAS_NO_MMU
-	select USE_BX
-
-config CONFIG_ARM_SA110
-	bool "Intel StrongArm SA-110"
-	select ARCH_HAS_MMU
-
-config CONFIG_ARM_SA1100
-	bool "Intel StrongArm SA-1100"
-	select ARCH_HAS_MMU
-
-config CONFIG_ARM_XSCALE
-	bool "Intel Xscale"
-	select ARCH_HAS_MMU
-
-config CONFIG_ARM_IWMMXT
-	bool "Intel Xscale With WMMX PXA27x"
-	select ARCH_HAS_MMU
-
-endchoice
Index: uClibc/Rules.mak
===================================================================
--- uClibc/Rules.mak	(revision 26012)
+++ uClibc/Rules.mak	(working copy)
@@ -309,29 +309,6 @@
 
 ifeq ($(TARGET_ARCH),arm)
 	OPTIMIZATION+=-fstrict-aliasing
-	CPU_LDFLAGS-$(ARCH_LITTLE_ENDIAN)+=-Wl,-EL
-	CPU_LDFLAGS-$(ARCH_BIG_ENDIAN)+=-Wl,-EB
-	CPU_CFLAGS-$(ARCH_LITTLE_ENDIAN)+=-mlittle-endian
-	CPU_CFLAGS-$(ARCH_BIG_ENDIAN)+=-mbig-endian
-	CPU_CFLAGS-$(CONFIG_GENERIC_ARM)+=
-	CPU_CFLAGS-$(CONFIG_ARM610)+=-mtune=arm610 -march=armv3
-	CPU_CFLAGS-$(CONFIG_ARM710)+=-mtune=arm710 -march=armv3
-	CPU_CFLAGS-$(CONFIG_ARM7TDMI)+=-mtune=arm7tdmi -march=armv4t
-	CPU_CFLAGS-$(CONFIG_ARM720T)+=-mtune=arm7tdmi -march=armv4t
-	CPU_CFLAGS-$(CONFIG_ARM920T)+=-mtune=arm9tdmi -march=armv4t
-	CPU_CFLAGS-$(CONFIG_ARM922T)+=-mtune=arm9tdmi -march=armv4t
-	CPU_CFLAGS-$(CONFIG_ARM926T)+=-mtune=arm9tdmi -march=armv5t
-	CPU_CFLAGS-$(CONFIG_ARM10T)+=-mtune=arm10tdmi -march=armv5t
-	CPU_CFLAGS-$(CONFIG_ARM1136JF_S)+=-mtune=arm1136jf-s -march=armv6
-	CPU_CFLAGS-$(CONFIG_ARM1176JZ_S)+=-mtune=arm1176jz-s -march=armv6
-	CPU_CFLAGS-$(CONFIG_ARM1176JZF_S)+=-mtune=arm1176jzf-s -march=armv6
-	CPU_CFLAGS-$(CONFIG_ARM_SA110)+=-mtune=strongarm110 -march=armv4
-	CPU_CFLAGS-$(CONFIG_ARM_SA1100)+=-mtune=strongarm1100 -march=armv4
-	CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=$(call check_gcc,-mtune=xscale,-mtune=strongarm110)
-	CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=-march=armv5te -Wa,-mcpu=xscale
- 	CPU_CFLAGS-$(CONFIG_ARM_IWMMXT)+=-march=iwmmxt -Wa,-mcpu=iwmmxt -mabi=iwmmxt
- 	CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M3)+=-mcpu=cortex-m3 -mthumb
- 	CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M1)+=-mcpu=cortex-m1 -mthumb
 endif
 
 ifeq ($(TARGET_ARCH),mips)
_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to