[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] odd/multiarch 993027b 4/5: Document an idea that is
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] odd/multiarch 993027b 4/5: Document an idea that is less good than was hoped |
Date: |
Wed, 1 May 2019 17:30:51 -0400 (EDT) |
branch: odd/multiarch
commit 993027b69dc6d9350604f80d11b55f37784c3f4a
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Document an idea that is less good than was hoped
---
set_arch.sh | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/set_arch.sh b/set_arch.sh
index 67ff3ee..f9707b5 100755
--- a/set_arch.sh
+++ b/set_arch.sh
@@ -46,6 +46,35 @@
# ln --symbolic --force --no-dereference
/opt/lmi/"${LMI_COMPILER}_${LMI_TRIPLET}"/bin /opt/lmi/bin
# and likewise for /opt/lmi/local etc.
+# To cross-build autotoolized libraries, configure with:
+# --host=$LMI_TRIPLET
+# --exec_prefix=$prefix/$LMI_TOOLCHAIN
+# where
+# LMI_TOOLCHAIN=${LMI_COMPILER}_${LMI_TRIPLET}
+#
+# Supported values:
+# LMI_COMPILER : gcc, clang
+# LMI_TRIPLET : i686-w64-mingw32, x86_64-w64-mingw32, x86_64-pc-linux-gnu
+#
+# Examples:
+#
+# LMI_TOOLCHAIN LMI_COMPILER ----------LMI_TRIPLET----------
+# cpu -vendor -[kernel-]system
+#
+# gcc_msw32 gcc i686 -w64 -mingw32
+# gcc_msw64 gcc x86_64 -w64 -mingw32
+# clang_gnu64 clang x86_64 -pc -linux -gnu
+#
+# Rationale: Triplets are required for selecting cross compilers. GNU
+# triplets are in widespread use, although debian uses its own:
+# https://wiki.debian.org/Multiarch/Tuples#Why_not_use_GNU_triplets.3F
+# The main reason for lmi to establish its own is that the official
+# triplets for msw are so poor. For example, "i686-w64-mingw32" has
+# substrings "64" and "32". Both seem to suggest the CPU's word size
+# (contradicting each other), but actually neither does--the word size
+# is determined by the "i686" field. See:
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=622276
+
foo()
{
local lmi_build_type