]> git.proxmox.com Git - pve-kernel-jessie.git/blame - intel-module-gcc6-compat.patch
add compat patches for intel network modules
[pve-kernel-jessie.git] / intel-module-gcc6-compat.patch
CommitLineData
174ba651
FG
1diff --git a/src/Makefile.orig b/src/Makefile
2index 8e962f7..50bcdcc 100644
3--- a/src/Makefile.orig
4+++ b/src/Makefile
5@@ -123,6 +123,13 @@ ifeq (,$(CC))
6 $(error Compiler not found)
7 endif
8
9+# workaround for GCC6's default PIE
10+ifeq ($(CC),gcc)
11+ PIE_TEST = [ -z "`$(CC) -fno-PIE -no-pie -x c -c /dev/null -o /dev/null 2>&1`" ]
12+ PIE_FLAGS := $(shell $(PIE_TEST) && echo '-fno-PIE -no-pie')
13+ EXTRA_CFLAGS += $(PIE_FLAGS)
14+endif
15+
16 # we need to know what platform the driver is being built on
17 # some additional features are only built on Intel platforms
18 ARCH := $(shell uname -m | sed 's/i.86/i386/')