This is an automated email from the ASF dual-hosted git repository.

ardovm pushed a commit to branch AOO41X_execstack
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 14a569e4128d56ed867db531fa06d6bffae0a249
Author: Arrigo Marchiori <[email protected]>
AuthorDate: Sun Jun 7 10:48:06 2026 +0200

    Run execstack -s on soffice executables
    
    Also check for execstack in the configure script.
---
 main/configure.ac             | 11 +++++++++++
 main/desktop/util/makefile.mk | 12 ++++++++++--
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/main/configure.ac b/main/configure.ac
index 9672de2d53..879abfb95e 100644
--- a/main/configure.ac
+++ b/main/configure.ac
@@ -7320,6 +7320,17 @@ else
 fi
 AC_SUBST(nodep)
 
+dnl ===================================================================
+dnl Check for execstack(8) on Linux
+dnl ===================================================================
+if test "$_os" = "Linux"; then
+   AC_PATH_PROG(EXECSTACK, execstack )
+   if test -z "$EXECSTACK"; then
+      AC_MSG_ERROR([execstack is required on Linux])
+   fi
+fi
+
+
 dnl ===================================================================
 dnl Setting up the environment.
 dnl ===================================================================
diff --git a/main/desktop/util/makefile.mk b/main/desktop/util/makefile.mk
index 9ef672e2b1..a0a8c7e81a 100644
--- a/main/desktop/util/makefile.mk
+++ b/main/desktop/util/makefile.mk
@@ -179,7 +179,7 @@ $(APP1TARGETN) :  $(MISC)$/binso_created.flg
 
 .IF "$(APP5TARGETN)"!=""
 $(APP5TARGETN) :  $(MISC)$/binso_created.flg
-.ENDIF                 # "$(APP6TARGETN)"!=""
+.ENDIF                 # "$(APP5TARGETN)"!=""
 
 .IF "$(APP6TARGETN)"!=""
 $(APP6TARGETN) :  $(MISC)$/binso_created.flg
@@ -201,6 +201,14 @@ ALLTAR: $(BIN)$/$(TARGET).bin
 $(BIN)$/soffice_oo$(EXECPOST) : $(APP5TARGETN)
        $(COPY) $< $@
 
+.IF "$(OS)" == "LINUX"
+# $(APP5TARGETN) must be fixed with execstack
+$(BIN)$/soffice_oo$(EXECPOST) : $(MISC)$/selinux_fixed.flg
+
+$(MISC)$/selinux_fixed.flg : $(APP5TARGETN)
+        execstack -s $< && $(TOUCH) $@
+.ENDIF # Linux
+
 .IF "$(GUI)" != "OS2"
 .IF "$(LINK_SO)"=="TRUE"
 $(BIN)$/so$/soffice_so$(EXECPOST) : $(APP1TARGETN)
@@ -270,4 +278,4 @@ $(BIN)$/$(TARGET).bin: $(BIN)$/$(TARGET)$(EXECPOST)
 $(MISC)$/binso_created.flg :
        @@-$(MKDIRHIER) $(BIN)$/so && $(TOUCH) $@
 
-.ENDIF
+.ENDIF # "$(L10N_framework)"==""

Reply via email to