]> git.sesse.net Git - stockfish/commit
Fix for profile-build failure using gcc on MacOS
authorGeorge Sobala <gsobala@gmail.com>
Mon, 13 Dec 2021 15:29:31 +0000 (15:29 +0000)
committerStéphane Nicolet <cassio@free.fr>
Fri, 17 Dec 2021 17:52:09 +0000 (18:52 +0100)
commit939b694bfda27017c34a8cdccc81f2bb2ef44079
treee278ea51e3a436df64531aae121f331c3fe97a74
parentdc5d9bdfee70f4267d9a49ad71e5ee478dd50ca5
Fix for profile-build failure using gcc on MacOS

Fixes https://github.com/official-stockfish/Stockfish/issues/3846 ,
where the profiling SF binary generated by GCC on MacOS would launch
but failed to quit. Tested with gcc-8, gcc9, gcc10, gcc-11.

The problem can be fixed by adding -fvisibility=hidden to the compiler
flags, see for example the following piece of Apple documentation:
https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html

For instance this now works:
   make -j8 profile-build ARCH=x86-64-avx2 COMP=gcc COMPCXX=g++-11

No functional change
src/Makefile