This is an automated email from the ASF dual-hosted git repository.
rduan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git
The following commit(s) were added to refs/heads/master by this push:
new c52d76bc fix libunwind autogen script when mitigations are on
c52d76bc is described below
commit c52d76bcdc56e8e57174f9655347dce1b337b25a
Author: Itzik Grossman <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]