From 574f9f63769add893ca58e67db2418cdbed998a6 Mon Sep 17 00:00:00 2001 From: otavepto <153766569+otavepto@users.noreply.github.com> Date: Sun, 12 May 2024 02:34:19 +0300 Subject: [PATCH] attempt to fix mbedtls compilation on macos --- build_macos_deps.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build_macos_deps.sh b/build_macos_deps.sh index 703b2f76..6a7e4ebc 100644 --- a/build_macos_deps.sh +++ b/build_macos_deps.sh @@ -65,7 +65,7 @@ last_code=0 echo // installing required packages all_packages=( - # "binutils" # (optional) contains the tool 'readelf' mainly, and other usefull binary stuff + "binutils" # (optional) contains the tool 'readelf' mainly, and other usefull binary stuff "coreutils" # echo, printf, etc... "gcc@14" "llvm@14" @@ -87,10 +87,8 @@ if [[ "$INSTALL_PACKAGES" -ne 0 ]]; then export PATH="/usr/local/bin:$PATH" export PATH="/usr/local/opt/llvm@14/bin:$PATH" + # export PATH="/usr/local/opt/llvm/bin:$PATH" - # TODO this causes problems with mbedtls - brew uninstall binutils - else echo "Package installation skipped, please be sure the follow packages correspond to your distro is installed." echo "${all_packages[*]}" @@ -298,6 +296,10 @@ pushd "$deps_dir/mbedtls" mbedtls_common_defs="-DUSE_STATIC_MBEDTLS_LIBRARY=ON -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DENABLE_TESTING=OFF -DENABLE_PROGRAMS=OFF -DLINK_WITH_PTHREAD=ON" +# "-no_warning_for_no_symbols" fails on clang +sed -i '' 's/ -no_warning_for_no_symbols -c/ /' 'library/CMakeLists.txt' +sed -i '' 's/RLFLAGS = -no_warning_for_no_symbols -c/RLFLAGS = /' 'library/Makefile' + eval $recreate_64 eval $cmake_gen64 $mbedtls_common_defs last_code=$((last_code + $?))