package/lld: fix build with gcc < 5.1
authorJoseph Kogut <joseph.kogut@gmail.com>
Thu, 24 Oct 2019 23:18:18 +0000 (16:18 -0700)
committerPeter Korsgaard <peter@korsgaard.com>
Fri, 25 Oct 2019 08:31:38 +0000 (10:31 +0200)
This fix is based on commit 2a17fb6 used for llvm.

Fixes:
http://autobuild.buildroot.net/results/76310241a335a99a4ff2726edb517b067367fd41
http://autobuild.buildroot.net/results/88cbfae219fd4475be376c9558b5760cebd2148f

[Peter: adjust comment as suggested by Romain]
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/lld/lld.mk

index bda5a56ab59ae192c5f3cd6348a4feb00f90e187..a023159e17d9ab802a9eebac850f2d3f214bff03 100644 (file)
@@ -12,6 +12,12 @@ LLD_LICENSE_FILES = LICENSE.TXT
 LLD_SUPPORTS_IN_SOURCE_BUILD = NO
 HOST_LLD_DEPENDENCIES = host-llvm
 
+# LLVM > 9.0 will soon require C++14 support, building llvm <= 9.0 using a
+# toolchain using gcc < 5.1 gives an error but actually still works. Setting
+# this option makes it still build with gcc >= 4.8.
+# https://reviews.llvm.org/D57264
+HOST_LLD_CONF_OPTS += -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON
+
 # GCC looks for tools in a different path from LLD's default installation path
 define HOST_LLD_CREATE_SYMLINKS
        mkdir -p $(HOST_DIR)/$(GNU_TARGET_NAME)/bin