Assembly routines in libthread and libmp use an executable stack by default. This is not needed and can be removed using --noexecstack. The plan9port 9a wrapper wrapper needs to be modified to pass flags to the underlying assembler first though.. Patch by Andy Spencer http://code.swtch.com/plan9port/issue/76/ --- plan9/bin/9a +++ plan9.new/bin/9a @@ -1,15 +1,21 @@ #!/bin/sh -if [ $# != 1 ]; then - echo 'usage: 9a file.s' 1>&2 - exit 1 -fi - aflags="" case "`uname`" in Darwin) aflags="-arch `arch`" esac -out=`echo $1 | sed 's/\.s$//;s/$/.o/'` -exec as $aflags -o $out $1 +for arg; do + case $arg in + -*) + opts="$opts $arg" + ;; + *.s) + src=$arg + dst=$(echo $arg | sed 's/\.s/\.o/') + ;; + esac +done + +exec as $aflags $opts -o $dst $src --- plan9/src/mkhdr +++ plan9.new/src/mkhdr @@ -29,7 +29,7 @@ INSTALL=install CFLAGS= LDFLAGS= -AFLAGS= +AFLAGS=--noexecstack CLEANFILES= NUKEFILES= YACC=9 yacc