You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by rd...@apache.org on 2022/10/27 15:07:38 UTC

[incubator-teaclave-sgx-sdk] branch v2.0.0-preview updated: fix libunwind autogen script when mitigations are on

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

rduan pushed a commit to branch v2.0.0-preview
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git


The following commit(s) were added to refs/heads/v2.0.0-preview by this push:
     new 43e44b12 fix libunwind autogen script when mitigations are on
43e44b12 is described below

commit 43e44b12a8b524845a74c5f129e853b51090943c
Author: Itzik Grossman <it...@scrtlabs.com>
AuthorDate: Thu Oct 27 17:15:59 2022 +0300

    fix libunwind autogen script when mitigations are on
---
 sgx_unwind/libunwind/autogen.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sgx_unwind/libunwind/autogen.sh b/sgx_unwind/libunwind/autogen.sh
index 635283bd..14517f36 100755
--- a/sgx_unwind/libunwind/autogen.sh
+++ b/sgx_unwind/libunwind/autogen.sh
@@ -25,17 +25,17 @@ export CFLAGS
 #      __asm__("jmp *%rax\n\t");
 #  }
 #  #pragma GCC pop_options 
-line=`grep -n "__x86_return_thunk()" ./configure | cut -d: -f 1`
+line=`grep -n "__x86_return_thunk()" $srcdir/configure | cut -d: -f 1`
 if [ -n "$line" ]; then
   echo "__x86_return_thunk() already exist..."
 else
-  line_end=`grep -n "\"checking whether the C compiler works... \"" ./configure | cut -d: -f 1`
+  line_end=`grep -n "\"checking whether the C compiler works... \"" $srcdir/configure | cut -d: -f 1`
   line_start=`expr $line_end - 30`  #Search an scope
-  sed -i "${line_start},${line_end} s/^_ACEOF/#pragma GCC push_options\r\n#pragma GCC optimize (\"-fomit-frame-pointer\")\r\nvoid __x86_return_thunk(){__asm__(\"ret\\\n\\\t\");}\r\nvoid __x86_indirect_thunk_rax(){__asm__(\"jmp \*%rax\\\n\\\t\");}\r\n#pragma GCC pop_options\r\n_ACEOF/" ./configure
+  sed -i "${line_start},${line_end} s/^_ACEOF/#pragma GCC push_options\r\n#pragma GCC optimize (\"-fomit-frame-pointer\")\r\nvoid __x86_return_thunk(){__asm__(\"ret\\\n\\\t\");}\r\nvoid __x86_indirect_thunk_rax(){__asm__(\"jmp \*%rax\\\n\\\t\");}\r\n#pragma GCC pop_options\r\n_ACEOF/" $srcdir/configure
 
-  line_end=`grep -n "\"checking whether we are cross compiling... \"" ./configure | cut -d: -f 1`
+  line_end=`grep -n "\"checking whether we are cross compiling... \"" $srcdir/configure | cut -d: -f 1`
   line_start=`expr $line_end - 30`  #Search an scope
-  sed -i "${line_start},${line_end} s/^_ACEOF/#pragma GCC push_options\r\n#pragma GCC optimize (\"-fomit-frame-pointer\")\r\nvoid __x86_return_thunk(){__asm__(\"ret\\\n\\\t\");}\r\nvoid __x86_indirect_thunk_rax(){__asm__(\"jmp \*%rax\\\n\\\t\");}\r\n#pragma GCC pop_options\r\n_ACEOF/" ./configure
+  sed -i "${line_start},${line_end} s/^_ACEOF/#pragma GCC push_options\r\n#pragma GCC optimize (\"-fomit-frame-pointer\")\r\nvoid __x86_return_thunk(){__asm__(\"ret\\\n\\\t\");}\r\nvoid __x86_indirect_thunk_rax(){__asm__(\"jmp \*%rax\\\n\\\t\");}\r\n#pragma GCC pop_options\r\n_ACEOF/" $srcdir/configure
 fi
 
 test -n "$NOCONFIGURE" || "$srcdir/configure" --enable-shared=no \


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org