Rebase
[platform/upstream/libffi.git] / patches / ml64-safeseh
1 Index: libffi/ChangeLog
2 ===================================================================
3 --- libffi.orig/ChangeLog
4 +++ libffi/ChangeLog
5 @@ -73,6 +73,10 @@
6         * src/prep_cif.c: Push stack space computation into src/x86/ffi.c
7         for X86_ANY so return value space doesn't get added twice.
8  
9 +2010-08-03  Neil Rashbrooke <neil@parkwaycc.co.uk>
10 +
11 +       * msvcc.sh: Don't pass -safeseh to ml64 because behavior is buggy.
12 +
13  2010-07-22  Dan Witte  <dwitte@mozilla.com>
14  
15         * src/*/ffitarget.h: Make FFI_LAST_ABI one past the last valid ABI.
16 Index: libffi/msvcc.sh
17 ===================================================================
18 --- libffi.orig/msvcc.sh
19 +++ libffi/msvcc.sh
20 @@ -46,6 +46,7 @@ args="-nologo -W3"
21  md=-MD
22  cl="cl"
23  ml="ml"
24 +safeseh="-safeseh"
25  output=
26  
27  while [ $# -gt 0 ]
28 @@ -63,6 +64,7 @@ do
29      -m64)
30        cl="cl"   # "$MSVC/x86_amd64/cl"
31        ml="ml64" # "$MSVC/x86_amd64/ml64"
32 +      safeseh=
33        shift 1
34      ;;
35      -O*)
36 @@ -164,7 +166,7 @@ if [ -n "$assembly" ]; then
37      echo "$cl -nologo -EP $includes $defines $src > $ppsrc"
38      "$cl" -nologo -EP $includes $defines $src > $ppsrc || exit $?
39      output="$(echo $output | sed 's%/F[dpa][^ ]*%%g')"
40 -    args="-nologo -safeseh $single $output $ppsrc"
41 +    args="-nologo $safeseh $single $output $ppsrc"
42  
43      echo "$ml $args"
44      eval "\"$ml\" $args"