diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2017-01-04 21:49:41 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2017-01-04 21:53:03 +0300 |
commit | 9e8f0ee2579793123bb3a113397ea023c9e0145e (patch) | |
tree | fedd4bf56e63ba2ef6bae999e5a671cfb4e2c1b1 | |
parent | 7e89965aed41ae81f636c0c13f9a4da6e4d1abba (diff) |
[btls] Pass CC and CXX to the BTLS CMake and disable BTLS on older GCC (#4200)mono-4.8.0.429
CMake doesn't pick up the compiler from the PATH by default,
it only looks in default locations so without this we might
end up using a different compiler for BTLS than for the main
Mono build which we don't want.
BTLS also requires a fairly new GCC which includes C++11
features, added a quick check for stdalign.h which BTLS
requires and disable it if the header isn't found.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=46712
(cherry picked from commit 488b550ac0275c944e0a2c23be93173382084e5f)
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | mono/btls/Makefile.am | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 9959c554e0d..e39a33a5453 100644 --- a/configure.ac +++ b/configure.ac @@ -2989,6 +2989,7 @@ case "$host" in AOT_SUPPORTED="yes" BTLS_SUPPORTED=yes BTLS_PLATFORM=i386 + AC_CHECK_HEADER(stdalign.h,[],[BTLS_SUPPORTED=no]) ;; darwin*) AOT_SUPPORTED="yes" @@ -3011,6 +3012,7 @@ case "$host" in AOT_SUPPORTED="yes" BTLS_SUPPORTED=yes BTLS_PLATFORM=x86_64 + AC_CHECK_HEADER(stdalign.h,[],[BTLS_SUPPORTED=no]) ;; darwin*) AOT_SUPPORTED="yes" diff --git a/mono/btls/Makefile.am b/mono/btls/Makefile.am index 6a5b1061320..9b61a23468e 100644 --- a/mono/btls/Makefile.am +++ b/mono/btls/Makefile.am @@ -50,16 +50,16 @@ all-local: $(BTLS_STATIC_LIST) $(BTLS_SHARED_LIST) if DYNAMIC_BTLS build-shared/Makefile: -mkdir -p build-shared - (cd build-shared && $(CMAKE) $(CMAKE_ARGS) $(BTLS_CMAKE_ARGS) -DBUILD_DYNAMIC_BTLS=1 $(abs_top_srcdir)/mono/btls) + (cd build-shared && CC="$(CC)" CXX="$(CXX)" $(CMAKE) $(CMAKE_ARGS) $(BTLS_CMAKE_ARGS) -DBUILD_DYNAMIC_BTLS=1 $(abs_top_srcdir)/mono/btls) else build-shared/Makefile: -mkdir -p build-shared - (cd build-shared && $(CMAKE) $(CMAKE_ARGS) $(BTLS_CMAKE_ARGS) -DBUILD_SHARED_LIBS=1 $(abs_top_srcdir)/mono/btls) + (cd build-shared && CC="$(CC)" CXX="$(CXX)" $(CMAKE) $(CMAKE_ARGS) $(BTLS_CMAKE_ARGS) -DBUILD_SHARED_LIBS=1 $(abs_top_srcdir)/mono/btls) endif build-static/Makefile: -mkdir -p build-static - (cd build-static && $(CMAKE) $(CMAKE_ARGS) $(BTLS_CMAKE_ARGS) $(abs_top_srcdir)/mono/btls) + (cd build-static && CC="$(CC)" CXX="$(CXX)" $(CMAKE) $(CMAKE_ARGS) $(BTLS_CMAKE_ARGS) $(abs_top_srcdir)/mono/btls) $(BTLS_STATIC_LIST): build-static/Makefile $(MAKE) -C build-static $(CMAKE_VERBOSE) |