diff options
author | Chih-Hung Hsieh <chh@google.com> | 2015-03-03 01:44:26 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-03-03 01:44:26 +0000 |
commit | 9a75b4ec35eaddb38a49c8283ef0f1db2c827a52 (patch) | |
tree | 28dba481dd65649fcebf72b1593518f9c5622af0 | |
parent | 2479a0987da03f0059c42991bf59e3b32551e107 (diff) | |
parent | d408e6071831f150a08f895ee2de6cfe8c7ff858 (diff) | |
download | build-9a75b4ec35eaddb38a49c8283ef0f1db2c827a52.zip build-9a75b4ec35eaddb38a49c8283ef0f1db2c827a52.tar.gz build-9a75b4ec35eaddb38a49c8283ef0f1db2c827a52.tar.bz2 |
am d408e607: Merge "Disable tail call optimization and use -mstackrealign to boot up on fugu."
* commit 'd408e6071831f150a08f895ee2de6cfe8c7ff858':
Disable tail call optimization and use -mstackrealign to boot up on fugu.
-rw-r--r-- | core/clang/TARGET_x86.mk | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/clang/TARGET_x86.mk b/core/clang/TARGET_x86.mk index a6b2a6f..3ba34ae 100644 --- a/core/clang/TARGET_x86.mk +++ b/core/clang/TARGET_x86.mk @@ -18,7 +18,15 @@ CLANG_CONFIG_x86_TARGET_EXTRA_CFLAGS := \ $(CLANG_CONFIG_EXTRA_CFLAGS) \ $(CLANG_CONFIG_TARGET_EXTRA_CFLAGS) \ $(CLANG_CONFIG_x86_EXTRA_CFLAGS) \ - $(CLANG_CONFIG_x86_TARGET_EXTRA_ASFLAGS) + $(CLANG_CONFIG_x86_TARGET_EXTRA_ASFLAGS) \ + -fno-optimize-sibling-calls \ + -mstackrealign + +# http://llvm.org/bugs/show_bug.cgi?id=15086, +# llvm tail call optimization is wrong for x86. +# -mstackrealign is needed to realign stack in native code +# that could be called from JNI, so that movaps instruction +# will work on assumed stack aligned local variables. CLANG_CONFIG_x86_TARGET_EXTRA_CONLYFLAGS := \ $(CLANG_CONFIG_EXTRA_CONLYFLAGS) \ |