summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Kashkarov <m.kashkarov@partner.samsung.com>2019-12-06 15:57:11 (GMT)
committerMikhail Kashkarov <m.kashkarov@partner.samsung.com>2019-12-06 19:40:43 (GMT)
commitdd1072329e61bd8613c7736c281c4a5d518912cc (patch)
treef69aa5672d9a68f9eac868edb178aba52d01e9ed
parent5647236eac21fb0e01a55a12289a66bc9f874f19 (diff)
downloadcoreclr-sandbox/mkashkarov/debug_build.zip
coreclr-sandbox/mkashkarov/debug_build.tar.gz
coreclr-sandbox/mkashkarov/debug_build.tar.bz2
[Tizen] Use -mstackrealign to sync up with Tizen build changessandbox/mkashkarov/debug_build
Tizen i586 now builds with -mstackrealign by default: "Realign the stack at entry. On the x86, the -mstackrealign option generates an alternate prologue and epilogue that realigns the run-time stack if necessary. This supports mixing legacy codes that keep 4-byte stack alignment with modern codes that keep 16-byte stack alignment for SSE compatibility. ..." Signed-off-by: Mikhail Kashkarov <m.kashkarov@partner.samsung.com>
-rwxr-xr-xpackaging/coreclr.spec10
1 files changed, 6 insertions, 4 deletions
diff --git a/packaging/coreclr.spec b/packaging/coreclr.spec
index 7c7abcd..c1eef80 100755
--- a/packaging/coreclr.spec
+++ b/packaging/coreclr.spec
@@ -153,8 +153,7 @@ export LD_LIBRARY_PATH=`pwd`/libicu-57.1
export TIZEN_ASAN_ENVIRONMENT=1
}
-export CFLAGS=" --target=%{_host} "
-export CXXFLAGS=" --target=%{_host} "
+BASE_FLAGS=" --target=%{_host}"
%ifarch x86_64
# Even though build architectur is x86_64, it will be running on arm board.
@@ -167,8 +166,8 @@ export CXXFLAGS=" --target=%{_host} "
%ifarch %{ix86}
%define _barch x86
export CLANG_NO_LIBDIR_SUFFIX=1
-export CFLAGS=$(echo $CFLAGS | sed -e 's/--target=i686/--target=i586/')
-export CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/--target=i686/--target=i586/')
+BASE_FLAGS="$(echo $BASE_FLAGS | sed -e 's/--target=i686/--target=i586/')"
+BASE_FLAGS="$BASE_FLAGS -mstackrealign"
%else
%ifarch %{arm}
%define _barch armel
@@ -184,6 +183,9 @@ export CLANG_NO_LIBDIR_SUFFIX=1
%define _reldir bin/Product/Linux.%{_barch}.%{_buildtype}
%define _numproc %(getconf _NPROCESSORS_ONLN)
+export CFLAGS="${BASE_FLAGS}"
+export CXXFLAGS="${BASE_FLAGS}"
+
%ifarch %{arm}
%if %{dotnet_buildtype} == "Release"
export CXXFLAGS+="-fstack-protector-strong -D_FORTIFY_SOURCE=2"