intel-module-gcc6-compat.patch 610 B

123456789101112131415161718
  1. diff --git a/src/Makefile.orig b/src/Makefile
  2. index 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. +# workaround for GCC6's default PIE
  9. +ifeq ($(CC),gcc)
  10. + PIE_TEST = [ -z "`$(CC) -fno-PIE -no-pie -x c -c /dev/null -o /dev/null 2>&1`" ]
  11. + PIE_FLAGS := $(shell $(PIE_TEST) && echo '-fno-PIE -no-pie')
  12. + EXTRA_CFLAGS += $(PIE_FLAGS)
  13. +endif
  14. +
  15. # we need to know what platform the driver is being built on
  16. # some additional features are only built on Intel platforms
  17. ARCH := $(shell uname -m | sed 's/i.86/i386/')