Skip to content

Commit a136564

Browse files
Andrew MortonLinus Torvalds
authored andcommitted
[PATCH] remove gcc-2 checks
Remove various things which were checking for gcc-1.x and gcc-2.x compilers. From: Adrian Bunk <bunk@stusta.de> Some documentation updates and removes some code paths for gcc < 3.2. Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent fd285bb commit a136564

32 files changed

Lines changed: 37 additions & 194 deletions

File tree

Documentation/Changes

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ al espa
3131
Eine deutsche Version dieser Datei finden Sie unter
3232
<http://www.stefan-winter.de/Changes-2.4.0.txt>.
3333

34-
Last updated: October 29th, 2002
35-
3634
Chris Ricker (kaboom@gatech.edu or chris.ricker@genetics.utah.edu).
3735

3836
Current Minimal Requirements
@@ -48,7 +46,7 @@ necessary on all systems; obviously, if you don't have any ISDN
4846
hardware, for example, you probably needn't concern yourself with
4947
isdn4k-utils.
5048

51-
o Gnu C 2.95.3 # gcc --version
49+
o Gnu C 3.2 # gcc --version
5250
o Gnu make 3.79.1 # make --version
5351
o binutils 2.12 # ld -v
5452
o util-linux 2.10o # fdformat --version
@@ -74,26 +72,7 @@ GCC
7472
---
7573

7674
The gcc version requirements may vary depending on the type of CPU in your
77-
computer. The next paragraph applies to users of x86 CPUs, but not
78-
necessarily to users of other CPUs. Users of other CPUs should obtain
79-
information about their gcc version requirements from another source.
80-
81-
The recommended compiler for the kernel is gcc 2.95.x (x >= 3), and it
82-
should be used when you need absolute stability. You may use gcc 3.0.x
83-
instead if you wish, although it may cause problems. Later versions of gcc
84-
have not received much testing for Linux kernel compilation, and there are
85-
almost certainly bugs (mainly, but not exclusively, in the kernel) that
86-
will need to be fixed in order to use these compilers. In any case, using
87-
pgcc instead of plain gcc is just asking for trouble.
88-
89-
The Red Hat gcc 2.96 compiler subtree can also be used to build this tree.
90-
You should ensure you use gcc-2.96-74 or later. gcc-2.96-54 will not build
91-
the kernel correctly.
92-
93-
In addition, please pay attention to compiler optimization. Anything
94-
greater than -O2 may not be wise. Similarly, if you choose to use gcc-2.95.x
95-
or derivatives, be sure not to use -fstrict-aliasing (which, depending on
96-
your version of gcc 2.95.x, may necessitate using -fno-strict-aliasing).
75+
computer.
9776

9877
Make
9978
----
@@ -322,9 +301,9 @@ Getting updated software
322301
Kernel compilation
323302
******************
324303

325-
gcc 2.95.3
326-
----------
327-
o <ftp://ftp.gnu.org/gnu/gcc/gcc-2.95.3.tar.gz>
304+
gcc
305+
---
306+
o <ftp://ftp.gnu.org/gnu/gcc/>
328307

329308
Make
330309
----

README

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,8 @@ CONFIGURING the kernel:
183183

184184
COMPILING the kernel:
185185

186-
- Make sure you have gcc 2.95.3 available.
187-
gcc 2.91.66 (egcs-1.1.2), and gcc 2.7.2.3 are known to miscompile
188-
some parts of the kernel, and are *no longer supported*.
189-
Also remember to upgrade your binutils package (for as/ld/nm and company)
190-
if necessary. For more information, refer to Documentation/Changes.
186+
- Make sure you have at least gcc 3.2 available.
187+
For more information, refer to Documentation/Changes.
191188

192189
Please note that you can still run a.out user programs with this kernel.
193190

arch/arm/kernel/asm-offsets.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,15 @@
2323
#error Sorry, your compiler targets APCS-26 but this kernel requires APCS-32
2424
#endif
2525
/*
26-
* GCC 2.95.1, 2.95.2: ignores register clobber list in asm().
2726
* GCC 3.0, 3.1: general bad code generation.
2827
* GCC 3.2.0: incorrect function argument offset calculation.
2928
* GCC 3.2.x: miscompiles NEW_AUX_ENT in fs/binfmt_elf.c
3029
* (http://gcc.gnu.org/PR8896) and incorrect structure
3130
* initialisation in fs/jffs2/erase.c
3231
*/
33-
#if __GNUC__ < 2 || \
34-
(__GNUC__ == 2 && __GNUC_MINOR__ < 95) || \
35-
(__GNUC__ == 2 && __GNUC_MINOR__ == 95 && __GNUC_PATCHLEVEL__ != 0 && \
36-
__GNUC_PATCHLEVEL__ < 3) || \
37-
(__GNUC__ == 3 && __GNUC_MINOR__ < 3)
32+
#if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
3833
#error Your compiler is too buggy; it is known to miscompile kernels.
39-
#error Known good compilers: 2.95.3, 2.95.4, 2.96, 3.3
34+
#error Known good compilers: 3.3
4035
#endif
4136

4237
/* Use marker if you need to separate the values later */

arch/arm26/kernel/asm-offsets.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@
2525
#if defined(__APCS_32__) && defined(CONFIG_CPU_26)
2626
#error Sorry, your compiler targets APCS-32 but this kernel requires APCS-26
2727
#endif
28-
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 95)
29-
#error Sorry, your compiler is known to miscompile kernels. Only use gcc 2.95.3 and later.
30-
#endif
31-
#if __GNUC__ == 2 && __GNUC_MINOR__ == 95
32-
/* shame we can't detect the .1 or .2 releases */
33-
#warning GCC 2.95.2 and earlier miscompiles kernels.
34-
#endif
3528

3629
/* Use marker if you need to separate the values later */
3730

arch/i386/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,6 @@ config REGPARM
630630
and passes the first three arguments of a function call in registers.
631631
This will probably break binary only modules.
632632

633-
This feature is only enabled for gcc-3.0 and later - earlier compilers
634-
generate incorrect output with certain kernel constructs when
635-
-mregparm=3 is used.
636-
637633
config SECCOMP
638634
bool "Enable seccomp to safely compute untrusted bytecode"
639635
depends on PROC_FS

arch/i386/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
3737
# CPU-specific tuning. Anything which can be shared with UML should go here.
3838
include $(srctree)/arch/i386/Makefile.cpu
3939

40-
# -mregparm=3 works ok on gcc-3.0 and later
41-
#
42-
GCC_VERSION := $(call cc-version)
43-
cflags-$(CONFIG_REGPARM) += $(shell if [ $(GCC_VERSION) -ge 0300 ] ; then echo "-mregparm=3"; fi ;)
40+
cflags-$(CONFIG_REGPARM) += -mregparm=3
4441

4542
# Disable unit-at-a-time mode, it makes gcc use a lot more stack
4643
# due to the lack of sharing of stacklots.

arch/i386/Makefile.cpu

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CPU tuning section - shared with UML.
22
# Must change only cflags-y (or [yn]), not CFLAGS! That makes a difference for UML.
33

4-
#-mtune exists since gcc 3.4, and some -mcpu flavors didn't exist in gcc 2.95.
4+
#-mtune exists since gcc 3.4
55
HAS_MTUNE := $(call cc-option-yn, -mtune=i386)
66
ifeq ($(HAS_MTUNE),y)
77
tune = $(call cc-option,-mtune=$(1),)
@@ -14,7 +14,7 @@ cflags-$(CONFIG_M386) += -march=i386
1414
cflags-$(CONFIG_M486) += -march=i486
1515
cflags-$(CONFIG_M586) += -march=i586
1616
cflags-$(CONFIG_M586TSC) += -march=i586
17-
cflags-$(CONFIG_M586MMX) += $(call cc-option,-march=pentium-mmx,-march=i586)
17+
cflags-$(CONFIG_M586MMX) += -march=pentium-mmx
1818
cflags-$(CONFIG_M686) += -march=i686
1919
cflags-$(CONFIG_MPENTIUMII) += -march=i686 $(call tune,pentium2)
2020
cflags-$(CONFIG_MPENTIUMIII) += -march=i686 $(call tune,pentium3)
@@ -23,8 +23,8 @@ cflags-$(CONFIG_MPENTIUM4) += -march=i686 $(call tune,pentium4)
2323
cflags-$(CONFIG_MK6) += -march=k6
2424
# Please note, that patches that add -march=athlon-xp and friends are pointless.
2525
# They make zero difference whatsosever to performance at this time.
26-
cflags-$(CONFIG_MK7) += $(call cc-option,-march=athlon,-march=i686 $(align)-functions=4)
27-
cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,$(call cc-option,-march=athlon,-march=i686 $(align)-functions=4))
26+
cflags-$(CONFIG_MK7) += -march=athlon
27+
cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,-march=athlon)
2828
cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
2929
cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
3030
cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586)
@@ -37,5 +37,5 @@ cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686)
3737
cflags-$(CONFIG_X86_ELAN) += -march=i486
3838

3939
# Geode GX1 support
40-
cflags-$(CONFIG_MGEODEGX1) += $(call cc-option,-march=pentium-mmx,-march=i486)
40+
cflags-$(CONFIG_MGEODEGX1) += -march=pentium-mmx
4141

arch/ia64/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ $(error Sorry, you need a newer version of the assember, one that is built from
3737
ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
3838
endif
3939

40-
ifneq ($(shell if [ $(GCC_VERSION) -lt 0300 ] ; then echo "bad"; fi ;),)
41-
$(error Sorry, your compiler is too old. GCC v2.96 is known to generate bad code.)
42-
endif
43-
4440
ifeq ($(GCC_VERSION),0304)
4541
cflags-$(CONFIG_ITANIUM) += -mtune=merced
4642
cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley

arch/ia64/kernel/head.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ SET_REG(b5);
10601060
* the clobber lists for spin_lock() in include/asm-ia64/spinlock.h.
10611061
*/
10621062

1063-
#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
1063+
#if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
10641064

10651065
GLOBAL_ENTRY(ia64_spinlock_contention_pre3_4)
10661066
.prologue

arch/ia64/kernel/ia64_ksyms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ EXPORT_SYMBOL(unw_init_running);
103103

104104
#ifdef ASM_SUPPORTED
105105
# ifdef CONFIG_SMP
106-
# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
106+
# if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
107107
/*
108108
* This is not a normal routine and we don't want a function descriptor for it, so we use
109109
* a fake declaration here.

0 commit comments

Comments
 (0)