summaryrefslogtreecommitdiff
path: root/debian/patches/ada-ppc64.diff
blob: 0925f7ac06ac5b5e0e011cdf78433281b52250df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Fix 32/64 bit detection, broken due to the fact Debian installs 
# 64-bit libraries in lib and not lib64. Fix based on the s390/s390x
# detection.

--- a/src/gcc/ada/gcc-interface/Makefile.in
+++ b/src/gcc/ada/gcc-interface/Makefile.in
@@ -1858,9 +1858,14 @@
     LIBGNAT_TARGET_PAIRS_64 = \
     system.ads<system-linux-ppc64.ads
 
-    ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
-      LIBGNAT_TARGET_PAIRS = \
-      $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
+    ifeq ($(strip $(filter-out powerpc64 powerpc64le,$(target_cpu))),)
+      ifeq ($(strip $(MULTISUBDIR)),/32)
+        LIBGNAT_TARGET_PAIRS = \
+        $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
+      else
+        LIBGNAT_TARGET_PAIRS = \
+        $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
+      endif
     else
       LIBGNAT_TARGET_PAIRS = \
       $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)