[klibc] [klibc:master] Kbuild: Fix the compiler execstack option

klibc-bot for Ben Hutchings ben at decadent.org.uk
Sat Jul 25 13:57:02 PDT 2020

Commit-ID:  1147f916daac11afee085bd0e94471d9346a0965
Gitweb:     http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=1147f916daac11afee085bd0e94471d9346a0965
Author:     Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Sat, 25 Jul 2020 20:41:37 +0100
Committer:  Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 25 Jul 2020 20:45:29 +0100

[klibc] Kbuild: Fix the compiler execstack option

The compiler driver does not add any dashes to the options
given to -Wa, so we need to use either -Wa,--execstack or

(I had this working some time ago, so I don't know how I ended up
committing the broken version.)

Signed-off-by: Ben Hutchings <ben at decadent.org.uk>

 scripts/Kbuild.klibc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index a9a2a40e..d1c78ce6 100644
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -119,7 +119,7 @@ KLIBCCPPFLAGS    += -I$(KLIBCKERNELSRC)/include		\
 # compiler/assembler option for whether we want an executable stack
-KLIBCSTACKFLAGS  := -Wa,$(if $(filter n,$(KLIBCEXECSTACK)),no)execstack
+KLIBCSTACKFLAGS  := -Wa,--$(if $(filter n,$(KLIBCEXECSTACK)),no)execstack
 # klibc definitions
 KLIBCDEFS        += -D__KLIBC__=$(KLIBCMAJOR)          \

More information about the klibc mailing list