Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Andrew Morton and committed by
Linus Torvalds
a1365647 fd285bb5

+37 -194
+5 -26
Documentation/Changes
··· 31 31 Eine deutsche Version dieser Datei finden Sie unter 32 32 <http://www.stefan-winter.de/Changes-2.4.0.txt>. 33 33 34 - Last updated: October 29th, 2002 35 - 36 34 Chris Ricker (kaboom@gatech.edu or chris.ricker@genetics.utah.edu). 37 35 38 36 Current Minimal Requirements ··· 46 48 hardware, for example, you probably needn't concern yourself with 47 49 isdn4k-utils. 48 50 49 - o Gnu C 2.95.3 # gcc --version 51 + o Gnu C 3.2 # gcc --version 50 52 o Gnu make 3.79.1 # make --version 51 53 o binutils 2.12 # ld -v 52 54 o util-linux 2.10o # fdformat --version ··· 72 74 --- 73 75 74 76 The gcc version requirements may vary depending on the type of CPU in your 75 - computer. The next paragraph applies to users of x86 CPUs, but not 76 - necessarily to users of other CPUs. Users of other CPUs should obtain 77 - information about their gcc version requirements from another source. 78 - 79 - The recommended compiler for the kernel is gcc 2.95.x (x >= 3), and it 80 - should be used when you need absolute stability. You may use gcc 3.0.x 81 - instead if you wish, although it may cause problems. Later versions of gcc 82 - have not received much testing for Linux kernel compilation, and there are 83 - almost certainly bugs (mainly, but not exclusively, in the kernel) that 84 - will need to be fixed in order to use these compilers. In any case, using 85 - pgcc instead of plain gcc is just asking for trouble. 86 - 87 - The Red Hat gcc 2.96 compiler subtree can also be used to build this tree. 88 - You should ensure you use gcc-2.96-74 or later. gcc-2.96-54 will not build 89 - the kernel correctly. 90 - 91 - In addition, please pay attention to compiler optimization. Anything 92 - greater than -O2 may not be wise. Similarly, if you choose to use gcc-2.95.x 93 - or derivatives, be sure not to use -fstrict-aliasing (which, depending on 94 - your version of gcc 2.95.x, may necessitate using -fno-strict-aliasing). 77 + computer. 95 78 96 79 Make 97 80 ---- ··· 301 322 Kernel compilation 302 323 ****************** 303 324 304 - gcc 2.95.3 305 - ---------- 306 - o <ftp://ftp.gnu.org/gnu/gcc/gcc-2.95.3.tar.gz> 325 + gcc 326 + --- 327 + o <ftp://ftp.gnu.org/gnu/gcc/> 307 328 308 329 Make 309 330 ----
+2 -5
README
··· 183 183 184 184 COMPILING the kernel: 185 185 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. 191 188 192 189 Please note that you can still run a.out user programs with this kernel. 193 190
+2 -7
arch/arm/kernel/asm-offsets.c
··· 23 23 #error Sorry, your compiler targets APCS-26 but this kernel requires APCS-32 24 24 #endif 25 25 /* 26 - * GCC 2.95.1, 2.95.2: ignores register clobber list in asm(). 27 26 * GCC 3.0, 3.1: general bad code generation. 28 27 * GCC 3.2.0: incorrect function argument offset calculation. 29 28 * GCC 3.2.x: miscompiles NEW_AUX_ENT in fs/binfmt_elf.c 30 29 * (http://gcc.gnu.org/PR8896) and incorrect structure 31 30 * initialisation in fs/jffs2/erase.c 32 31 */ 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) 38 33 #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 40 35 #endif 41 36 42 37 /* Use marker if you need to separate the values later */
-7
arch/arm26/kernel/asm-offsets.c
··· 25 25 #if defined(__APCS_32__) && defined(CONFIG_CPU_26) 26 26 #error Sorry, your compiler targets APCS-32 but this kernel requires APCS-26 27 27 #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 35 28 36 29 /* Use marker if you need to separate the values later */ 37 30
-4
arch/i386/Kconfig
··· 630 630 and passes the first three arguments of a function call in registers. 631 631 This will probably break binary only modules. 632 632 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 - 637 633 config SECCOMP 638 634 bool "Enable seccomp to safely compute untrusted bytecode" 639 635 depends on PROC_FS
+1 -4
arch/i386/Makefile
··· 37 37 # CPU-specific tuning. Anything which can be shared with UML should go here. 38 38 include $(srctree)/arch/i386/Makefile.cpu 39 39 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 44 41 45 42 # Disable unit-at-a-time mode, it makes gcc use a lot more stack 46 43 # due to the lack of sharing of stacklots.
+5 -5
arch/i386/Makefile.cpu
··· 1 1 # CPU tuning section - shared with UML. 2 2 # Must change only cflags-y (or [yn]), not CFLAGS! That makes a difference for UML. 3 3 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 5 5 HAS_MTUNE := $(call cc-option-yn, -mtune=i386) 6 6 ifeq ($(HAS_MTUNE),y) 7 7 tune = $(call cc-option,-mtune=$(1),) ··· 14 14 cflags-$(CONFIG_M486) += -march=i486 15 15 cflags-$(CONFIG_M586) += -march=i586 16 16 cflags-$(CONFIG_M586TSC) += -march=i586 17 - cflags-$(CONFIG_M586MMX) += $(call cc-option,-march=pentium-mmx,-march=i586) 17 + cflags-$(CONFIG_M586MMX) += -march=pentium-mmx 18 18 cflags-$(CONFIG_M686) += -march=i686 19 19 cflags-$(CONFIG_MPENTIUMII) += -march=i686 $(call tune,pentium2) 20 20 cflags-$(CONFIG_MPENTIUMIII) += -march=i686 $(call tune,pentium3) ··· 23 23 cflags-$(CONFIG_MK6) += -march=k6 24 24 # Please note, that patches that add -march=athlon-xp and friends are pointless. 25 25 # 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) 28 28 cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0 29 29 cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0 30 30 cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586) ··· 37 37 cflags-$(CONFIG_X86_ELAN) += -march=i486 38 38 39 39 # Geode GX1 support 40 - cflags-$(CONFIG_MGEODEGX1) += $(call cc-option,-march=pentium-mmx,-march=i486) 40 + cflags-$(CONFIG_MGEODEGX1) += -march=pentium-mmx 41 41
-4
arch/ia64/Makefile
··· 37 37 ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz) 38 38 endif 39 39 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 - 44 40 ifeq ($(GCC_VERSION),0304) 45 41 cflags-$(CONFIG_ITANIUM) += -mtune=merced 46 42 cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley
+1 -1
arch/ia64/kernel/head.S
··· 1060 1060 * the clobber lists for spin_lock() in include/asm-ia64/spinlock.h. 1061 1061 */ 1062 1062 1063 - #if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3) 1063 + #if (__GNUC__ == 3 && __GNUC_MINOR__ < 3) 1064 1064 1065 1065 GLOBAL_ENTRY(ia64_spinlock_contention_pre3_4) 1066 1066 .prologue
+1 -1
arch/ia64/kernel/ia64_ksyms.c
··· 103 103 104 104 #ifdef ASM_SUPPORTED 105 105 # ifdef CONFIG_SMP 106 - # if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3) 106 + # if (__GNUC__ == 3 && __GNUC_MINOR__ < 3) 107 107 /* 108 108 * This is not a normal routine and we don't want a function descriptor for it, so we use 109 109 * a fake declaration here.
+1 -1
arch/ia64/oprofile/backtrace.c
··· 32 32 u64 *prev_pfs_loc; /* state for WAR for old spinlock ool code */ 33 33 } ia64_backtrace_t; 34 34 35 - #if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3) 35 + #if (__GNUC__ == 3 && __GNUC_MINOR__ < 3) 36 36 /* 37 37 * Returns non-zero if the PC is in the spinlock contention out-of-line code 38 38 * with non-standard calling sequence (on older compilers).
-6
drivers/md/raid0.c
··· 306 306 printk("raid0 : conf->hash_spacing is %llu blocks.\n", 307 307 (unsigned long long)conf->hash_spacing); 308 308 { 309 - #if __GNUC__ < 3 310 - volatile 311 - #endif 312 309 sector_t s = mddev->array_size; 313 310 sector_t space = conf->hash_spacing; 314 311 int round; ··· 436 439 437 440 438 441 { 439 - #if __GNUC__ < 3 440 - volatile 441 - #endif 442 442 sector_t x = block >> conf->preshift; 443 443 sector_div(x, (u32)conf->hash_spacing); 444 444 zone = conf->hash_table[x];
-2
drivers/media/video/v4l2-common.c
··· 191 191 }; 192 192 193 193 char *v4l2_ioctl_names[256] = { 194 - #if __GNUC__ >= 3 195 194 [0 ... 255] = "UNKNOWN", 196 - #endif 197 195 [_IOC_NR(VIDIOC_QUERYCAP)] = "VIDIOC_QUERYCAP", 198 196 [_IOC_NR(VIDIOC_RESERVED)] = "VIDIOC_RESERVED", 199 197 [_IOC_NR(VIDIOC_ENUM_FMT)] = "VIDIOC_ENUM_FMT",
+3 -4
fs/ocfs2/cluster/masklog.h
··· 212 212 mlog(ML_ENTRY, "ENTRY:\n"); \ 213 213 } while (0) 214 214 215 - /* We disable this for old compilers since they don't have support for 216 - * __builtin_types_compatible_p. 215 + /* 216 + * We disable this for sparse. 217 217 */ 218 - #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) && \ 219 - !defined(__CHECKER__) 218 + #if !defined(__CHECKER__) 220 219 #define mlog_exit(st) do { \ 221 220 if (__builtin_types_compatible_p(typeof(st), unsigned long)) \ 222 221 mlog(ML_EXIT, "EXIT: %lu\n", (unsigned long) (st)); \
+1 -7
fs/xfs/xfs_log.h
··· 30 30 * By comparing each compnent, we don't have to worry about extra 31 31 * endian issues in treating two 32 bit numbers as one 64 bit number 32 32 */ 33 - static 34 - #if defined(__GNUC__) && (__GNUC__ == 2) && ( (__GNUC_MINOR__ == 95) || (__GNUC_MINOR__ == 96)) 35 - __attribute__((unused)) /* gcc 2.95, 2.96 miscompile this when inlined */ 36 - #else 37 - __inline__ 38 - #endif 39 - xfs_lsn_t _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2) 33 + static inline xfs_lsn_t _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2) 40 34 { 41 35 if (CYCLE_LSN(lsn1) != CYCLE_LSN(lsn2)) 42 36 return (CYCLE_LSN(lsn1)<CYCLE_LSN(lsn2))? -999 : 999;
-2
include/asm-alpha/compiler.h
··· 98 98 #undef inline 99 99 #undef __inline__ 100 100 #undef __inline 101 - #if __GNUC__ == 3 && __GNUC_MINOR__ >= 1 || __GNUC__ > 3 102 101 #undef __always_inline 103 102 #define __always_inline inline __attribute__((always_inline)) 104 - #endif 105 103 106 104 #endif /* __ALPHA_COMPILER_H */
-21
include/asm-alpha/processor.h
··· 77 77 #define spin_lock_prefetch(lock) do { } while (0) 78 78 #endif 79 79 80 - #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) 81 80 extern inline void prefetch(const void *ptr) 82 81 { 83 82 __builtin_prefetch(ptr, 0, 3); ··· 93 94 __builtin_prefetch(ptr, 1, 3); 94 95 } 95 96 #endif 96 - 97 - #else 98 - extern inline void prefetch(const void *ptr) 99 - { 100 - __asm__ ("ldl $31,%0" : : "m"(*(char *)ptr)); 101 - } 102 - 103 - extern inline void prefetchw(const void *ptr) 104 - { 105 - __asm__ ("ldq $31,%0" : : "m"(*(char *)ptr)); 106 - } 107 - 108 - #ifdef CONFIG_SMP 109 - extern inline void spin_lock_prefetch(const void *ptr) 110 - { 111 - __asm__ ("ldq $31,%0" : : "m"(*(char *)ptr)); 112 - } 113 - #endif 114 - 115 - #endif /* GCC 3.1 */ 116 97 117 98 #endif /* __ASM_ALPHA_PROCESSOR_H */
+1 -5
include/asm-ia64/bug.h
··· 2 2 #define _ASM_IA64_BUG_H 3 3 4 4 #ifdef CONFIG_BUG 5 - #if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) 6 - # define ia64_abort() __builtin_trap() 7 - #else 8 - # define ia64_abort() (*(volatile int *) 0 = 0) 9 - #endif 5 + #define ia64_abort() __builtin_trap() 10 6 #define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); ia64_abort(); } while (0) 11 7 12 8 /* should this BUG be made generic? */
+1 -1
include/asm-ia64/spinlock.h
··· 34 34 { 35 35 register volatile unsigned int *ptr asm ("r31") = &lock->lock; 36 36 37 - #if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3) 37 + #if (__GNUC__ == 3 && __GNUC_MINOR__ < 3) 38 38 # ifdef CONFIG_ITANIUM 39 39 /* don't use brl on Itanium... */ 40 40 asm volatile ("{\n\t"
-4
include/asm-sparc64/system.h
··· 193 193 * not preserve it's value. Hairy, but it lets us remove 2 loads 194 194 * and 2 stores in this critical code path. -DaveM 195 195 */ 196 - #if __GNUC__ >= 3 197 196 #define EXTRA_CLOBBER ,"%l1" 198 - #else 199 - #define EXTRA_CLOBBER 200 - #endif 201 197 #define switch_to(prev, next, last) \ 202 198 do { if (test_thread_flag(TIF_PERFCTR)) { \ 203 199 unsigned long __tmp; \
-4
include/asm-um/rwsem.h
··· 1 1 #ifndef __UM_RWSEM_H__ 2 2 #define __UM_RWSEM_H__ 3 3 4 - #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96) 5 - #define __builtin_expect(exp,c) (exp) 6 - #endif 7 - 8 4 #include "asm/arch/rwsem.h" 9 5 10 6 #endif
-18
include/asm-v850/unistd.h
··· 241 241 /* User programs sometimes end up including this header file 242 242 (indirectly, via uClibc header files), so I'm a bit nervous just 243 243 including <linux/compiler.h>. */ 244 - #if !defined(__builtin_expect) && __GNUC__ == 2 && __GNUC_MINOR__ < 96 245 - #define __builtin_expect(x, expected_value) (x) 246 - #endif 247 244 248 245 #define __syscall_return(type, res) \ 249 246 do { \ ··· 343 346 __syscall_return (type, __ret); \ 344 347 } 345 348 346 - #if __GNUC__ < 3 347 - /* In older versions of gcc, `asm' statements with more than 10 348 - input/output arguments produce a fatal error. To work around this 349 - problem, we use two versions, one for gcc-3.x and one for earlier 350 - versions of gcc (the `earlier gcc' version doesn't work with gcc-3.x 351 - because gcc-3.x doesn't allow clobbers to also be input arguments). */ 352 - #define __SYSCALL6_TRAP(syscall, ret, a, b, c, d, e, f) \ 353 - __asm__ __volatile__ ("trap " SYSCALL_LONG_TRAP \ 354 - : "=r" (ret), "=r" (syscall) \ 355 - : "1" (syscall), \ 356 - "r" (a), "r" (b), "r" (c), "r" (d), \ 357 - "r" (e), "r" (f) \ 358 - : SYSCALL_CLOBBERS, SYSCALL_ARG4, SYSCALL_ARG5); 359 - #else /* __GNUC__ >= 3 */ 360 349 #define __SYSCALL6_TRAP(syscall, ret, a, b, c, d, e, f) \ 361 350 __asm__ __volatile__ ("trap " SYSCALL_LONG_TRAP \ 362 351 : "=r" (ret), "=r" (syscall), \ ··· 351 368 "r" (a), "r" (b), "r" (c), "r" (d), \ 352 369 "2" (e), "3" (f) \ 353 370 : SYSCALL_CLOBBERS); 354 - #endif 355 371 356 372 #define _syscall6(type, name, atype, a, btype, b, ctype, c, dtype, d, etype, e, ftype, f) \ 357 373 type name (atype a, btype b, ctype c, dtype d, etype e, ftype f) \
+1 -1
include/linux/byteorder/generic.h
··· 156 156 extern __u16 ntohs(__be16); 157 157 extern __be16 htons(__u16); 158 158 159 - #if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) 159 + #if defined(__GNUC__) && defined(__OPTIMIZE__) 160 160 161 161 #define ___htonl(x) __cpu_to_be32(x) 162 162 #define ___htons(x) __cpu_to_be16(x)
+1 -1
include/linux/byteorder/swab.h
··· 110 110 /* 111 111 * Allow constant folding 112 112 */ 113 - #if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) 113 + #if defined(__GNUC__) && defined(__OPTIMIZE__) 114 114 # define __swab16(x) \ 115 115 (__builtin_constant_p((__u16)(x)) ? \ 116 116 ___swab16((x)) : \
+1 -1
include/linux/byteorder/swabb.h
··· 77 77 /* 78 78 * Allow constant folding 79 79 */ 80 - #if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) 80 + #if defined(__GNUC__) && defined(__OPTIMIZE__) 81 81 # define __swahw32(x) \ 82 82 (__builtin_constant_p((__u32)(x)) ? \ 83 83 ___swahw32((x)) : \
+9
include/linux/compiler-gcc.h
··· 15 15 ({ unsigned long __ptr; \ 16 16 __asm__ ("" : "=g"(__ptr) : "0"(ptr)); \ 17 17 (typeof(ptr)) (__ptr + (off)); }) 18 + 19 + 20 + #define inline inline __attribute__((always_inline)) 21 + #define __inline__ __inline__ __attribute__((always_inline)) 22 + #define __inline __inline __attribute__((always_inline)) 23 + #define __deprecated __attribute__((deprecated)) 24 + #define noinline __attribute__((noinline)) 25 + #define __attribute_pure__ __attribute__((pure)) 26 + #define __attribute_const__ __attribute__((__const__))
-17
include/linux/compiler-gcc3.h
··· 3 3 /* These definitions are for GCC v3.x. */ 4 4 #include <linux/compiler-gcc.h> 5 5 6 - #if __GNUC_MINOR__ >= 1 7 - # define inline inline __attribute__((always_inline)) 8 - # define __inline__ __inline__ __attribute__((always_inline)) 9 - # define __inline __inline __attribute__((always_inline)) 10 - #endif 11 - 12 - #if __GNUC_MINOR__ > 0 13 - # define __deprecated __attribute__((deprecated)) 14 - #endif 15 - 16 6 #if __GNUC_MINOR__ >= 3 17 7 # define __attribute_used__ __attribute__((__used__)) 18 8 #else 19 9 # define __attribute_used__ __attribute__((__unused__)) 20 - #endif 21 - 22 - #define __attribute_pure__ __attribute__((pure)) 23 - #define __attribute_const__ __attribute__((__const__)) 24 - 25 - #if __GNUC_MINOR__ >= 1 26 - #define noinline __attribute__((noinline)) 27 10 #endif 28 11 29 12 #if __GNUC_MINOR__ >= 4
-7
include/linux/compiler-gcc4.h
··· 3 3 /* These definitions are for GCC v4.x. */ 4 4 #include <linux/compiler-gcc.h> 5 5 6 - #define inline inline __attribute__((always_inline)) 7 - #define __inline__ __inline__ __attribute__((always_inline)) 8 - #define __inline __inline __attribute__((always_inline)) 9 - #define __deprecated __attribute__((deprecated)) 10 6 #define __attribute_used__ __attribute__((__used__)) 11 - #define __attribute_pure__ __attribute__((pure)) 12 - #define __attribute_const__ __attribute__((__const__)) 13 - #define noinline __attribute__((noinline)) 14 7 #define __must_check __attribute__((warn_unused_result)) 15 8 #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) 16 9
-2
include/linux/kernel.h
··· 316 316 #endif 317 317 318 318 /* Trap pasters of __FUNCTION__ at compile-time */ 319 - #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 320 319 #define __FUNCTION__ (__func__) 321 - #endif 322 320 323 321 #endif
+1 -5
include/linux/seccomp.h
··· 26 26 27 27 #else /* CONFIG_SECCOMP */ 28 28 29 - #if (__GNUC__ > 2) 30 - typedef struct { } seccomp_t; 31 - #else 32 - typedef struct { int gcc_is_buggy; } seccomp_t; 33 - #endif 29 + typedef struct { } seccomp_t; 34 30 35 31 #define secure_computing(x) do { } while (0) 36 32 /* static inline to preserve typechecking */
-14
include/linux/spinlock_types_up.h
··· 22 22 23 23 #else 24 24 25 - /* 26 - * All gcc 2.95 versions and early versions of 2.96 have a nasty bug 27 - * with empty initializers. 28 - */ 29 - #if (__GNUC__ > 2) 30 25 typedef struct { } raw_spinlock_t; 31 26 32 27 #define __RAW_SPIN_LOCK_UNLOCKED { } 33 - #else 34 - typedef struct { int gcc_is_buggy; } raw_spinlock_t; 35 - #define __RAW_SPIN_LOCK_UNLOCKED (raw_spinlock_t) { 0 } 36 - #endif 37 28 38 29 #endif 39 30 40 - #if (__GNUC__ > 2) 41 31 typedef struct { 42 32 /* no debug version on UP */ 43 33 } raw_rwlock_t; 44 34 45 35 #define __RAW_RW_LOCK_UNLOCKED { } 46 - #else 47 - typedef struct { int gcc_is_buggy; } raw_rwlock_t; 48 - #define __RAW_RW_LOCK_UNLOCKED (raw_rwlock_t) { 0 } 49 - #endif 50 36 51 37 #endif /* __LINUX_SPINLOCK_TYPES_UP_H */
-7
sound/isa/wavefront/wavefront_synth.c
··· 115 115 116 116 #ifdef WF_DEBUG 117 117 118 - #if defined(NEW_MACRO_VARARGS) || __GNUC__ >= 3 119 118 #define DPRINT(cond, ...) \ 120 119 if ((dev->debug & (cond)) == (cond)) { \ 121 120 snd_printk (__VA_ARGS__); \ 122 121 } 123 - #else 124 - #define DPRINT(cond, args...) \ 125 - if ((dev->debug & (cond)) == (cond)) { \ 126 - snd_printk (args); \ 127 - } 128 - #endif 129 122 #else 130 123 #define DPRINT(cond, args...) 131 124 #endif /* WF_DEBUG */