From: Peter Michael Green Date: Wed, 27 Sep 2023 00:45:51 +0000 (+0000) Subject: Fix raspbian-triplet.patch X-Git-Tag: archive/raspbian/1%16.0.6-15+rpi1~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e68d4306daa31d7a5c36bac17b034eca1afd1c67;p=llvm-toolchain-16.git Fix raspbian-triplet.patch --- diff --git a/debian/patches/raspbian-triplet.patch b/debian/patches/raspbian-triplet.patch index 8a77501b43..86f2a9615c 100644 --- a/debian/patches/raspbian-triplet.patch +++ b/debian/patches/raspbian-triplet.patch @@ -1,24 +1,41 @@ hack to replace arm version in triplet returned by config.guess with the one we want for raspbian. +diff --git a/llvm/cmake/config.guess.hack b/llvm/cmake/config.guess.hack +new file mode 100644 +index 0000000000..13b18bf7b5 --- /dev/null -+++ llvm-toolchain-9-9/llvm/cmake/config.guess.hack ++++ b/llvm/cmake/config.guess.hack @@ -0,0 +1,2 @@ +#!/bin/bash -e +$(dirname "$0")/config.guess | sed -r s/arm[a-zA-Z0-9]*/armv6/ ---- llvm-toolchain-9-9.orig/llvm/cmake/modules/GetHostTriple.cmake -+++ llvm-toolchain-9-9/llvm/cmake/modules/GetHostTriple.cmake -@@ -20,3 +20,3 @@ +diff --git a/llvm/cmake/modules/GetHostTriple.cmake b/llvm/cmake/modules/GetHostTriple.cmake +index 1be13bc01a..c9b870a2e2 100644 +--- a/llvm/cmake/modules/GetHostTriple.cmake ++++ b/llvm/cmake/modules/GetHostTriple.cmake +@@ -45,7 +45,7 @@ function( get_host_triple var ) + if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows AND NOT MSYS) + message(WARNING "unable to determine host target triple") else() - set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess) + set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess.hack) execute_process(COMMAND sh ${config_guess} ---- llvm-toolchain-9-9.orig/compiler-rt/cmake/base-config-ix.cmake -+++ llvm-toolchain-9-9/compiler-rt/cmake/base-config-ix.cmake -@@ -205,4 +205,4 @@ + RESULT_VARIABLE TT_RV + OUTPUT_VARIABLE TT_OUT +diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake +index c6e95055b0..feef7b2eb8 100644 +--- a/compiler-rt/cmake/base-config-ix.cmake ++++ b/compiler-rt/cmake/base-config-ix.cmake +@@ -248,10 +248,9 @@ macro(test_targets) + if(WIN32) + test_target_arch(arm "" "" "") else() -- test_target_arch(arm "" "-march=armv7-a" "-mfloat-abi=soft") -- test_target_arch(armhf "" "-march=armv7-a" "-mfloat-abi=hard") +- test_target_arch(armv4t "" "-march=armv4t" "-mfloat-abi=soft") + test_target_arch(arm "" "" "-mfloat-abi=soft") + test_target_arch(armhf "" "" "-mfloat-abi=hard") test_target_arch(armv6m "" "-march=armv6m" "-mfloat-abi=soft") +- test_target_arch(arm "" "-march=armv7-a" "-mfloat-abi=soft") +- test_target_arch(armhf "" "-march=armv7-a" "-mfloat-abi=hard") + endif() + elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "avr") + test_target_arch(avr "__AVR__" "--target=avr")