1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
Description: Add a g++ fallback to the cxx cross compiler detection
acr fails to find a working cxx cross compiler because it looks for
<triplet>-$CXX but debian doesn't have <triplet>-c++ configured so
adding another fallback to look for <triplet>-g++
Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1117018
Author: Helmut Grohne <helmut@subdivi.de>
Reviewed-By: Akash Doppalapudi <akashdoppalapudi2001@gmail.com>
Forwarded: not-needed
Last-Update: 2025-10-19
---
--- acr-2.2.4.orig/src/acr-sh
+++ acr-2.2.4/src/acr-sh
@@ -929,7 +929,10 @@ HAVE_LANG_CXX=1
ochof \"checking for c++ compiler... \"
if [ \"${S}{CROSSBUILD}\" = 1 ]; then
(command -v ${S}{HOST}-${S}{CXX} 2>&1 >/dev/null)
-if [ \"${S}?\" = 0 ]; then CXX=\"${S}{HOST}-${S}{CXX}\"; fi
+if [ \"${S}?\" = 0 ]; then CXX=\"${S}{HOST}-${S}{CXX}\"; else
+(command -v ${S}{HOST}-g++ 2>&1 >/dev/null)
+if [ \"${S}?\" = 0 ]; then CXX=\"${S}{HOST}-g++\"; fi
+fi
fi
echo \"#include <iostream>\" > test.cxx
echo \"int main(){ std::cout << 1; return 0;}\" >> test.cxx
|