File openblas-noexecstack.patch of Package openblas

Index: OpenBLAS-0.2.9/exports/Makefile
===================================================================
--- OpenBLAS-0.2.9.orig/exports/Makefile
+++ OpenBLAS-0.2.9/exports/Makefile
@@ -101,6 +101,7 @@ so : ../$(LIBSONAME)
 ../$(LIBSONAME) : ../$(LIBNAME) linktest.c
 ifneq ($(C_COMPILER), LSB)
 	$(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
+	-Wl,-z,noexecstack \
 	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
 	-Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB)
 	$(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
@@ -122,6 +123,7 @@ so : ../$(LIBSONAME)
 
 ../$(LIBSONAME) : ../$(LIBNAME) linktest.c
 	$(CC) $(CFLAGS) $(LDFLAGS)  -shared -o ../$(LIBSONAME) \
+	-Wl,-z,noexecstack \
 	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
 	$(FEXTRALIB) $(EXTRALIB)
 	$(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
@@ -141,6 +143,7 @@ ifeq ($(OSNAME), SunOS)
 
 so : ../$(LIBSONAME)
 	$(CC) $(CFLAGS) $(LDFLAGS)  -shared -o ../$(LIBSONAME) \
+	-Wl,-z,noexecstack \
 	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(EXTRALIB)
 	$(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
 	rm -f linktest
openSUSE Build Service is sponsored by