summaryrefslogtreecommitdiff
path: root/gcc/configure
diff options
context:
space:
mode:
authorktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-22 14:16:41 +0000
committerktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-22 14:16:41 +0000
commitca06e9a56f15ca9ce37d7577292709b2c9bbb6ba (patch)
tree7dc2b7d7f0eaecfa789b2f5b8f781e385c6dca7d /gcc/configure
parente53a4d49c3d03ab8eaddb073cf972c1c46d75338 (diff)
downloadgcc-ca06e9a56f15ca9ce37d7577292709b2c9bbb6ba.tar.gz
config changes for musl libc support
On behalf of Szabolcs.Nagy@arm.com 2015-04-22 Gregor Richards <gregor.richards@uwaterloo.ca> * config.gcc (LIBC_MUSL): New tm_defines macro. * config/linux.h (OPTION_MUSL): Define. (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. * config/linux.opt (mmusl): New option. * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*. (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222326 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure')
-rwxr-xr-xgcc/configure7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/configure b/gcc/configure
index 9523773e721..5345f695404 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -27678,6 +27678,9 @@ if test "${gcc_cv_libc_provides_ssp+set}" = set; then :
else
gcc_cv_libc_provides_ssp=no
case "$target" in
+ *-*-musl*)
+ # All versions of musl provide stack protector
+ gcc_cv_libc_provides_ssp=yes;;
*-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
# glibc 2.4 and later provides __stack_chk_fail and
# either __stack_chk_guard, or TLS access to stack guard canary.
@@ -27710,6 +27713,7 @@ fi
# <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
# simply assert that glibc does provide this, which is true for all
# realistically usable GNU/Hurd configurations.
+ # All supported versions of musl provide it as well
gcc_cv_libc_provides_ssp=yes;;
*-*-darwin* | *-*-freebsd*)
ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
@@ -27806,6 +27810,9 @@ case "$target" in
gcc_cv_target_dl_iterate_phdr=no
fi
;;
+ *-linux-musl*)
+ gcc_cv_target_dl_iterate_phdr=yes
+ ;;
esac
if test x$gcc_cv_target_dl_iterate_phdr = xyes; then