From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
To: gcc-patches@gcc.gnu.org,
Dragan Mladjenovic <Dragan.Mladjenovic@syrmia.com>
Cc: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Subject: [PATCH] configure: define TARGET_LIBC_GNUSTACK on musl
Date: Mon, 15 Nov 2021 00:25:37 -0800 [thread overview]
Message-ID: <20211115082537.381066-1-ilya.lipnitskiy@gmail.com> (raw)
musl only uses PT_GNU_STACK to set default thread stack size and has no
executable stack support[0], so there is no reason not to emit the
.note.GNU-stack section on musl builds.
[0]: https://lore.kernel.org/all/20190423192534.GN23599@brightrain.aerifal.cx/T/#u
gcc/ChangeLog:
* configure: Regenerate.
* configure.ac: define TARGET_LIBC_GNUSTACK on musl
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
gcc/configure | 3 +++
gcc/configure.ac | 3 +++
2 files changed, 6 insertions(+)
diff --git a/gcc/configure b/gcc/configure
index 920868bcd33d..366d6d969f45 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -31263,6 +31263,9 @@ if test $glibc_version_major -gt 2 \
gcc_cv_libc_gnustack=yes
fi
;;
+ mips*-*-linux-musl*)
+ gcc_cv_libc_gnustack=yes
+ ;;
esac
if test x$gcc_cv_libc_gnustack = xyes; then
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 065080a4b399..56d5bb7785a8 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -6950,6 +6950,9 @@ case "$target" in
mips*-*-linux*)
GCC_GLIBC_VERSION_GTE_IFELSE([2], [31], [gcc_cv_libc_gnustack=yes], )
;;
+ mips*-*-linux-musl*)
+ gcc_cv_libc_gnustack=yes
+ ;;
esac
if test x$gcc_cv_libc_gnustack = xyes; then
AC_DEFINE(TARGET_LIBC_GNUSTACK, 1,
--
2.33.1
next reply other threads:[~2021-11-15 8:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 8:25 Ilya Lipnitskiy [this message]
2021-11-15 22:50 ` Jeff Law
2021-11-16 5:10 ` Ilya Lipnitskiy
2021-11-16 5:13 ` [PATCH v2] " Ilya Lipnitskiy
2021-11-16 14:40 ` Dragan Mladjenovic
2021-11-16 16:25 ` [musl] " Rich Felker
2021-11-16 17:49 ` Ilya Lipnitskiy
2021-12-02 20:48 ` Jeff Law
2021-12-02 20:59 ` Ilya Lipnitskiy
2021-12-02 21:12 ` Jeff Law
2021-11-23 0:30 ` [PATCH] " Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211115082537.381066-1-ilya.lipnitskiy@gmail.com \
--to=ilya.lipnitskiy@gmail.com \
--cc=Dragan.Mladjenovic@syrmia.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).