You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
949 B

  1. commit 1877bc9d8f2be143fbe530347a945850d0ecd234
  2. Author: Steven Barth <cyrus@openwrt.org>
  3. Date: Mon Jun 22 10:31:07 2015 +0000
  4. gcc/musl: rework SSP-support
  5. Make musl provide libssp_nonshared.a and make GCC link it unconditionally
  6. if musl is used. This should be a no-op if SSP is disabled and seems to be
  7. the only reliable way of dealing with SSP over all packages due to the mess
  8. that is linkerflags handling in packages.
  9. Signed-off-by: Steven Barth <steven@midlink.org>
  10. SVN-Revision: 46108
  11. --- a/gcc/gcc.c
  12. +++ b/gcc/gcc.c
  13. @@ -861,7 +861,9 @@ proper position among the other output f
  14. #endif
  15. #ifndef LINK_SSP_SPEC
  16. -#ifdef TARGET_LIBC_PROVIDES_SSP
  17. +#if DEFAULT_LIBC == LIBC_MUSL
  18. +#define LINK_SSP_SPEC "-lssp_nonshared"
  19. +#elif defined(TARGET_LIBC_PROVIDES_SSP)
  20. #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
  21. "|fstack-protector-strong|fstack-protector-explicit:}"
  22. #else