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-next>] [day] [month] [year] [list]
Date:	Wed, 15 Apr 2015 12:45:43 -0700
From:	Andi Kleen <andi@...stfloor.org>
To:	akpm@...ux-foundation.org
Cc:	mmarek@...e.cz, linux-kbuild@...r.kernel.org,
	linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
	Segher Boessenkool <segher@...nel.crashing.org>
Subject: [PATCH] Support gcc 6 for building

From: Andi Kleen <ak@...ux.intel.com>

gcc recently switched to a new version number scheme, where every version
gets a new major version number. The current version is 5.x, the next 6.x, etc.

The gcc git repository trunk branch just switched to report 6.x for the next
major release.

This breaks the way Linux selects compiler-gccX.h based on the major
version. Every new version would require adding a new compiler-gccX.h file,
which wouldn't really scale.

Let's assume that future gccs are fairly compatible (they are unlikely
to break anything Linux is relying on). So we can just keep using
compiler-gcc5.h, and select any specific differences with #if.

Cc: Segher Boessenkool <segher@...nel.crashing.org>
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
 include/linux/compiler-gcc.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index cdf13ca..9c9a4e4 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -104,7 +104,12 @@
 #define __gcc_header(x) #x
 #define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
 #define gcc_header(x) _gcc_header(x)
-#include gcc_header(__GNUC__)
+#if __GNUC__ < 5
+#define __LINUX_GCC_VERSION __GNUC__
+#else
+#define __LINUX_GCC_VERSION 5
+#endif
+#include gcc_header(__LINUX_GCC_VERSION)
 
 #if !defined(__noclone)
 #define __noclone	/* not needed */
-- 
2.3.3

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