File: 002-cxx-cross-compiler.patch

package info (click to toggle)
acr 2.2.4-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 712 kB
  • sloc: sh: 4,738; makefile: 41
file content (26 lines) | stat: -rw-r--r-- 1,040 bytes parent folder | download
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