Commit Graph
59 Commits
Author SHA1 Message Date
Martin Storsjö c1882530c3 Add copyright and license headers to all shell script files, for clarity 2020-03-05 11:31:31 +02:00
Martin Storsjö 4f16aa8277 build-mingw-w64: Update to the latest version
This contains a minor assortment of fixes, but also fixes building
widl on BSD.
2020-03-05 11:31:20 +02:00
russellhaley 5fe2e05419 FreeBSD support
Use "gmake" instead of "make" when gmake is available.

The makefile used for libssp is a handwritten one that requires
GNU make features. mingw-w64 uses automake, which in principle should
work with BSD make, but mingw-w64-headers hangs indefinitely if built
with BSD make.
2020-03-04 09:52:22 +02:00
Martin Storsjö 0d08c6ab18 build-mingw-w64: Use make install-strip instead of building with -Wl,-s
These days, we have a working strip tool, so we can do a slightly
more straightforward procedure here.

In build-make.sh we still build with -Wl,-s, as we call a less
obvious install target there, in order to only install mingw32-make.sh,
not some header files and documentation.
2019-12-28 00:24:50 +02:00
Martin Storsjö 57c4f47db3 Add the --host flag to the help output in the individual build scripts 2019-12-21 00:04:47 +02:00
Martin Storsjö 8bf82393b1 build-mingw-w64: Update to the latest version
This contains new declarations that the latest version of llvm
requires, when building llvm for windows on aarch64.

Notable changes are:
- Fixed compatibility fallbacks for running libc++ on Windows 7
- Improved handling of multibyte functions with UCRT
- Fixed installing mingw-w64-crt and widl in paths that contain spaces
- Fixed sscanf with double output on arm/aarch64
- Improved math functions, in particular for arm/aarch64
2019-12-19 22:38:47 +02:00
Martin Storsjö cd8e71d0e7 Make it possible to override the default win32 target version and mingw-w64 via environment variables
This makes it easier to change the default win32 target when using
build-all.sh, and also makes it possible to change the version of
mingw-w64 that is used, which wasn't possible at all before.
2019-12-19 22:21:02 +02:00
Jacek Caban f862f91c1c Allow overriding default llvm and msvcrt versions.
build-mingw-w64.sh already provides --with-default-msvcrt option, but
this makes it more convenient to use build-all.sh with non-default
msvcrt config.
2019-12-19 22:18:22 +02:00
Martin Storsjö af1099048a Fix building only certain architectures when building on windows
On windows, we rename clang.exe to clang-$MAJOR.exe, and later
install clang.exe as a wrapper for the default architecture. But
if only building certain architectures, and the host architecture
isn't one of them, we shouldn't install any unprefixed clang.exe at
all.
2019-12-03 23:31:01 +02:00
Martin Storsjö 64d39428b6 Quote uses of $PREFIX in the build script, to improve support for installing into a path that contains spaces
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.
2019-12-03 21:49:53 +02:00
Martin Storsjö ee555b9013 Fix building when $PATH contains spaces 2019-11-30 10:37:19 +02:00
Martin Storsjö 3d13aefc70 Bump the default _WIN32_WINNT to 0x0601, i.e. Windows 7
Since the C++ libraries require Windows 7, there's little point in
keeping the default target for C at Vista.
2019-11-26 12:16:38 +02:00
Martin Storsjö 577400a5f7 Pass $HOST to individual script with a --host parameter
This avoids ambiguity on distributions (such as openSUSE) where the
HOST environment variable already is set, to the hostname.
2019-11-13 12:55:39 +02:00
Martin Storsjö ecb0824234 build-mingw-w64: Update the mingw-w64 version
This version contains fixes for wchar printf functions in how they
handle %s/%S formats.

This isn't the absolute latest version, as there's other commits further
ahead adding support for _FORTIFY_SOURCE (which has little to no effect
with Clang as it doesn't evaluate __builtin_object_size in inlined
contexts), and the commits for _FORTIFY_SOURCE caused a few regressions,
and things might still be a bit in flux (even though the current master
seems to work fine).
2019-09-20 11:27:27 +03:00
Martin Storsjö d4a27dfd80 Stop manually setting CC/AR/RANLIB when building autotools projects
Since we have triplet prefixed wrappers for all tools, and wrappers
named <triplet>-gcc/g++ as well, we don't need to manually provide
them.
2019-08-13 12:51:42 +03:00
Martin Storsjö da4562be1b Update to the latest version of mingw-w64
This version includes fixes for a lot of c99 math functions.
2019-08-01 22:30:32 +03:00
Martin Storsjö 5f70dd1a1f Avoid errors when recreating an existing symlink on msys2
In this environment, symlinks don't exist but are made as copies.
In such cases, the -n option to ln doesn't work for making this
a no-op.

Alternatively, we could append "|| true", which would print an
error but continue.
2019-06-28 00:13:24 +03:00
Martin Storsjö c89799c996 Restore the original path before building widl
When building on windows, the toolchain bin directory contains
prefixless wrappers named "gcc.exe" and "clang.exe", even though
the toolchain isn't functional yet at this stage. Restore the
original path before building widl.

A more complete solution might be to build widl first, before
adding the newly built toolchain to the path.
2019-06-28 00:12:10 +03:00
Martin Storsjö f80d067176 Only make the prefixless widl symlink after compiling widl
When building in msys2, symlinks are plain copies, and one can't
make the symlink in advance.
2019-06-21 22:52:34 +03:00
Martin Storsjö 9d8339b48d Update mingw-w64 to the latest version
This version fixes deadlocks in winpthreads condvars (in certain
use patterns), uses the _UCRT define to request and signal the
use of UCRT, fixes the UCRT _vsnwprintf function, uses the
CRT's setjmp/longjmp on AArch64 if SEH is in use, and makes the
UCRT set the app type to console properly for such apps.
2019-05-28 13:54:51 +03:00
Martin Storsjö 571aa86e6a Update mingw-w64 to a newer version
This version contains more fixes for the logbl/ilogb math functions.
2019-04-29 12:17:07 +03:00
Martin Storsjö 583e9f2a78 Update to the latest version of mingw-w64
This version fixes a number of math functions.
2019-04-20 07:30:27 +03:00
Martin Storsjö a484ddba04 Stop using --enable-secure-api with mingw-w64 headers
This is on by default now, and the option is ignored (and produces
a warning).
2019-04-18 14:16:32 +03:00
Martin Storsjö 978a430069 Update mingw-w64 to a yet newer version
This improves math functions in libmsvcrt-os.a for arm/arm64, and
improves the acosh function for x86.
2019-04-16 14:53:54 +03:00
Martin Storsjö 5f846336c0 Bump to a newer version of mingw-w64
This version contains a number of improvements for the arm CRT
libraries.
2019-04-15 14:05:22 +03:00
Martin Storsjö 053c581e1f Allow overriding which CRT to use by default 2019-04-06 23:01:27 +03:00
Martin Storsjö b9e0685167 Update mingw-w64 to the latest version from today 2019-03-19 00:30:54 +02:00
Martin Storsjö add8d6ee31 Update mingw-w64 to the latest version
This fixes issues with the _xgetbv builtin in latest trunk versions
of clang.
2019-01-24 10:58:20 +02:00
Martin Storsjö 5004db0de6 Update mingw-w64 to the latest version
This fixes symbol availability of __C_specific_handler for
use of SEH on arm64.
2018-12-20 12:10:15 +02:00
Hugo Beauzée-Luyssen 07d47e3edd Bump mingw-w64 hash
This version has stubs for RtlCaptureContext which allows using SEH for
windows store
2018-12-13 10:14:01 +01:00
Martin Storsjö 1f838437ca Automatically set EXEEXT in build-mingw-w64.sh and strip-llvm.sh 2018-11-30 12:03:09 +02:00
Martin Storsjö 53db1c3a4c Resolve $PREFIX to an absolute path at the start of shell scripts
This fixes building/installing into a relative path.
2018-11-23 13:51:05 +02:00
Martin Storsjö 99e2fefc9d Use nproc and sysctl -n hw.cpu for default initializing CORES
This avoids having to pass --build-arg CORES=n when building the
docker images.
2018-11-09 22:20:34 +02:00
Martin Storsjö af069a9c29 Update to the latest version of mingw-w64
This fixes the _isdigit_l function for UCRT, fixing iostream formatting
of numbers in certain cases, in cases e.g. like this:
    double test = 1.0 / 3.0;
    std::cout << test << std::endl;
2018-10-19 09:15:43 +03:00
Martin Storsjö f5008d5380 Merge build-mingw-w64-widl.sh back into build-mingw-w64.sh
This allows checking out the mingw-w64 repo if it is missing, when
building widl.
2018-10-17 22:45:54 +03:00
Martin Storsjö f16867dd20 Update mingw-w64 to the latest version
This version allows overriding the default include directory used
by widl.
2018-10-10 23:33:19 +03:00
Martin Storsjö fb4862b0d6 Split out building widl to a separate shell script
When cross compiling a llvm-mingw toolchain, we need to build widl
for the intended host environment as well.
2018-10-02 21:34:54 +03:00
Martin Storsjö 4d110b4508 Update mingw-w64 to the latest version
This fixes a few headers as necessary for building asan, and
fixes cross compiling widl.
2018-10-02 14:53:53 +03:00
Martin Storsjö 6edb1a60e9 Update to the latest version of mingw-w64
This makes sure that exiting by calling _exit or ExitProcess doesn't
run global objects' destructors, which happened since starting to use
__cxa_atexit since 11e04f0466.
This fixes LLD built for windows with this toolchain.
2018-08-23 23:51:01 +03:00
Martin Storsjö 27b46b855f Update mingw-w64 to the latest version
This version fixes building with the latest version of clang.
2018-08-08 08:40:48 +03:00
Martin Storsjö c21fb8356e Update mingw-w64 to the latest version
This version provides __cxa_thread_atexit, for supporting destructors
for TLS objects.
2018-08-02 23:28:39 +03:00
Martin Storsjö 4981924170 Update mingw-w64 to the latest version
This version has improvements for building for WinRT/UWP.
2018-07-16 23:30:54 +03:00
Martin Storsjö 6e4478b778 Fix overwriting symlinks to directories
This avoids extra misplaced symlinks if rerunning the build scripts.
2018-07-16 23:02:38 +03:00
Martin Storsjö d12ee1543e Use the windows api sets version of the universal crt 2018-06-28 11:48:39 +03:00
Martin Storsjö 6ba6ac5c52 Upgrade to the latest version of mingw-w64
This version includes the windows api sets version of the universal
crt, fixes a few other functions when used with the universal crt,
and fixes the widl tool when running on macos.
2018-06-28 11:47:55 +03:00
Martin Storsjö 4fe1cb9aad Update mingw-w64 to the latest version
This fixes interlocked intrinsics for arm and arm64, and fixes
the copysignl function for x86_64.
2018-06-04 10:08:47 +03:00
Martin Storsjö fd71e83e2d Update to the latest version of mingw-w64
This version includes fixes for building winpthreads for arm and arm64.
2018-05-07 09:45:38 +03:00
Martin Storsjö c47bc66093 Update to the latest version of mingw-w64
This version fixes a few issues for arm and arm64.
2018-04-15 23:21:58 +03:00
Martin Storsjö 60af9e29e1 Strip the built widl 2018-04-01 22:45:30 +03:00
Martin Storsjö 93e7810749 Share one include directory between all archs 2018-04-01 22:45:30 +03:00