Commit Graph
357 Commits
Author SHA1 Message Date
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ö ecdbfaacc3 Only apply .gitignore ignore rules at the top level 2018-11-20 22:51:35 +02:00
Martin Storsjö ae2a98efba windres: Ignore the --use-temp-file option
This option seems to be used occasionally by projects to work around
various issues with popen in GNU windres.

Our windres wrapper always uses a temp file for the preprocessing
output, so for us the option is a no-op.
2018-11-13 00:35:53 +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
Konstantin Pavlov e0f186967a Don't remove the workdir itself
Since Docker 18.09, this breaks later stages.
2018-11-09 14:09:24 +02:00
Martin Storsjö 9367988be7 Mention the fact that binutils can't use the generated import libraries 2018-11-03 14:26:21 +02:00
Martin Storsjö 8002486c84 clang-target-wrapper: Filter the output from "clang -v" on windows
Convert paths with backslashes to forward slashes.

libtool tries to parse this output in order to find object files and
libraries that always should be linked in, but libtool can't handle
paths with backslashes (and quotes) which clang currently outputs.

This is a quick and ugly workaround until clang can be made to
output paths with forward slashes on windows, see
https://reviews.llvm.org/D53066 for progress on that matter.
2018-11-02 12:31:41 +02:00
Martin Storsjö 643d9c1645 windres: Fix handling of -D/-U options with a space between the option and the name of the define 2018-10-19 09:23:30 +03: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ö a999e54760 Mention prebuilt binaries in the readme 2018-10-17 23:34:13 +03:00
Martin Storsjö f09fc9d618 Add a script for packaging a release 2018-10-17 23:19:43 +03:00
Martin Storsjö fc88912646 Mention ubsan in the readme 2018-10-17 22:45:54 +03:00
Martin Storsjö c9817eca35 Add a testcase for ubsan 2018-10-17 22:45:54 +03:00
Martin Storsjö 6ead0a46b3 Add a known issue about the fact that sanitizers only are supported on x86 2018-10-17 22:45:54 +03:00
Martin Storsjö c1fe94fcef Update compiler-rt to the latest version
This fixes using ubsan with mingw targets.
2018-10-17 22:45:54 +03:00
Martin Storsjö 2244b6cdfa Update llvm/clang/lld to a newer version
This makes the help output from llvm-nm contain keywords that libtool
may look for, makes combined compilation and linking with -flto in
one command work, fixes a bug with alignment of locally imported
symbols on arm64, allows using linker directives for specifying
default libraries to link, and allows linking to undefined behaviour
sanitizer.
2018-10-17 22:45:54 +03:00
Martin Storsjö f47a4009ac Add a separate dockerfile for crosscompiling the toolchain itself 2018-10-17 22:45:54 +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ö 14e7d650f1 Allow building llvm-tblgen/clang-tblgen/llvm-config if needed 2018-10-16 20:27:53 +03:00
Martin Storsjö 5390b58835 Consistently use "COPY .. ./" in Dockerfiles
This avoids potential issues and confusion with cases where a plain "." as
target doesn't work.
2018-10-16 20:25:39 +03:00
Martin Storsjö e9d8d57ec6 Fix adding build-compiler-rt.sh after wiping the build dir
With newer docker versions, "COPY foo .", when the workdir doesn't exist,
produces a plain file named as the workdir, breaking the rest of the build.
2018-10-16 19:42:31 +03:00
Martin Storsjö 3c6e1fe8bc Make a shell script case more compact 2018-10-13 23:57:41 +03:00
Martin Storsjö 73bd1bc62c Provide wrappers named cc/c99/c11/c++ as well 2018-10-10 23:33:19 +03:00
Martin Storsjö 3d1b15b01e Make widl default to prefix/include instead of prefix/target/include, for windows toolchains
In these setups, we already install headers into prefix/include, in
order to save diskspace.
2018-10-10 23:33:19 +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ö 8bfc9a18c6 Error out early if trying to compile ada
If we try to do that, clang would end up calling <triplet>-gcc with the
same arguments. In our setup, this recursively ends up calling clang again,
ending up with infinite recursion.
2018-10-10 23:33:19 +03:00
Martin Storsjö 7bca89b53f Adjust clang-target-wrapper.c to closer match the new windres wrapper 2018-10-10 23:33:19 +03:00
Martin Storsjö b611bc1904 Convert the windres wrapper from shell script to C
This allow running windres on windows without a surrounding posix shell.
2018-10-10 23:33:19 +03:00
Martin Storsjö 9069c627a9 Install unprefixed tools when cross compiling the toolchain 2018-10-10 23:33:19 +03:00
Martin Storsjö b5deb9fc1f Set a default target in wrapper scripts and executables 2018-10-10 23:33:19 +03:00
Martin Storsjö 1bc3d75a41 For cross-built toolchains, rename the clang executable to clang-$MAJOR.exe 2018-10-10 23:33:19 +03:00
Martin Storsjö fb26be33a1 Correct the escaping of arguments passed through on windows 2018-10-10 23:33:18 +03:00
Martin Storsjö b9543f23b9 Mention the lack of llvm-objcopy for COFF as a known issue in the readme 2018-10-09 11:40:26 +03:00
Martin Storsjö 2a3cdc9115 Update the description of the project's status
The level of maturity is generally quite a bit higher now than when
this initially was written.
2018-10-09 11:40:03 +03:00
Martin Storsjö a914746ab2 Remove the mention of other similar projects
The mentioned differences aren't quite as pronounced any longer.
2018-10-09 11:35:16 +03:00
Martin Storsjö 945845fba2 Make a helper function static in clang-target-wrapper.c 2018-10-08 14:15:25 +03:00
Martin Storsjö 818766d3d4 Use posix shell variable expansion substitution instead of subshells with sed 2018-10-08 14:13:42 +03:00
Martin Storsjö 0ec597b1bb Remove inconsistently used braces
Using braces here is fine in itself, but we write most similar cases
without braces, so change it for consistency.
2018-10-08 14:12:55 +03:00
Martin Storsjö 89c91ecaae windres: Print help and version texts to stdout
meson checks the output from --version, and expects to see it on stdout.
2018-10-08 14:12:55 +03:00
Martin Storsjö b1b6c0ba6f windres: Minor cleanups
Make indentation consistent, define a variable used in printing errors,
remove an unused helper function.
2018-10-08 14:12:54 +03:00
Martin Storsjö 03b99b5144 Do one in-bounds write in clean runs of stacksmash.c 2018-10-07 21:00:30 +03:00
Martin Storsjö 461f889187 Update llvm/clang/lld to the latest version
This avoids warnings about both main and wmain being present when linking,
warnings that appeared in the previous update.
2018-10-06 07:44:33 +03:00
Martin Storsjö 99b6407196 Quote arguments in clang-target-wrapper.c
We quote each passed through argument, and escape quote chars in them.

For cases when the passed through argument ends with a backslash, this
fails though, since whatever is unescaping it doesn't seem to handle
double backslashes for escaping backslashes themselves.
2018-10-05 12:46:11 +03:00
Martin Storsjö 22b5681765 Add $EXEEXT as suffix for the ar/ranlib/nm/strings symlinks 2018-10-05 12:46:10 +03:00
Martin Storsjö 10210478ee Update llvm/clang/lld to the latest version
This fixes cases where llvm built without assertions can hang when
assembling a file that references _GLOBAL_OFFSET_TABLE_ for windows
(which is unsupported; previously this used llvm_unreachable making
it undefined what happens if that really is hit).
2018-10-05 09:07:41 +03:00
Martin Storsjö a62ee10c2d Build clang-target-wrapper.c with -municode for windows 2018-10-03 23:06:22 +03:00
Martin Storsjö ad47efba70 Implement clang-target-wrapper as an executable for windows
This allows non-msys build systems to use the triplet prefixed
compiler frontends on windows.

Keep the old shell script version as well, for easier hackability
on unix platforms.
2018-10-03 22:48:36 +03:00
Martin Storsjö 9f3a4a25f2 Support wrappers named <triplet>-c++ in clang-target-wrapper.sh as well
We currently don't install any such wrapper, but one might want to.
2018-10-02 23:38:19 +03:00
Martin Storsjö fb5c95589c Restructure clang-target-wrapper.sh to set one flag per line 2018-10-02 23:38:19 +03:00
Martin Storsjö 7f98eea889 Mention prebuilt docker images from Docker Hub 2018-10-02 21:34:54 +03:00