Mercurial > pub > dyncall > dyncall
comparison configure @ 257:8bb4618c18d8
- portability changes to configure's "--noexecstack" flag detection (mainly for macos)
author | Tassilo Philipp |
---|---|
date | Sat, 20 May 2017 17:41:08 +0200 |
parents | 7520e2260097 |
children | 943c182692e2 |
comparison
equal
deleted
inserted
replaced
256:7520e2260097 | 257:8bb4618c18d8 |
---|---|
221 # @@@ find solution for platforms without objdump | 221 # @@@ find solution for platforms without objdump |
222 RWXTESTBIN="$BLDTOP/rwxtest.out" # @@@ put this maybe all in Makefile.generic? out of source builds? | 222 RWXTESTBIN="$BLDTOP/rwxtest.out" # @@@ put this maybe all in Makefile.generic? out of source builds? |
223 STACKFLAGS=`make -f - <<MAKEFILE | 223 STACKFLAGS=`make -f - <<MAKEFILE |
224 include $C | 224 include $C |
225 t: | 225 t: |
226 @(echo .global main;echo main:) | \\\${CC} -xassembler -o "$RWXTESTBIN" -Wa,--noexecstack - | 226 @(echo .text;echo .globl main;echo main:) | sed '/m/p;s/m/_m/' | \\\${CC} -xassembler -o "$RWXTESTBIN" -Wa,--noexecstack - |
227 @(which objdump && objdump -p "$RWXTESTBIN") | grep -A1 STACK | sed '1d;s/^.*flags //' | awk '{print \\\$1}' | 227 @(which objdump && objdump -p "$RWXTESTBIN") | grep -A1 STACK | sed '1d;s/^.*flags[ \\t]\\(rw[x-]\\)[ \\t]*/\\1/' |
228 MAKEFILE | 228 MAKEFILE |
229 ` | 229 ` |
230 rm "$RWXTESTBIN" 2>/dev/null | 230 rm "$RWXTESTBIN" 2>/dev/null |
231 if [ "$STACKFLAGS" = "rw-" ]; then | 231 if [ "$STACKFLAGS" = "rw-" ]; then |
232 # platforms differe here, so set them all | 232 # platforms differe here, so set them all |