Extend the aarch64-w64-mingw32 prefix to provide ARM64EC libraries
alongside standard AArch64 libraries, replacing the separate
arm64ec-w64-mingw32 prefix. This aligns with how MSVC distributes
ARM64EC libraries and enables the linker to process both targets
simultaneously into a single hybrid binary.
This extensively utilizes LLVM's -marm64x option, compiling both
targets in a single compiler invocation to produce hybrid object
files (unlike MSVC tools, which require separate compilation passes).
This reverts commit 64effa9a71.
It turns out that the LLD handling of the TLS data structures
("_tls_used" and "_tls_index") needs more work, causing the
arm64ec side of arm64x binaries to not get them hooked up properly.
Extend the aarch64-w64-mingw32 prefix to provide ARM64EC libraries
alongside standard AArch64 libraries, replacing the separate
arm64ec-w64-mingw32 prefix. This aligns with how MSVC distributes
ARM64EC libraries and enables the linker to process both targets
simultaneously into a single hybrid binary.
This extensively utilizes LLVM's -marm64x option, compiling both
targets in a single compiler invocation to produce hybrid object
files (unlike MSVC tools, which require separate compilation passes).
This was not converted in 5fe2e05419,
probably because those (automake based) makefiles work fine with
BSD make.
Use $MAKE here anyway, for consistency.
The install(1) tool on macOS doesn't support the -D option for
creating directories at the same time while installing files.
Therefore, run a separate step for creating directories. Doing that
with "mkdir -p", even if install(1) also could do that with the -d
option (likewise with a separate command).
Also stop specifying the destination file name, when it's equal to
the source files, now that we know that the destination directory
already exists.
Install copyright notices into the final package. This makes LLVM MinGW
comply with many of the licenses (which require attribution), and also
makes it easier for users of LLVM MinGW to audit licenses of software
they use.
For build-mingw-w64.sh to succeed when installing to such a path,
the mingw-w64 version has to be updated to the latest git master.
build-mingw-w64-libraries.sh still fails in this case, as libtool
fails to properly quote $LD in a test for whether the linker is GNU ld.
On some distributions, e.g. openSUSE, the libraries for 64 bit
architectures end up stored in <target>/<triplet>/lib64 instead of
plain "lib".
(This is caused by their use of a site script for configure, which
overrides libdir when the host triplet matches 64 bit architecture
names - even if it's a triple for cross compilation for a totally
different OS. This only affects the libraries and not mingw-w64-crt,
as the crt's makefiles manually set the output directory name.)
This fixes https://github.com/mstorsjo/llvm-mingw/issues/51.