[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] odd/multiarch 6b25314 3/5: Merge remote-tracking bra
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] odd/multiarch 6b25314 3/5: Merge remote-tracking branch 'origin/master' into odd/multiarch |
Date: |
Wed, 1 May 2019 17:30:50 -0400 (EDT) |
branch: odd/multiarch
commit 6b253147e699a22845e15603534f4739710d12af
Merge: 3f1fcea 4e41753
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Merge remote-tracking branch 'origin/master' into odd/multiarch
---
GNUmakefile | 17 ++++++++++++----
bcc_5_5_1.make | 4 ++--
como.make | 4 ++--
install_cygwin.bat | 9 ++++-----
install_libxml2_libxslt.make | 1 +
install_mingw.make | 17 ++++++++--------
install_miscellanea.make | 2 +-
install_msw.sh | 2 ++
install_wx.sh | 2 +-
msw_cygwin.make | 46 +++++++++++++++++++++++++++-----------------
msw_generic.make | 8 ++++++++
workhorse.make | 4 ++--
12 files changed, 72 insertions(+), 44 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index 20ebb6a..99544f0 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -84,6 +84,10 @@ MAKEFLAGS := \
# more closely, changing the value of $(datadir), and perhaps using
# some other standard directories that are commented out for now.
+# alternative to 'set_arch.sh'
+LMI_COMPILER ?= gcc
+LMI_TRIPLET ?= i686-w64-mingw32
+
prefix := /opt/lmi
# parent directory for machine-specific binaries
exec_prefix := $(prefix)/$(LMI_COMPILER)_$(LMI_TRIPLET)
@@ -121,6 +125,7 @@ srcdir := $(CURDIR)
localbindir := $(exec_prefix)/local/bin
locallibdir := $(exec_prefix)/local/lib
localincludedir := $(exec_prefix)/local/include
+winebindir := $(prefix)/third_party/bin
test_dir := $(prefix)/test
touchstone_dir := $(prefix)/touchstone
@@ -173,7 +178,7 @@ $(srcdir)/local_options.make:: ;
build_type ?= ship
toolchain ?= gcc
-# Eventually prepend "$(toolchain)-" to $(exec_prefix) .
+
build_dir := $(exec_prefix)/build/$(build_type)
gpl_files := \
@@ -186,6 +191,9 @@ gpl_files := \
# the 'make' command line to override any definition of the same
# variable in $(local_options).
+# alternative to 'set_arch.sh'
+export PATH := $(localbindir):$(locallibdir):$(PATH)
+
MAKETARGET = \
$(MAKE) \
--directory=$@ \
@@ -204,9 +212,11 @@ MAKETARGET = \
localbindir='$(localbindir)' \
locallibdir='$(locallibdir)' \
localincludedir='$(localincludedir)' \
+ winebindir='$(winebindir)' \
test_dir='$(test_dir)' \
touchstone_dir='$(touchstone_dir)' \
- toolchain='$(toolchain)' \
+ LMI_COMPILER='$(LMI_COMPILER)' \
+ LMI_TRIPLET='$(LMI_TRIPLET)' \
build_type='$(build_type)' \
USE_SO_ATTRIBUTES='$(USE_SO_ATTRIBUTES)' \
yyyymmddhhmm='$(yyyymmddhhmm)' \
@@ -216,7 +226,7 @@ MAKETARGET = \
$(build_dir): $(gpl_files)
address@hidden -d $@ ] || $(MKDIR) --parents $@
address@hidden z in $(compiler_runtime_files); \
- do [ -f $@/$$(basename $$z) ] || $(CP) --archive --verbose $$z $@ ; \
+ do [ -f $@/$$(basename $$z) ] || $(CP) --archive $$z $@ ; \
done;
address@hidden(MAKETARGET)
@@ -343,7 +353,6 @@ distclean mostlyclean maintainer-clean: clean
# targets more clearly. To use an alternative like
# rm -rf $(build_dir)/../..
# would be to invite disaster.
-
ifneq ($(build_dir),$(exec_prefix)/build/$(build_type))
$(error Assertion failure: build directory misconfigured)
endif
diff --git a/bcc_5_5_1.make b/bcc_5_5_1.make
index 60d481c..2d0cf0b 100644
--- a/bcc_5_5_1.make
+++ b/bcc_5_5_1.make
@@ -19,7 +19,7 @@
# email: <address@hidden>
# snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
-toolchain := bcc
+LMI_COMPILER := bcc
srcdir := $(CURDIR)
@@ -239,7 +239,7 @@ bcc_5_5_1.make:: ;
--file=$(srcdir)/GNUmakefile \
--jobs=1 \
srcdir='$(srcdir)' \
- toolchain='$(toolchain)' \
+ LMI_COMPILER='$(LMI_COMPILER)' \
gcc_version='$(gcc_version)' \
C_WARNINGS='$(C_WARNINGS)' \
CXX_WARNINGS='$(CXX_WARNINGS)' \
diff --git a/como.make b/como.make
index 619d3fc..8cc9463 100644
--- a/como.make
+++ b/como.make
@@ -33,7 +33,7 @@
# Cf.:
# http://www-d0.fnal.gov/KAI/doc/UserGuide/faq.html#multiple_template_instance
-toolchain := como
+LMI_COMPILER := como
srcdir := $(CURDIR)
@@ -222,7 +222,7 @@ CXX := \
--jobs=1 \
gcc_version='$(gcc_version)' \
srcdir='$(srcdir)' \
- toolchain='$(toolchain)' \
+ LMI_COMPILER='$(LMI_COMPILER)' \
C_WARNINGS='$(C_WARNINGS)' \
CXX_WARNINGS='$(CXX_WARNINGS)' \
C_EXTRA_WARNINGS='$(C_EXTRA_WARNINGS)' \
diff --git a/install_cygwin.bat b/install_cygwin.bat
index cceb4da..7b32e1e 100644
--- a/install_cygwin.bat
+++ b/install_cygwin.bat
@@ -23,21 +23,20 @@
@REM Install Cygwin. See file 'INSTALL'.
-IF EXIST C:\cygwin\NUL GOTO FoundOldInstallation
-IF EXIST C:\cygwin-lmi\NUL GOTO FoundOldInstallation
+IF EXIST C:\cygwin\NUL GOTO FoundOldInstallation
+IF EXIST C:\cygwin64_lmi\NUL GOTO FoundOldInstallation
C:
cd C:\cache_for_lmi
START "Installing Cygwin" /WAIT setup-x86_64 ^
--wait --quiet-mode ^
--site http://mirrors.kernel.org/sourceware/cygwin/ ^
- --root C:/cygwin-lmi --packages ^
+ --root C:/cygwin64_lmi --packages ^
"autoconf,automake,bsdtar,dos2unix,doxygen,gdb,git,libtool,make,openssh,patch,pkg-config,rsync,unzip,wget,zip,zsh"
-cd C:\cygwin-lmi\etc
+cd C:\cygwin64_lmi\etc
echo # >> fstab
echo C:/opt/lmi/MinGW-8_1_0 /MinGW_ lmi_specific binary,user 0 0 >>
fstab
echo C:/opt/lmi /opt/lmi lmi_specific binary,user 0 0 >>
fstab
-echo C:/lmi /lmi lmi_specific binary,user 0 0 >>
fstab
echo C:/cache_for_lmi /cache_for_lmi lmi_specific binary,user 0 0 >>
fstab
echo Cygwin installation seems to have succeeded
GOTO End
diff --git a/install_libxml2_libxslt.make b/install_libxml2_libxslt.make
index fb359b2..77d44a5 100644
--- a/install_libxml2_libxslt.make
+++ b/install_libxml2_libxslt.make
@@ -195,6 +195,7 @@ WGETFLAGS = \
--cut-dirs=$(words $(subst /, ,$(host_path))) \
--force-directories \
--no-host-directories \
+ --no-verbose \
wget_whence = $(host)/$(host_path)
diff --git a/install_mingw.make b/install_mingw.make
index e37f966..9246f5b 100644
--- a/install_mingw.make
+++ b/install_mingw.make
@@ -28,9 +28,9 @@ this_makefile := $(abspath $(lastword $(MAKEFILE_LIST)))
# rather than release its own; lmi uses i686 builds with native
# threads and SJLJ exceptions.
-version := MinGW-8_1_0
+version := MinGW-8_1_0
-file_list = $($(version))
+file_list = $($(version))
# Prefer to set $(prefix) to anything but '/mingw', in order to avoid
# the problem described here:
@@ -42,9 +42,9 @@ file_list = $($(version))
# http://article.gmane.org/gmane.comp.gnu.mingw.user/14748
# [2005-01-17T18:15:26Z from Aaron W. LaFramboise]
-prefix := /MinGW_
+prefix := /MinGW_
-cache_dir := /cache_for_lmi/downloads
+cache_dir := /cache_for_lmi/downloads
ad_hoc_dir := $(prefix)/ad_hoc
@@ -52,7 +52,7 @@ ad_hoc_dir := $(prefix)/ad_hoc
# mirror := http://easynews.dl.sourceforge.net/sourceforge/mingw
# but as of about 2006-12 sf.net seems to select one automatically
# when this is passed to wget:
-mirror := http://downloads.sourceforge.net/mingw-w64
+mirror := http://downloads.sourceforge.net/mingw-w64
# File lists
###################################################################
@@ -107,6 +107,8 @@ ad_hoc_dir_exists = \
.PHONY: all
all: $(file_list)
+ $(MKDIR) --parents $(prefix)
+ $(MKDIR) --parents $(ad_hoc_dir)
$(CP) --archive $(ad_hoc_dir)/mingw32 $(prefix)
$(RM) --force --recursive $(ad_hoc_dir)
@@ -117,13 +119,10 @@ initial_setup:
type "$(WGET)" >/dev/null || { printf '%b' $(wget_missing) &&
false; }
[ ! -e $(prefix) ] || { printf '%b' $(prefix_exists) &&
false; }
[ ! -e $(ad_hoc_dir) ] || { printf '%b' $(ad_hoc_dir_exists) &&
false; }
- $(MKDIR) --parents $(prefix)
- $(RM) --force --recursive $(prefix)
- $(MKDIR) --parents $(ad_hoc_dir)
BSDTARFLAGS := --keep-old-files
-WGETFLAGS :=
+WGETFLAGS := --no-verbose
# Fall back on a native binary if libarchive issue 629 occurs.
diff --git a/install_miscellanea.make b/install_miscellanea.make
index 5a56137..b6f6ee9 100644
--- a/install_miscellanea.make
+++ b/install_miscellanea.make
@@ -262,7 +262,7 @@ TARFLAGS := --keep-old-files
UNZIPFLAGS := -q
-WGETFLAGS := --no-check-certificate
+WGETFLAGS := --no-check-certificate --no-verbose
.PHONY: %.tar.bz2 %.tar.gz
%.tar.bz2 %.tar.gz:
diff --git a/install_msw.sh b/install_msw.sh
index 14c990e..9e3e2a1 100755
--- a/install_msw.sh
+++ b/install_msw.sh
@@ -210,6 +210,8 @@ do
find /cache_for_lmi/downloads -type f | xargs md5sum
. ./set_arch.sh
+# Alternative:
+# export
PATH=/opt/lmi/"${LMI_COMPILER}_${LMI_TRIPLET}"/local/bin:/opt/lmi/"${LMI_COMPILER}_${LMI_TRIPLET}"/local/lib:$minimal_path
make $coefficiency --output-sync=recurse wx_config_check
make $coefficiency --output-sync=recurse show_flags
diff --git a/install_wx.sh b/install_wx.sh
index c2b40fc..f43c7d6 100755
--- a/install_wx.sh
+++ b/install_wx.sh
@@ -89,7 +89,7 @@ case "$build_type" in
esac
# Distinguish wx dll by host type, compiler version, and wx SHA1.
-# generalize 'gcc' to ${LMI_COMPILER}
+# Generalize 'gcc' to ${LMI_COMPILER}
gcc_version=$(${mingw_bin_dir}${LMI_TRIPLET}-gcc -dumpversion|tr -d '\r')
vendor=${LMI_TRIPLET}-$gcc_version-$wx_commit_sha
diff --git a/msw_cygwin.make b/msw_cygwin.make
index 2539fb0..e4cc042 100644
--- a/msw_cygwin.make
+++ b/msw_cygwin.make
@@ -42,10 +42,10 @@ system_root := /cygdrive/c
################################################################################
-# Use cygwin as a quasi-cross-compiler for an i686-pc-mingw32 target.
+# Use cygwin as a quasi-cross-compiler for --host=*-w64-mingw32.
-# For autotoolized libraries, pass these flags to 'configure':
-# cross_compile_flags := --build=i686-pc-cygwin --host=i686-w64-mingw32
+# For autotoolized libraries, pass flags such as these to 'configure':
+# cross_compile_flags := --build=x86_64-pc-cygwin --host=$(LMI_TRIPLET)
################################################################################
@@ -54,28 +54,38 @@ system_root := /cygdrive/c
# Full path to gcc binaries, slash-terminated if nonempty. Setting it
# to an empty string finds gcc on $PATH instead.
-gcc_bin_dir := /MinGW_/bin/
+ifeq (i686-w64-mingw32,$(LMI_TRIPLET))
+ gcc_bin_dir := /MinGW_/mingw32/bin/
+else ifeq (x86_64-w64-mingw32,$(LMI_TRIPLET))
+ gcc_bin_dir := /MinGW_/mingw64/bin/
+else
+ $(warning Unexpected triplet '$(LMI_TRIPLET)')
+endif
-# Oddly, MinGW-w64 provides prefixed versions of compilers:
+# Oddly, MinGW-w64 provides prefixed versions of compilers, e.g.:
# i686-w64-mingw32-gcc.exe
-# i686-w64-mingw32-g++.exe
-# but not of the other tools.
-
-#host_prefix := i686-w64-mingw32-
-host_prefix :=
-
-AR := $(gcc_bin_dir)$(host_prefix)ar
-CC := $(gcc_bin_dir)$(host_prefix)gcc
-CPP := $(gcc_bin_dir)$(host_prefix)cpp
-CXX := $(gcc_bin_dir)$(host_prefix)g++
-LD := $(gcc_bin_dir)$(host_prefix)g++
-RC := $(gcc_bin_dir)$(host_prefix)windres
+# x86_64-w64-mingw32-g++.exe
+# but not of the other tools. Yet its distributed archives each
+# contain a distinct subdirectory indicating word size, e.g.:
+# mingw32/bin/g++.exe in 'i686-*' archives
+# mingw64/bin/g++.exe in 'x86_64-*' archives
+# which can potentially coexist.
+
+#host_hyphen := $(LMI_TRIPLET)-
+host_hyphen :=
+
+AR := $(gcc_bin_dir)$(host_hyphen)ar
+CC := $(gcc_bin_dir)$(host_hyphen)gcc
+CPP := $(gcc_bin_dir)$(host_hyphen)cpp
+CXX := $(gcc_bin_dir)$(host_hyphen)g++
+LD := $(gcc_bin_dir)$(host_hyphen)g++
+RC := $(gcc_bin_dir)$(host_hyphen)windres
# Identify run-time libraries for redistribution. See:
# https://cygwin.com/ml/cygwin/2010-09/msg00553.html
# Of course manipulating an lmi user's $PATH is out of the question.
-compiler_sysroot := /MinGW_/i686-w64-mingw32/lib
+compiler_sysroot := /MinGW_/$(LMI_TRIPLET)/lib
compiler_runtime_files := \
$(wildcard $(compiler_sysroot)/libgcc*.dll) \
diff --git a/msw_generic.make b/msw_generic.make
index 3eb0d26..33b55a5 100644
--- a/msw_generic.make
+++ b/msw_generic.make
@@ -33,6 +33,14 @@ system_root := /
PERFORM := wine
+# $(winebindir) is where 'install_miscellanea.make' places 'md5sum.exe'.
+
+# alternative to 'set_arch.sh'
+w0 := $(shell winepath -w $(localbindir) | sed -e's/\\/\\\\/g')
+w1 := $(shell winepath -w $(locallibdir) | sed -e's/\\/\\\\/g')
+w2 := $(shell winepath -w $(winebindir) | sed -e's/\\/\\\\/g')
+export WINEPATH=$(w0);$(w1);$(w2)
+
################################################################################
# Compiler, linker, and so on.
diff --git a/workhorse.make b/workhorse.make
index 11ac5b3..ce1fd82 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -131,7 +131,7 @@ effective_default_target: $(default_targets)
# $(subst): workaround for debian, whose MinGW-w64 identifies its
# version 7.x.0 as "7.x-win32".
-ifeq (gcc,$(toolchain))
+ifeq (gcc,$(LMI_COMPILER))
gcc_version := $(subst -win32,.0,$(shell $(CXX) -dumpversion))
endif
@@ -678,7 +678,7 @@ CXX_WARNINGS = \
# speed penalty that can be overcome by increasing parallelism. There
# seems to be no need for them with gcc-4.x, which uses less RAM.
-ifeq (gcc,$(toolchain))
+ifeq (gcc,$(LMI_COMPILER))
ifeq (3.4.5,$(gcc_version))
ggc_flags := --param ggc-min-expand=25 --param ggc-min-heapsize=32768
endif