All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] remove all content specific to GCC < 3.2??
@ 2007-06-07 16:17 Robert P. J. Day
  2007-06-07 17:10 ` Adrian Bunk
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Robert P. J. Day @ 2007-06-07 16:17 UTC (permalink / raw)
  To: kernel-janitors


  is it relatively safe to strip the kernel tree of any content that
is conditional upon unacceptably old versions of GCC?

  the header file linux/compiler.h already rejects the use of old gnu
compilers:

...
#if __GNUC__ >= 4
# include <linux/compiler-gcc4.h>
#elif __GNUC__ = 3 && __GNUC_MINOR__ >= 2
# include <linux/compiler-gcc3.h>
#else
# error Sorry, your compiler is too old/not recognized.
#endif
...

so clearly any gcc < 3.2 is dead in the water, which suggests that any
content dependent on that can be tossed as well.  as a starting point,
one can search for the macro __GNUC_MINOR__ to find:

arch/arm/kernel/asm-offsets.c:#if (__GNUC__ = 3 && __GNUC_MINOR__ < 3)
arch/ia64/kernel/head.S:#if (__GNUC__ = 3 && __GNUC_MINOR__ < 3)
arch/ia64/kernel/ia64_ksyms.c:#  if (__GNUC__ = 3 && __GNUC_MINOR__ < 3)
arch/ia64/oprofile/backtrace.c:#if (__GNUC__ = 3 && __GNUC_MINOR__ < 3)
include/asm-mips/compiler.h:#if __GNUC__ > 3 || (__GNUC__ = 3 && __GNUC_MINOR__ >= 4)
include/asm-alpha/compiler.h:#if __GNUC__ = 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3
include/asm-alpha/compiler.h:# if __GNUC__ = 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3
include/asm-s390/irqflags.h:#if __GNUC__ > 3 || (__GNUC__ = 3 && __GNUC_MINOR__ > 2)
include/asm-s390/bitops.h:#if __GNUC__ > 3 || (__GNUC__ = 3 && __GNUC_MINOR__ > 2)
include/asm-s390/bitops.h:#if __GNUC__ > 3 || (__GNUC__ = 3 && __GNUC_MINOR__ > 2)
include/asm-s390/spinlock.h:#if __GNUC__ > 3 || (__GNUC__ = 3 && __GNUC_MINOR__ > 2)
include/asm-s390/atomic.h:#if __GNUC__ > 3 || (__GNUC__ = 3 && __GNUC_MINOR__ > 2)
include/asm-s390/atomic.h:#if __GNUC__ > 3 || (__GNUC__ = 3 && __GNUC_MINOR__ > 2)
include/asm-s390/atomic.h:#if __GNUC__ > 3 || (__GNUC__ = 3 && __GNUC_MINOR__ > 2)
include/asm-s390/atomic.h:#if __GNUC__ > 3 || (__GNUC__ = 3 && __GNUC_MINOR__ > 2)
include/asm-s390/timex.h:#if __GNUC__ > 3 || (__GNUC__ = 3 && __GNUC_MINOR__ > 2)
include/asm-s390/timex.h:#if __GNUC__ > 3 || (__GNUC__ = 3 && __GNUC_MINOR__ > 2)
include/asm-sparc/bug.h:    (__GNUC__ = 3 && __GNUC_MINOR__ > 3) || \
include/asm-sparc/bug.h:    (__GNUC__ = 3 && __GNUC_MINOR__ = 3 && __GNUC_PATCHLEVEL__ >= 4)
include/asm-ia64/spinlock.h:#if (__GNUC__ = 3 && __GNUC_MINOR__ < 3)
include/asm-ia64/gcc_intrin.h:#if __GNUC__ >= 4 || (__GNUC__ = 3 && __GNUC_MINOR__ >= 4)
include/asm-ia64/module.h:	"gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__)
include/linux/compiler.h:#elif __GNUC__ = 3 && __GNUC_MINOR__ >= 2
include/linux/compiler-gcc3.h:#if __GNUC_MINOR__ >= 3
include/linux/compiler-gcc3.h:#if __GNUC_MINOR__ >= 4
include/asm-x86_64/bitops.h:#if __GNUC__ < 4 || (__GNUC__ = 4 && __GNUC_MINOR__ < 1)
init/main.c:#if (__GNUC__ < 3) || (__GNUC__ = 3 && __GNUC_MINOR__ < 2)
init/main.c:#if __GNUC__ = 4 && __GNUC_MINOR__ = 1 && __GNUC_PATCHLEVEL__ = 0
scripts/gcc-version.sh:MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1)

  seems like a lot of that can be removed.  anyone want to deal with
that if it seems like a viable project?

rday

p.s.  obviously, there might be more than what's listed above, i just
did a quick grep off the top of my head.

-- 
====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
====================================
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-08  9:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-07 16:17 [KJ] remove all content specific to GCC < 3.2?? Robert P. J. Day
2007-06-07 17:10 ` Adrian Bunk
2007-06-07 17:29 ` Robert P. J. Day
2007-06-08  9:21 ` walter harms

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.