From 4b1d4c18af60879b61a79bb8c85d9167f600db32 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 1 Sep 2023 16:44:17 +0200 Subject: [PATCH] Set the host triple in clang Fixes the problem where the triple used by newer versions of config.guess don't match due to a change in x86 from x86_64-unknown-linux-gnu to x86_64-pc-linux-gnu. --- bsc/llvm-ompss2/clang.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bsc/llvm-ompss2/clang.nix b/bsc/llvm-ompss2/clang.nix index a1b05a6..13683f5 100644 --- a/bsc/llvm-ompss2/clang.nix +++ b/bsc/llvm-ompss2/clang.nix @@ -62,11 +62,14 @@ stdenv.mkDerivation rec { dontUseCmakeBuildDir = true; enableAssertions = if enableDebug then "ON" else "OFF"; + # Fix the host triple, as it has changed in a newer config.guess: + # https://git.savannah.gnu.org/gitweb/?p=config.git;a=commitdiff;h=ca9bfb8cc75a2be1819d89c664a867785c96c9ba preConfigure = '' mkdir -p build cd build cmakeDir="../llvm" cmakeFlagsArray=( + "-DLLVM_HOST_TRIPLE=${stdenv.targetPlatform.config}" "-DLLVM_ENABLE_LLD=ON" "-DCMAKE_CXX_FLAGS_DEBUG=-g -ggnu-pubnames" "-DCMAKE_EXE_LINKER_FLAGS_DEBUG=-Wl,-gdb-index"