Files
guix-mirror/gnu/packages/patches/simple-cc-noexec-stack.patch
Sören Tempel 2c343b8136 gnu: Add simple-cc.
* gnu/packages/c.scm (simple-cc): New variable.
* gnu/packages/patches/simple-cc-path-max.patch: New patch.
* gnu/packages/patches/simple-cc-qbebin.patch: New patch.
* gnu/packages/patches/simple-cc-wcsrtombs.patch: New patch.
* gnu/packages/patches/simple-cc-noexec-stack.patch: New patch.
* gnu/local.mk: (dist_patch_DATA): Register patches.

Change-Id: Ia72acc15c646ef2dc20afc86077ca1057b718370
2026-06-07 21:16:55 +02:00

20 lines
674 B
Diff

Make the stack non-executable
Otherwise, binutil's ld will emit the following warning on each scc(1) invocation:
ld: warning: _sys_brk.6l: missing .note.GNU-stack section implies executable stack
ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
diff --git a/include/scc/bits/scc/sys-scc.h b/include/scc/bits/scc/sys-scc.h
index 9d6ae86b..85a37ecd 100644
--- a/include/scc/bits/scc/sys-scc.h
+++ b/include/scc/bits/scc/sys-scc.h
@@ -13,6 +13,7 @@ char *sysincludes[] = {
/* configure below your system linker command line */
char *ldcmd[] = {
"-static",
+ "-z","noexecstack",
"-z","nodefaultlib",
%NOPIE%
"-o","%o",