-if [ "$os" = "NixOS" ] && [ "$(gcc -dumpversion)" = "7.4.0" ]; then
- echo "Temporary disable LTO, believed to be broken on this system."
+if [ "$os" = "CentOS" ]; then
+ if [ "$(ld -v | cut -d\ -f4 | cut -c1-4)" = "2.30" ]; then
+ echo "Temporary disable LTO, believed to be broken on this system."
+ MAY_DISABLE_LTO=-Denable_lto=OFF
+ else
+ MAY_DISABLE_LTO=
+ fi
+fi
+
+if [ $NODE_NAME = "armv8" ]; then
+ echo "disable LTO, believed to be too heavy for this particular system"