Repository navigation
[GCCToolchain] Add native Windows toolchains (i686, x86_64) - #14916
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds
i686-w64-mingw32andx86_64-w64-mingw32to GCCToolchain. Each is anative Windows GCC 15.2 with binutils 2.45.1, cross-built by the GCCBootstrap shard
compilers from the shards' own sources, patches and configuration (
--disable-tls,posix threads, libgomp). It is the same toolchain CompilerSupportLibraries 1.5.7 was
built with, so code compiled with it (or against its headers and import libraries)
matches the runtime Julia ships. MSYS2's GCC 16 does not: its libstdc++ uses a TLS
std::call_onceABI and its winpthreads headers call*64functions, and neitherexists in CSL's DLLs.
Uses:
--sysroot), which avoidsthe
std::__get_once_callable()link errors of Windows: build in rootfs-images v8.10 (GCC 15.2), add scheduled optimized builds JuliaCI/julia-buildkite#636.does with the Linux platforms since rootfs-images v8.8).
Windows-specific choices:
<sysroot>/mingw/{include,lib}. The recipe skipsGCCBootstrap's layout-only
gcc1520_mingw_include.patch; the other patches stillapply. Clang's MinGW driver finds this layout when given the installation root as
--sysroot, with no extra flags.--static, so they do notdepend on whichever
libstdc++/libwinpthreadDLLs come first in the search path.(
-static-libstdc++ends in-Bdynamicbefore the driver's-lpthread, and libtooltreats
-staticas "static libraries only".)gcc.exe, pluscc.exe), as inother native MinGW toolchains. The
<triplet>-gcc.exealiases that clang searchesfor are kept.
bin/.c++config.hdiffers from the shard's, if a hostexecutable or plugin imports anything but system DLLs, or if the prefix contains
symbolic links.
Checked:
libstdc++-6,libgcc_s_seh-1/_sjlj-1,libwinpthread-1,libgfortran-5,libquadmath-0,libgomp-1,libssp-0,libatomic-1) are identical to CSL 1.5.7's, with one exception: the i686libstdc++-6.dllalso exportsstd::ios_base_library_init(), fromgcc1520-libstdcxx-mingw-ios-init-export.patch.<iostream>only references it onELF.
byte-identical to the shard's.
call_once, threads,counting_semaphore), andwindres works.
--sysroot=<root>links against it, with ThinLTO and-fprofile-generate, using the non-TLScall_onceABI.create_sysimage,create_appof its MyApp example) works withits
mingw-w64artifact overridden by this toolchain.(
package-windows-x86_64:v8.5) with this toolchain first onPATH. Everyruntime import in the result resolves against CSL's DLLs, and the shipped DLLs
are CSL's.
Note for i686 clang users: this toolchain uses SJLJ exceptions (as CSL does), so
clang needs
-fsjlj-exceptions. Clang defaults to DWARF on i686 MinGW.