0006-defaultpie.diff 684 B

12345678910111213141516171819
  1. --- gcc-5.2.0.orig/gcc/gcc.c 2015-03-10 09:37:41.000000000 +0000
  2. +++ gcc-5.2.0/gcc/gcc.c 2015-08-25 07:47:12.895060530 +0000
  3. @@ -1012,10 +1012,15 @@
  4. #define CILK_SELF_SPECS "%{fcilkplus: -pthread}"
  5. #endif
  6. +/* Default to PIE */
  7. +#ifndef PIE_SELF_SPECS
  8. +#define PIE_SELF_SPECS "%{shared|pie|r|nostdlib|nopie:;:-pie} %{fpic|fPIC|fpie|fPIE|fno-pic|fno-PIC|fno-pie|fno-PIE|D__KERNEL__:;:-fPIE}"
  9. +#endif
  10. +
  11. static const char *const driver_self_specs[] = {
  12. "%{fdump-final-insns:-fdump-final-insns=.} %<fdump-final-insns",
  13. DRIVER_SELF_SPECS, CONFIGURE_SPECS, GOMP_SELF_SPECS, GTM_SELF_SPECS,
  14. - CILK_SELF_SPECS
  15. + CILK_SELF_SPECS, PIE_SELF_SPECS
  16. };
  17. #ifndef OPTION_DEFAULT_SPECS