]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
[PATCH] remove gcc-2 checks
authorAndrew Morton <akpm@osdl.org>
Sun, 8 Jan 2006 09:04:09 +0000 (01:04 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Jan 2006 04:14:02 +0000 (20:14 -0800)
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>
32 files changed:
Documentation/Changes
README
arch/arm/kernel/asm-offsets.c
arch/arm26/kernel/asm-offsets.c
arch/i386/Kconfig
arch/i386/Makefile
arch/i386/Makefile.cpu
arch/ia64/Makefile
arch/ia64/kernel/head.S
arch/ia64/kernel/ia64_ksyms.c
arch/ia64/oprofile/backtrace.c
drivers/md/raid0.c
drivers/media/video/v4l2-common.c
fs/ocfs2/cluster/masklog.h
fs/xfs/xfs_log.h
include/asm-alpha/compiler.h
include/asm-alpha/processor.h
include/asm-ia64/bug.h
include/asm-ia64/spinlock.h
include/asm-sparc64/system.h
include/asm-um/rwsem.h
include/asm-v850/unistd.h
include/linux/byteorder/generic.h
include/linux/byteorder/swab.h
include/linux/byteorder/swabb.h
include/linux/compiler-gcc.h
include/linux/compiler-gcc3.h
include/linux/compiler-gcc4.h
include/linux/kernel.h
include/linux/seccomp.h
include/linux/spinlock_types_up.h
sound/isa/wavefront/wavefront_synth.c

index 86b86399d61d7237aab919f87867bd984dddaa25..fe5ae0f550202f1692ab9dc1e45ba5735e867b1d 100644 (file)
@@ -31,8 +31,6 @@ al espa
 Eine deutsche Version dieser Datei finden Sie unter
 <http://www.stefan-winter.de/Changes-2.4.0.txt>.
 
-Last updated: October 29th, 2002
-
 Chris Ricker (kaboom@gatech.edu or chris.ricker@genetics.utah.edu).
 
 Current Minimal Requirements
@@ -48,7 +46,7 @@ necessary on all systems; obviously, if you don't have any ISDN
 hardware, for example, you probably needn't concern yourself with
 isdn4k-utils.
 
-o  Gnu C                  2.95.3                  # gcc --version
+o  Gnu C                  3.2                     # gcc --version
 o  Gnu make               3.79.1                  # make --version
 o  binutils               2.12                    # ld -v
 o  util-linux             2.10o                   # fdformat --version
@@ -74,26 +72,7 @@ GCC
 ---
 
 The gcc version requirements may vary depending on the type of CPU in your
-computer. The next paragraph applies to users of x86 CPUs, but not
-necessarily to users of other CPUs. Users of other CPUs should obtain
-information about their gcc version requirements from another source.
-
-The recommended compiler for the kernel is gcc 2.95.x (x >= 3), and it
-should be used when you need absolute stability. You may use gcc 3.0.x
-instead if you wish, although it may cause problems. Later versions of gcc 
-have not received much testing for Linux kernel compilation, and there are 
-almost certainly bugs (mainly, but not exclusively, in the kernel) that
-will need to be fixed in order to use these compilers. In any case, using
-pgcc instead of plain gcc is just asking for trouble.
-
-The Red Hat gcc 2.96 compiler subtree can also be used to build this tree.
-You should ensure you use gcc-2.96-74 or later. gcc-2.96-54 will not build
-the kernel correctly.
-
-In addition, please pay attention to compiler optimization.  Anything
-greater than -O2 may not be wise.  Similarly, if you choose to use gcc-2.95.x
-or derivatives, be sure not to use -fstrict-aliasing (which, depending on
-your version of gcc 2.95.x, may necessitate using -fno-strict-aliasing).
+computer.
 
 Make
 ----
@@ -322,9 +301,9 @@ Getting updated software
 Kernel compilation
 ******************
 
-gcc 2.95.3
-----------
-o  <ftp://ftp.gnu.org/gnu/gcc/gcc-2.95.3.tar.gz>
+gcc
+---
+o  <ftp://ftp.gnu.org/gnu/gcc/>
 
 Make
 ----
diff --git a/README b/README
index 61c4f7429233d509f26c267cf95fa01742b81e3e..cd5e2eb6213b052d4bbd40d8c6bf92e92ca787e9 100644 (file)
--- a/README
+++ b/README
@@ -183,11 +183,8 @@ CONFIGURING the kernel:
 
 COMPILING the kernel:
 
- - Make sure you have gcc 2.95.3 available.
-   gcc 2.91.66 (egcs-1.1.2), and gcc 2.7.2.3 are known to miscompile
-   some parts of the kernel, and are *no longer supported*.
-   Also remember to upgrade your binutils package (for as/ld/nm and company)
-   if necessary. For more information, refer to Documentation/Changes.
+ - Make sure you have at least gcc 3.2 available.
+   For more information, refer to Documentation/Changes.
 
    Please note that you can still run a.out user programs with this kernel.
 
index 04d3082a7b948af1911fe6b3813ea80333f4c4e9..0abbce8c70bc7911d949ee026ab4996df343ef0e 100644 (file)
 #error Sorry, your compiler targets APCS-26 but this kernel requires APCS-32
 #endif
 /*
- * GCC 2.95.1, 2.95.2: ignores register clobber list in asm().
  * GCC 3.0, 3.1: general bad code generation.
  * GCC 3.2.0: incorrect function argument offset calculation.
  * GCC 3.2.x: miscompiles NEW_AUX_ENT in fs/binfmt_elf.c
  *            (http://gcc.gnu.org/PR8896) and incorrect structure
  *           initialisation in fs/jffs2/erase.c
  */
-#if __GNUC__ < 2 || \
-   (__GNUC__ == 2 && __GNUC_MINOR__ < 95) || \
-   (__GNUC__ == 2 && __GNUC_MINOR__ == 95 && __GNUC_PATCHLEVEL__ != 0 && \
-                                            __GNUC_PATCHLEVEL__ < 3) || \
-   (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
+#if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
 #error Your compiler is too buggy; it is known to miscompile kernels.
-#error    Known good compilers: 2.95.3, 2.95.4, 2.96, 3.3
+#error    Known good compilers: 3.3
 #endif
 
 /* Use marker if you need to separate the values later */
index 4ccacaef94dfb2dce7cfbdcfde65e8cc3c70ba25..ac682d5fd0398cd67a96ac3b22410a40d74c959a 100644 (file)
 #if defined(__APCS_32__) && defined(CONFIG_CPU_26)
 #error Sorry, your compiler targets APCS-32 but this kernel requires APCS-26
 #endif
-#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 95)
-#error Sorry, your compiler is known to miscompile kernels.  Only use gcc 2.95.3 and later.
-#endif
-#if __GNUC__ == 2 && __GNUC_MINOR__ == 95
-/* shame we can't detect the .1 or .2 releases */
-#warning GCC 2.95.2 and earlier miscompiles kernels.
-#endif
 
 /* Use marker if you need to separate the values later */
 
index 968fabd8723fd5aaf81dcfc7b659499328e5630c..486449e9e710a08758416036a58134b6bcd99348 100644 (file)
@@ -630,10 +630,6 @@ config REGPARM
        and passes the first three arguments of a function call in registers.
        This will probably break binary only modules.
 
-       This feature is only enabled for gcc-3.0 and later - earlier compilers
-       generate incorrect output with certain kernel constructs when
-       -mregparm=3 is used.
-
 config SECCOMP
        bool "Enable seccomp to safely compute untrusted bytecode"
        depends on PROC_FS
index d121ea18460fe89335c2019c818f55dedd4c14b0..b84119f9cc63a1ff2df55dd1e3fad00e5211b3b6 100644 (file)
@@ -37,10 +37,7 @@ CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
 # CPU-specific tuning. Anything which can be shared with UML should go here.
 include $(srctree)/arch/i386/Makefile.cpu
 
-# -mregparm=3 works ok on gcc-3.0 and later
-#
-GCC_VERSION                    := $(call cc-version)
-cflags-$(CONFIG_REGPARM)       += $(shell if [ $(GCC_VERSION) -ge 0300 ] ; then echo "-mregparm=3"; fi ;)
+cflags-$(CONFIG_REGPARM)       += -mregparm=3
 
 # Disable unit-at-a-time mode, it makes gcc use a lot more stack
 # due to the lack of sharing of stacklots.
index 8e51456df23d0cf8590910f041783ee4463e5930..dcd936ef45db613b941ba178c6b0ff786827c94b 100644 (file)
@@ -1,7 +1,7 @@
 # CPU tuning section - shared with UML.
 # Must change only cflags-y (or [yn]), not CFLAGS! That makes a difference for UML.
 
-#-mtune exists since gcc 3.4, and some -mcpu flavors didn't exist in gcc 2.95.
+#-mtune exists since gcc 3.4
 HAS_MTUNE      := $(call cc-option-yn, -mtune=i386)
 ifeq ($(HAS_MTUNE),y)
 tune           = $(call cc-option,-mtune=$(1),)
@@ -14,7 +14,7 @@ cflags-$(CONFIG_M386)         += -march=i386
 cflags-$(CONFIG_M486)          += -march=i486
 cflags-$(CONFIG_M586)          += -march=i586
 cflags-$(CONFIG_M586TSC)       += -march=i586
-cflags-$(CONFIG_M586MMX)       += $(call cc-option,-march=pentium-mmx,-march=i586)
+cflags-$(CONFIG_M586MMX)       += -march=pentium-mmx
 cflags-$(CONFIG_M686)          += -march=i686
 cflags-$(CONFIG_MPENTIUMII)    += -march=i686 $(call tune,pentium2)
 cflags-$(CONFIG_MPENTIUMIII)   += -march=i686 $(call tune,pentium3)
@@ -23,8 +23,8 @@ cflags-$(CONFIG_MPENTIUM4)    += -march=i686 $(call tune,pentium4)
 cflags-$(CONFIG_MK6)           += -march=k6
 # Please note, that patches that add -march=athlon-xp and friends are pointless.
 # They make zero difference whatsosever to performance at this time.
-cflags-$(CONFIG_MK7)           += $(call cc-option,-march=athlon,-march=i686 $(align)-functions=4)
-cflags-$(CONFIG_MK8)           += $(call cc-option,-march=k8,$(call cc-option,-march=athlon,-march=i686 $(align)-functions=4))
+cflags-$(CONFIG_MK7)           += -march=athlon
+cflags-$(CONFIG_MK8)           += $(call cc-option,-march=k8,-march=athlon)
 cflags-$(CONFIG_MCRUSOE)       += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
 cflags-$(CONFIG_MEFFICEON)     += -march=i686 $(call tune,pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
 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)
 cflags-$(CONFIG_X86_ELAN)      += -march=i486
 
 # Geode GX1 support
-cflags-$(CONFIG_MGEODEGX1)             += $(call cc-option,-march=pentium-mmx,-march=i486)
+cflags-$(CONFIG_MGEODEGX1)     += -march=pentium-mmx
 
index 67932ad530822882047655b58f1d6ba0992bbc08..57b047c27e4641e092dd485b7c09e6fba1d28fc5 100644 (file)
@@ -37,10 +37,6 @@ $(error Sorry, you need a newer version of the assember, one that is built from
                ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
 endif
 
-ifneq ($(shell if [ $(GCC_VERSION) -lt 0300 ] ; then echo "bad"; fi ;),)
-$(error Sorry, your compiler is too old.  GCC v2.96 is known to generate bad code.)
-endif
-
 ifeq ($(GCC_VERSION),0304)
        cflags-$(CONFIG_ITANIUM)        += -mtune=merced
        cflags-$(CONFIG_MCKINLEY)       += -mtune=mckinley
index bfe65b2e862146ad9a16d1761e3f91ff69e05347..fbc7ea35dd5789fab0d15f0a2e7ac1e28b1b99c2 100644 (file)
@@ -1060,7 +1060,7 @@ SET_REG(b5);
         * the clobber lists for spin_lock() in include/asm-ia64/spinlock.h.
         */
 
-#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
+#if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
 
 GLOBAL_ENTRY(ia64_spinlock_contention_pre3_4)
        .prologue
index 5db9d3bcbbcbe262b85352e3c8fb3be7d1ff8597..e72de580ebbf8b9a41801c08b7e09da4d9d33a7c 100644 (file)
@@ -103,7 +103,7 @@ EXPORT_SYMBOL(unw_init_running);
 
 #ifdef ASM_SUPPORTED
 # ifdef CONFIG_SMP
-#  if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
+#  if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
 /*
  * This is not a normal routine and we don't want a function descriptor for it, so we use
  * a fake declaration here.
index b7dabbfb0d619b244c897d741701187b27dbf7c0..adb01566bd57306ae23e33af799588421425d8df 100644 (file)
@@ -32,7 +32,7 @@ typedef struct
        u64 *prev_pfs_loc;      /* state for WAR for old spinlock ool code */
 } ia64_backtrace_t;
 
-#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
+#if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
 /*
  * Returns non-zero if the PC is in the spinlock contention out-of-line code
  * with non-standard calling sequence (on older compilers).
index abbca150202b4263cf6f573da3988803d1c3980d..d03f99cf4b7dfa936af326eef8ceb0586709fd5a 100644 (file)
@@ -306,9 +306,6 @@ static int raid0_run (mddev_t *mddev)
        printk("raid0 : conf->hash_spacing is %llu blocks.\n",
                (unsigned long long)conf->hash_spacing);
        {
-#if __GNUC__ < 3
-               volatile
-#endif
                sector_t s = mddev->array_size;
                sector_t space = conf->hash_spacing;
                int round;
@@ -439,9 +436,6 @@ static int raid0_make_request (request_queue_t *q, struct bio *bio)
  
 
        {
-#if __GNUC__ < 3
-               volatile
-#endif
                sector_t x = block >> conf->preshift;
                sector_div(x, (u32)conf->hash_spacing);
                zone = conf->hash_table[x];
index 597b8db35a135c935b07e19d5ba08d816ec91946..62a7d636ef1123bc1b9c2ccb8fd409e2ecbc7855 100644 (file)
@@ -191,9 +191,7 @@ char *v4l2_type_names[] = {
 };
 
 char *v4l2_ioctl_names[256] = {
-#if __GNUC__ >= 3
        [0 ... 255]                      = "UNKNOWN",
-#endif
        [_IOC_NR(VIDIOC_QUERYCAP)]       = "VIDIOC_QUERYCAP",
        [_IOC_NR(VIDIOC_RESERVED)]       = "VIDIOC_RESERVED",
        [_IOC_NR(VIDIOC_ENUM_FMT)]       = "VIDIOC_ENUM_FMT",
index f5ef5ea61a05afdc4c8583e24f9d82e42fe55b64..e8c56a3d9c646d465f8bc0af757c4d47bc3d003c 100644 (file)
@@ -212,11 +212,10 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;
        mlog(ML_ENTRY, "ENTRY:\n");                                     \
 } while (0)
 
-/* We disable this for old compilers since they don't have support for
- * __builtin_types_compatible_p.
+/*
+ * We disable this for sparse.
  */
-#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) && \
-    !defined(__CHECKER__)
+#if !defined(__CHECKER__)
 #define mlog_exit(st) do {                                                  \
        if (__builtin_types_compatible_p(typeof(st), unsigned long))         \
                mlog(ML_EXIT, "EXIT: %lu\n", (unsigned long) (st));          \
index 158829ca56f699deb90bd6733f2b9040683322e0..f40d4391fcfcc0f89cdd2a5f658906f88b5fbca4 100644 (file)
  * By comparing each compnent, we don't have to worry about extra
  * endian issues in treating two 32 bit numbers as one 64 bit number
  */
-static
-#if defined(__GNUC__) && (__GNUC__ == 2) && ( (__GNUC_MINOR__ == 95) || (__GNUC_MINOR__ == 96))
-__attribute__((unused))        /* gcc 2.95, 2.96 miscompile this when inlined */
-#else
-__inline__
-#endif
-xfs_lsn_t      _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2)
+static inline xfs_lsn_t        _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2)
 {
        if (CYCLE_LSN(lsn1) != CYCLE_LSN(lsn2))
                return (CYCLE_LSN(lsn1)<CYCLE_LSN(lsn2))? -999 : 999;
index 0a4a8b40dfcd7a623e6ad0f95c3c3d4a7e969a76..00c6f57ad9a7a43ea189fb4b14a07f6218277872 100644 (file)
@@ -98,9 +98,7 @@
 #undef inline
 #undef __inline__
 #undef __inline
-#if __GNUC__ == 3 && __GNUC_MINOR__ >= 1 || __GNUC__ > 3
 #undef __always_inline
 #define __always_inline                inline __attribute__((always_inline))
-#endif
 
 #endif /* __ALPHA_COMPILER_H */
index 059780a7d3d7898b750a9f6f7265a0cb2687d2fd..bb1a7a3abb8b55ac2c80aa10d608299eac295ad0 100644 (file)
@@ -77,7 +77,6 @@ unsigned long get_wchan(struct task_struct *p);
 #define spin_lock_prefetch(lock)       do { } while (0)
 #endif
 
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
 extern inline void prefetch(const void *ptr)  
 { 
        __builtin_prefetch(ptr, 0, 3);
@@ -95,24 +94,4 @@ extern inline void spin_lock_prefetch(const void *ptr)
 }
 #endif
 
-#else
-extern inline void prefetch(const void *ptr)  
-{ 
-       __asm__ ("ldl $31,%0" : : "m"(*(char *)ptr)); 
-}
-
-extern inline void prefetchw(const void *ptr)  
-{
-       __asm__ ("ldq $31,%0" : : "m"(*(char *)ptr)); 
-}
-
-#ifdef CONFIG_SMP
-extern inline void spin_lock_prefetch(const void *ptr)  
-{
-       __asm__ ("ldq $31,%0" : : "m"(*(char *)ptr)); 
-}
-#endif
-
-#endif /* GCC 3.1 */
-
 #endif /* __ASM_ALPHA_PROCESSOR_H */
index 3aa0a0a5474bd20f7898995bf45cc13da5986bac..823616b5020b366ba5b20e06529d0095748e7477 100644 (file)
@@ -2,11 +2,7 @@
 #define _ASM_IA64_BUG_H
 
 #ifdef CONFIG_BUG
-#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
-# define ia64_abort()  __builtin_trap()
-#else
-# define ia64_abort()  (*(volatile int *) 0 = 0)
-#endif
+#define ia64_abort()   __builtin_trap()
 #define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); ia64_abort(); } while (0)
 
 /* should this BUG be made generic? */
index 0c91a76c5ea3cff8decee9debe0cf45d696a83c7..9e83210dc31257adc4c5356b64f37b24e83bf1e4 100644 (file)
@@ -34,7 +34,7 @@ __raw_spin_lock_flags (raw_spinlock_t *lock, unsigned long flags)
 {
        register volatile unsigned int *ptr asm ("r31") = &lock->lock;
 
-#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
+#if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
 # ifdef CONFIG_ITANIUM
        /* don't use brl on Itanium... */
        asm volatile ("{\n\t"
index b5417529f6f173dac37d17e900411d9c68ea7929..309f1466b6fa1125edd34f933aa56ab645dc76b0 100644 (file)
@@ -193,11 +193,7 @@ do {                                               \
         * not preserve it's value.  Hairy, but it lets us remove 2 loads
         * and 2 stores in this critical code path.  -DaveM
         */
-#if __GNUC__ >= 3
 #define EXTRA_CLOBBER ,"%l1"
-#else
-#define EXTRA_CLOBBER
-#endif
 #define switch_to(prev, next, last)                                    \
 do {   if (test_thread_flag(TIF_PERFCTR)) {                            \
                unsigned long __tmp;                                    \
index 661c0e54702bee0a74eeec958e02ba9ed8337066..b5fc449dc86b3ff4a845c08b129c0eb29574a5e1 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef __UM_RWSEM_H__
 #define __UM_RWSEM_H__
 
-#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
-#define __builtin_expect(exp,c) (exp)
-#endif
-
 #include "asm/arch/rwsem.h"
 
 #endif
index 5a86f8e976ec35b26182abe9c06b366b37949b37..82460a7bb233fbc6f4354fafb903197ae7c0ca16 100644 (file)
 /* User programs sometimes end up including this header file
    (indirectly, via uClibc header files), so I'm a bit nervous just
    including <linux/compiler.h>.  */
-#if !defined(__builtin_expect) && __GNUC__ == 2 && __GNUC_MINOR__ < 96
-#define __builtin_expect(x, expected_value) (x)
-#endif
 
 #define __syscall_return(type, res)                                          \
   do {                                                                       \
@@ -346,20 +343,6 @@ type name (atype a, btype b, ctype c, dtype d, etype e)                          \
   __syscall_return (type, __ret);                                            \
 }
 
-#if __GNUC__ < 3
-/* In older versions of gcc, `asm' statements with more than 10
-   input/output arguments produce a fatal error.  To work around this
-   problem, we use two versions, one for gcc-3.x and one for earlier
-   versions of gcc (the `earlier gcc' version doesn't work with gcc-3.x
-   because gcc-3.x doesn't allow clobbers to also be input arguments).  */
-#define __SYSCALL6_TRAP(syscall, ret, a, b, c, d, e, f)                              \
-  __asm__ __volatile__ ("trap " SYSCALL_LONG_TRAP                            \
-                       : "=r" (ret), "=r" (syscall)                          \
-                       : "1" (syscall),                                      \
-                       "r" (a), "r" (b), "r" (c), "r" (d),                   \
-                       "r" (e), "r" (f)                                      \
-                       : SYSCALL_CLOBBERS, SYSCALL_ARG4, SYSCALL_ARG5);
-#else /* __GNUC__ >= 3 */
 #define __SYSCALL6_TRAP(syscall, ret, a, b, c, d, e, f)                              \
   __asm__ __volatile__ ("trap " SYSCALL_LONG_TRAP                            \
                        : "=r" (ret), "=r" (syscall),                         \
@@ -368,7 +351,6 @@ type name (atype a, btype b, ctype c, dtype d, etype e)                           \
                        "r" (a), "r" (b), "r" (c), "r" (d),                   \
                        "2" (e), "3" (f)                                      \
                        : SYSCALL_CLOBBERS);
-#endif
 
 #define _syscall6(type, name, atype, a, btype, b, ctype, c, dtype, d, etype, e, ftype, f) \
 type name (atype a, btype b, ctype c, dtype d, etype e, ftype f)             \
index 04bd756efc6740e2b16385d4047f2ebb7ec1a86b..e86e4a938373e15a3a8edcbb07802a5c9274bb02 100644 (file)
@@ -156,7 +156,7 @@ extern __be32                       htonl(__u32);
 extern __u16                   ntohs(__be16);
 extern __be16                  htons(__u16);
 
-#if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__)
+#if defined(__GNUC__) && defined(__OPTIMIZE__)
 
 #define ___htonl(x) __cpu_to_be32(x)
 #define ___htons(x) __cpu_to_be16(x)
index 2f1cb775125abe39eef09908078a287bb763ec29..25f7f32883ec8667c4c464c2ff43f36a73aad27c 100644 (file)
 /*
  * Allow constant folding
  */
-#if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__)
+#if defined(__GNUC__) && defined(__OPTIMIZE__)
 #  define __swab16(x) \
 (__builtin_constant_p((__u16)(x)) ? \
  ___swab16((x)) : \
index d5f2a320510930ce7d673ed11ed2f30c96d5994f..ae5e5f914bf4a082b1f12e3956f4e868011710db 100644 (file)
@@ -77,7 +77,7 @@
 /*
  * Allow constant folding
  */
-#if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__)
+#if defined(__GNUC__) && defined(__OPTIMIZE__)
 #  define __swahw32(x) \
 (__builtin_constant_p((__u32)(x)) ? \
  ___swahw32((x)) : \
index 1527340554035850282979e5912ea02e0000f27d..2e05e1e6b0e652e471a5bff40c071dc2d40ffb14 100644 (file)
   ({ unsigned long __ptr;                                      \
     __asm__ ("" : "=g"(__ptr) : "0"(ptr));             \
     (typeof(ptr)) (__ptr + (off)); })
+
+
+#define inline         inline          __attribute__((always_inline))
+#define __inline__     __inline__      __attribute__((always_inline))
+#define __inline       __inline        __attribute__((always_inline))
+#define __deprecated                   __attribute__((deprecated))
+#define  noinline                      __attribute__((noinline))
+#define __attribute_pure__             __attribute__((pure))
+#define __attribute_const__            __attribute__((__const__))
index a6fa615afab5da1c2fe92da5509e5bab6953829e..4209082ee934bd788c8f67666360f3f39173cf5f 100644 (file)
@@ -3,29 +3,12 @@
 /* These definitions are for GCC v3.x.  */
 #include <linux/compiler-gcc.h>
 
-#if __GNUC_MINOR__ >= 1
-# define inline                inline          __attribute__((always_inline))
-# define __inline__    __inline__      __attribute__((always_inline))
-# define __inline      __inline        __attribute__((always_inline))
-#endif
-
-#if __GNUC_MINOR__ > 0
-# define __deprecated          __attribute__((deprecated))
-#endif
-
 #if __GNUC_MINOR__ >= 3
 # define __attribute_used__    __attribute__((__used__))
 #else
 # define __attribute_used__    __attribute__((__unused__))
 #endif
 
-#define __attribute_pure__     __attribute__((pure))
-#define __attribute_const__    __attribute__((__const__))
-
-#if __GNUC_MINOR__ >= 1
-#define  noinline              __attribute__((noinline))
-#endif
-
 #if __GNUC_MINOR__ >= 4
 #define __must_check           __attribute__((warn_unused_result))
 #endif
index 53686c037a062991dac3eee2101099a27b167c07..e913e9beaf6909ffbdd604f6759434de8dc213e8 100644 (file)
@@ -3,14 +3,7 @@
 /* These definitions are for GCC v4.x.  */
 #include <linux/compiler-gcc.h>
 
-#define inline                 inline          __attribute__((always_inline))
-#define __inline__             __inline__      __attribute__((always_inline))
-#define __inline               __inline        __attribute__((always_inline))
-#define __deprecated           __attribute__((deprecated))
 #define __attribute_used__     __attribute__((__used__))
-#define __attribute_pure__     __attribute__((pure))
-#define __attribute_const__    __attribute__((__const__))
-#define  noinline              __attribute__((noinline))
 #define __must_check           __attribute__((warn_unused_result))
 #define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
 
index b1e407a4fbda1ec9b101c5e0bd2c3c4378b7bb5b..ca7ff8fdd0907b8760fb5f656f50146beb387c42 100644 (file)
@@ -316,8 +316,6 @@ extern int randomize_va_space;
 #endif
 
 /* Trap pasters of __FUNCTION__ at compile-time */
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 95
 #define __FUNCTION__ (__func__)
-#endif
 
 #endif
index dc89116bb1ca997bef56f6e938f4f6080ee4f878..cd2773b29a642bb53c73e7c0dfe798b662b6733c 100644 (file)
@@ -26,11 +26,7 @@ static inline int has_secure_computing(struct thread_info *ti)
 
 #else /* CONFIG_SECCOMP */
 
-#if (__GNUC__ > 2)
-  typedef struct { } seccomp_t;
-#else
-  typedef struct { int gcc_is_buggy; } seccomp_t;
-#endif
+typedef struct { } seccomp_t;
 
 #define secure_computing(x) do { } while (0)
 /* static inline to preserve typechecking */
index def2d173a8db049db0b24c7ed6c2f1d26ee03038..04135b0e198e31bfca6c3d1bea508d9af638f4b4 100644 (file)
@@ -22,30 +22,16 @@ typedef struct {
 
 #else
 
-/*
- * All gcc 2.95 versions and early versions of 2.96 have a nasty bug
- * with empty initializers.
- */
-#if (__GNUC__ > 2)
 typedef struct { } raw_spinlock_t;
 
 #define __RAW_SPIN_LOCK_UNLOCKED { }
-#else
-typedef struct { int gcc_is_buggy; } raw_spinlock_t;
-#define __RAW_SPIN_LOCK_UNLOCKED (raw_spinlock_t) { 0 }
-#endif
 
 #endif
 
-#if (__GNUC__ > 2)
 typedef struct {
        /* no debug version on UP */
 } raw_rwlock_t;
 
 #define __RAW_RW_LOCK_UNLOCKED { }
-#else
-typedef struct { int gcc_is_buggy; } raw_rwlock_t;
-#define __RAW_RW_LOCK_UNLOCKED (raw_rwlock_t) { 0 }
-#endif
 
 #endif /* __LINUX_SPINLOCK_TYPES_UP_H */
index 679d0ae97e4fb61893956dda661831a21a1ece53..ed81eec6e732a4d566ae458b4a3c4d4b878b8e93 100644 (file)
@@ -115,18 +115,11 @@ MODULE_PARM_DESC(osrun_time, "how many seconds to wait for the ICS2115 OS");
 
 #ifdef WF_DEBUG
 
-#if defined(NEW_MACRO_VARARGS) || __GNUC__ >= 3
 #define DPRINT(cond, ...) \
        if ((dev->debug & (cond)) == (cond)) { \
             snd_printk (__VA_ARGS__); \
        }
 #else
-#define DPRINT(cond, args...) \
-       if ((dev->debug & (cond)) == (cond)) { \
-            snd_printk (args); \
-       }
-#endif
-#else
 #define DPRINT(cond, args...)
 #endif /* WF_DEBUG */