The optimisation flags used for i386 might have been a little bit tricky. Those flags have been documented in docs/README-arch-optimisations.txt in case the user really wants to meddle with compiler flags.
Signed-off-by: "Yann E. MORIN" <yann.morin.1...@anciens.enib.fr> --- Rules.mak | 48 ------------------- docs/README-arch-optimisations.txt | 24 ++++++++++ extra/Configs/Config.i386 | 88 ------------------------------------ 3 files changed, 24 insertions(+), 136 deletions(-) create mode 100644 docs/README-arch-optimisations.txt diff --git a/Rules.mak b/Rules.mak index bf9ba01..19104c1 100644 --- a/Rules.mak +++ b/Rules.mak @@ -237,38 +237,6 @@ PIEFLAG_NAME:=-fPIE ifeq ($(TARGET_ARCH),i386) OPTIMIZATION+=$(call check_gcc,-fomit-frame-pointer,) -ifeq ($(CONFIG_386)$(CONFIG_486)$(CONFIG_586)$(CONFIG_586MMX),y) - # Non-SSE capable processor. - # NB: this may make SSE insns segfault! - # -O1 -march=pentium3, -Os -msse etc are known to be affected. - # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13685 - # -m32 is needed if host is 64-bit - OPTIMIZATION+=$(call check_gcc,-m32 -mpreferred-stack-boundary=2,) -else - OPTIMIZATION+=$(call check_gcc,-mpreferred-stack-boundary=4,) -endif - - # Choice of alignment (please document why!) - # -falign-labels: in-line labels - # (reachable by normal code flow, aligning will insert nops - # which will be executed - may even make things slower) - # -falign-jumps: reachable only by a jump - # Generic: no alignment at all (smallest code) - GCC_FALIGN=$(call check_gcc,-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1,-malign-jumps=1 -malign-loops=1) -ifeq ($(CONFIG_K7),y) - # Align functions to four bytes, use default for jumps and loops (why?) - GCC_FALIGN=$(call check_gcc,-falign-functions=4 -falign-labels=1,-malign-functions=4) -endif -ifeq ($(CONFIG_CRUSOE),y) - # Use compiler's default for functions, jumps and loops (why?) - GCC_FALIGN=$(call check_gcc,-falign-functions=0 -falign-labels=1,-malign-functions=0) -endif -ifeq ($(CONFIG_CYRIXIII),y) - # Use compiler's default for functions, jumps and loops (why?) - GCC_FALIGN=$(call check_gcc,-falign-functions=0 -falign-labels=1,-malign-functions=0) -endif - OPTIMIZATION+=$(GCC_FALIGN) - # Putting each function and data object into its own section # allows for kbytes of less text if users link against static uclibc # using ld --gc-sections. @@ -294,22 +262,6 @@ endif CPU_LDFLAGS-y+=-m32 CPU_CFLAGS-y+=-m32 - CPU_CFLAGS-$(CONFIG_386)+=-march=i386 - CPU_CFLAGS-$(CONFIG_486)+=-march=i486 - CPU_CFLAGS-$(CONFIG_ELAN)+=-march=i486 - CPU_CFLAGS-$(CONFIG_586)+=-march=i586 - CPU_CFLAGS-$(CONFIG_586MMX)+=$(call check_gcc,-march=pentium-mmx,-march=i586) - CPU_CFLAGS-$(CONFIG_686)+=-march=i686 - CPU_CFLAGS-$(CONFIG_PENTIUMII)+=$(call check_gcc,-march=pentium2,-march=i686) - CPU_CFLAGS-$(CONFIG_PENTIUMIII)+=$(call check_gcc,-march=pentium3,-march=i686) - CPU_CFLAGS-$(CONFIG_PENTIUM4)+=$(call check_gcc,-march=pentium4,-march=i686) - CPU_CFLAGS-$(CONFIG_K6)+=$(call check_gcc,-march=k6,-march=i586) - CPU_CFLAGS-$(CONFIG_K7)+=$(call check_gcc,-march=athlon,-march=i686) - CPU_CFLAGS-$(CONFIG_CRUSOE)+=-march=i686 - CPU_CFLAGS-$(CONFIG_WINCHIPC6)+=$(call check_gcc,-march=winchip-c6,-march=i586) - CPU_CFLAGS-$(CONFIG_WINCHIP2)+=$(call check_gcc,-march=winchip2,-march=i586) - CPU_CFLAGS-$(CONFIG_CYRIXIII)+=$(call check_gcc,-march=c3,-march=i486) - CPU_CFLAGS-$(CONFIG_NEHEMIAH)+=$(call check_gcc,-march=c3-2,-march=i686) endif ifeq ($(TARGET_ARCH),sparc) diff --git a/docs/README-arch-optimisations.txt b/docs/README-arch-optimisations.txt new file mode 100644 index 0000000..a04c1ed --- /dev/null +++ b/docs/README-arch-optimisations.txt @@ -0,0 +1,24 @@ +This file documents some optimnisations that *might* be required for some +variants (sub-arch) of any given architecture. + +Variants, or sub-arch, are specific versions or implementations of an +architecture. For example, the i386 architecture can be the original i386, +an i486, a pentium with MMX, and so on, while an ARM can be armv4, armv4t, +armv5, cortex-A8, etc... + +Note: if your compiler has been correctly set up, you should *not* require +any of those. If, and only if, it is correctly set up, and you still need +the following, please submit a full bug report. + + +Architecture Variants | UCLIBC_EXTRA_CFLAGS +------------------------------------------+----------------------------------- +i386 i386 i486 i586 i586mmx | -mpreferred-stack-boundary=2 +(not (all others) | -mpreferred-stack-boundary=4 +x86_64) --------------------------+----------------------------------- + K7 | -falign-functions=4 + | -falign-labels=1 + --------------------------+----------------------------------- + Crusoe CyrixIII Via-C3 | -falign-functions=0 + | -falign-labels=1 +------------------------------------------+----------------------------------- diff --git a/extra/Configs/Config.i386 b/extra/Configs/Config.i386 index 850ab8e..4997f71 100644 --- a/extra/Configs/Config.i386 +++ b/extra/Configs/Config.i386 @@ -12,91 +12,3 @@ config FORCE_OPTIONS_FOR_ARCH default y select ARCH_LITTLE_ENDIAN select ARCH_HAS_MMU - -choice - prompt "Target x86 Processor Family" - default CONFIG_GENERIC_386 - 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 x86 CPU - types (albeit not optimally fast), you can specify "386" here. If - you pick anything other than "386", 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 386" select this if your compiler is already setup to - optimize things properly. - - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI - 486DLC/DLC2, UMC 486SX-S and NexGen Nx586. Only "386" kernels - will run on a 386 class machine. - - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or - SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S. - - "586" for Intel Pentium and other generic Pentium CPUs - - "Pentium-MMX" for the Intel Pentium MMX. - - "Pentium-Pro" for the Intel Pentium Pro/Celeron/Pentium II. - - "Pentium-III" for the Intel Pentium III - and Celerons based on the Coppermine core. - - "Pentium-4" for the Intel Pentium 4. - - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D). - - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird). - - "Elan" for the AMD Elan. - - "Crusoe" for the Transmeta Crusoe series. - - "Winchip-C6" for original IDT Winchip. - - "Winchip-2/Winchip-2A/Winchip-3" for IDT Winchip CPUs - - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3. - - "VIA C3-2 Nehemiah" model 9 and above. - - If you don't know what to do, choose "386". - -config CONFIG_GENERIC_386 - bool "Generic 386" - -config CONFIG_386 - bool "386" - -config CONFIG_486 - bool "486" - -config CONFIG_586 - bool "Pentium/586/K5/5x86/6x86/6x86MX" - -config CONFIG_586MMX - bool "Pentium-MMX" - -config CONFIG_686 - bool "Pentium-Pro" - -config CONFIG_PENTIUMII - bool "Celeron/Pentium-II" - -config CONFIG_PENTIUMIII - bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon" - -config CONFIG_PENTIUM4 - bool "Pentium-4/Celeron(P4-based)/Xeon" - -config CONFIG_K6 - bool "K6/K6-II/K6-III" - -config CONFIG_K7 - bool "Athlon/Duron/K7" - -config CONFIG_ELAN - bool "Elan" - -config CONFIG_CRUSOE - bool "Crusoe" - -config CONFIG_WINCHIPC6 - bool "Winchip-C6" - -config CONFIG_WINCHIP2 - bool "Winchip-2/Winchip-2A/Winchip-3" - -config CONFIG_CYRIXIII - bool "CyrixIII/VIA-C3" - -config CONFIG_NEHEMIAH - bool "VIA C3-2 (Nehemiah)" - -endchoice -- 1.6.5 _______________________________________________ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc