diff mbox series

toolchain/gcc: ensure PT_GNU_STACK usage with musl

Message ID 20211115045104.2485575-1-ilya.lipnitskiy@gmail.com
State Superseded
Headers show
Series toolchain/gcc: ensure PT_GNU_STACK usage with musl | expand

Commit Message

Ilya Lipnitskiy Nov. 15, 2021, 4:51 a.m. UTC
musl supports it since v1.1.21, but GCC only automatically enables it
for glibc 2.31+

Link: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=54b3d52c3cca836c7c4c08cc9c02eda6c096372a

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
 toolchain/gcc/final/Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

Ilya Lipnitskiy Nov. 15, 2021, 6:14 a.m. UTC | #1
On Sun, Nov 14, 2021 at 8:51 PM Ilya Lipnitskiy
<ilya.lipnitskiy@gmail.com> wrote:
>
> musl supports it since v1.1.21, but GCC only automatically enables it
> for glibc 2.31+
>
> Link: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=54b3d52c3cca836c7c4c08cc9c02eda6c096372a
>
> Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
> ---
>  toolchain/gcc/final/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/toolchain/gcc/final/Makefile b/toolchain/gcc/final/Makefile
> index 0315b9d1f163..ccdd368b6831 100644
> --- a/toolchain/gcc/final/Makefile
> +++ b/toolchain/gcc/final/Makefile
> @@ -17,6 +17,7 @@ endif
>
>  ifdef CONFIG_USE_MUSL
>    GCC_MAKE += gcc_cv_libc_provides_ssp=yes
> +  GCC_MAKE += gcc_cv_libc_gnustack=yes
>  endif
>
>  ifneq ($(CONFIG_SJLJ_EXCEPTIONS),)
> --
> 2.33.1
>
Do not apply this - I will send a v2 shortly to properly emit
PT_GNU_STACK with an upstream patch.
diff mbox series

Patch

diff --git a/toolchain/gcc/final/Makefile b/toolchain/gcc/final/Makefile
index 0315b9d1f163..ccdd368b6831 100644
--- a/toolchain/gcc/final/Makefile
+++ b/toolchain/gcc/final/Makefile
@@ -17,6 +17,7 @@  endif
 
 ifdef CONFIG_USE_MUSL
   GCC_MAKE += gcc_cv_libc_provides_ssp=yes
+  GCC_MAKE += gcc_cv_libc_gnustack=yes
 endif
 
 ifneq ($(CONFIG_SJLJ_EXCEPTIONS),)