lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1284408880-14414-3-git-send-email-hpa@linux.intel.com>
Date:	Mon, 13 Sep 2010 13:14:37 -0700
From:	"H. Peter Anvin" <hpa@...ux.intel.com>
To:	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Cc:	Florian Mickler <florian@...kler.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Russell King <linux@....linux.org.uk>,
	Mike Frysinger <vapier@...too.org>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	"H. Peter Anvin" <hpa@...ux.intel.com>
Subject: [PATCH 2/5] x86, gcc: Disallow building Linux/x86 with gcc 3.x/4.0

We are starting to get "straggler problems" with people compiling
current Linux kernels with now-ancient versions of gcc.  All the
development is being done against gcc 4.x; this simply disallows gcc
4.0 or earlier.

We disallow 4.0 as well as 3.x because 4.0 had a fair share of bugs
especially around asm() statements; this allows us to remove those
workarounds.

Signed-off-by: H. Peter Anvin <hpa@...ux.intel.com>
---
 arch/x86/kernel/Makefile   |    3 ++-
 arch/x86/kernel/compiler.c |    5 +++++
 2 files changed, 7 insertions(+), 1 deletions(-)
 create mode 100644 arch/x86/kernel/compiler.c

diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 0925676..a6459b7 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -29,7 +29,8 @@ GCOV_PROFILE_hpet.o		:= n
 GCOV_PROFILE_tsc.o		:= n
 GCOV_PROFILE_paravirt.o		:= n
 
-obj-y			:= process_$(BITS).o signal.o entry_$(BITS).o
+obj-y			:= compiler.o
+obj-y			+= process_$(BITS).o signal.o entry_$(BITS).o
 obj-y			+= traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
 obj-y			+= time.o ioport.o ldt.o dumpstack.o
 obj-y			+= setup.o x86_init.o i8259.o irqinit.o
diff --git a/arch/x86/kernel/compiler.c b/arch/x86/kernel/compiler.c
new file mode 100644
index 0000000..8914974
--- /dev/null
+++ b/arch/x86/kernel/compiler.c
@@ -0,0 +1,5 @@
+#if __GNUC__ < 4
+#error "Compiling Linux/x86 with gcc 3.x is no longer supported"
+#elif __GNUC__ == 4 && __GNUC_MINOR__ < 1
+#error "Compiling Linux/x86 with gcc 4.0 is not supported"
+#endif
-- 
1.7.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ