forked from niXman/mingw-builds
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'mingwpy/mingwpy-dev' into develop
* mingwpy/mingwpy-dev: _WIN32_WINNT fallback patch update toolchain revision date update fpclassify patch temporary add specs files for msvcr90 and msvcr100 C-runtimes README.md more fixed for markup README.md reformat for Markdown Rename README to README.md floating point related configurations and patches - fix for latest mingw-w64 trunk more floating point related configurations and patches floating point related configurations and patches Fix for binutils IMPORT_DATA support by @njsmith mingwpy customization - anoth. fix for mingwpy_readme.md mingwpy customization - fix mingwpy_readme.md mingwpy customization - fix whitespace mingwpy customization - part 2 mingwpy customization - part 1
- Loading branch information
Showing
17 changed files
with
1,058 additions
and
76 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,132 +1,120 @@ | ||
The scripts provided by the MinGW-W64 project[1] are designed | ||
The scripts provided by the | ||
[MinGW-W64 project](http://sourceforge.net/projects/mingw-w64/) are designed | ||
for building the dual-target(i686/x86_64) MinGW-W64 compiler for i686/x86_64 hosts. | ||
|
||
The scripts are distributed under the 'BSD 3' license[2]. | ||
The scripts are distributed under the | ||
['BSD 3' license](http://www.opensource.org/licenses/BSD-3-Clause). | ||
|
||
In order to use the scripts provided by the MinGW-W64 project it is needed: | ||
|
||
1. Windows-64bit or Linux + Wine-64bit | ||
|
||
2. Install MSYS2 from: | ||
`http://sourceforge.net/projects/msys2/` | ||
http://sourceforge.net/projects/msys2/ | ||
(MSYS2 wiki: http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/) | ||
|
||
3. Get the scripts into `<msys root>/home/<user>/mingw-builds`: | ||
`cd && git clone <paste correct url>` | ||
3. Get the scripts into '<msys root>/home/<user>/mingw-builds' | ||
``` | ||
cd && git clone <paste correct url> | ||
``` | ||
(see the diff between the 'master' and 'develop' branches, maybe you need | ||
the 'develop' branch exactly) | ||
|
||
4. In the MSYS2 file structure delete the `/MinGW` directory. | ||
4. In the MSYS2 file structure delete the '/MinGW' directory. | ||
|
||
5. Delete the paths pointing to any preinstalled MinGW from the `PATH` | ||
5. Delete the paths pointing to any preinstalled MinGW from the 'PATH' | ||
environment variable. | ||
|
||
6. Go into the MinGW-builds root directory. | ||
`cd && cd mingw-builds` | ||
``` | ||
cd && cd mingw-builds | ||
``` | ||
|
||
7. Options: | ||
``` | ||
--mode=[gcc|python|clang]-version` - what package to build with version. | ||
--arch=<i686|x86_64>` - build architecture. | ||
--buildroot=<path>` - using '<path>' as build directory. | ||
``` | ||
`--mode=[gcc|python|clang]-version` - what package to build with version. | ||
`--arch=<i686|x86_64>` - build architecture. | ||
`--buildroot=<path>` - using '<path>' as build directory. | ||
By default used MSYS user home directory. | ||
--fetch-only` - only download all the sources without start building. | ||
--update-sources` - try to update sources from repositories before build. | ||
--exceptions=<model>` - exceptions handling model. | ||
Available: dwarf, seh(gcc>=4.8.0 only), sjlj, dwarfseh (picks by architecture). | ||
--use-lto` - building with using LTO. | ||
--no-strip` - don't strip executables during install. | ||
--no-multilib` - build GCC without multilib support (default for DWARF and SEH exception models). | ||
--static-gcc` - build static GCC. | ||
--dyn-deps` - build GCC with dynamically dependencies. | ||
--rt-version=<v3|v4|v5|v6>` - version of mingw-w64 runtime to build. | ||
--rev=N` - number of the build revision. | ||
--with-testsuite` - run testsuite for packages that contain flags for it. | ||
--threads=<posix|win32>` - used threads model. | ||
--enable-languages=<langs>` - comma separated list(without spaces) of gcc supported languages. | ||
`--fetch-only` - only download all the sources without start building. | ||
`--update-sources` - try to update sources from repositories before build. | ||
`--exceptions=<model>` - exceptions handling model. | ||
Available: dwarf, seh(gcc>=4.8.0 only), sjlj. | ||
`--use-lto` - building with using LTO. | ||
`--no-strip` - don't strip executables during install. | ||
`--no-multilib` - build GCC without multilib support (default for DWARF and SEH exception models). | ||
`--static-gcc` - build static GCC. | ||
`--dyn-deps` - build GCC with dynamically dependencies. | ||
`--rt-version=<v3|v4>` - version of mingw-w64 runtime to build. | ||
`--rev=N` - number of the build revision. | ||
`--with-testsuite` - run testsuite for packages that contain flags for it. | ||
`--threads=<posix|win32>` - used threads model. | ||
`--enable-languages=<langs>` - comma separated list(without spaces) of gcc supported languages. | ||
available languages: ada,c,c++,fortran,objc,obj-c++ | ||
``` | ||
For more options run: "./build --help" | ||
|
||
``` | ||
For more options run: `./build --help` | ||
|
||
8. Run: | ||
* `./build --mode=gcc-4.8.1 --arch=i686` for building i686-MinGW-w64 | ||
* `./build --mode=gcc-4.8.1 --arch=x86_64` for building x86_64-MinGW-w64 | ||
* `./build --mode=gcc-4.8.1 --arch=x86_64 --preload` for preload sources and building x86_64-MinGW-w64 | ||
* `./build --mode=gcc-4.8.1 --arch=i686 --exceptions=dwarf` for building i686-MinGW-w64 with DWARF exception handling | ||
``` | ||
`./build --mode=gcc-4.8.1 --arch=i686` for building i686-MinGW-w64 | ||
`./build --mode=gcc-4.8.1 --arch=x86_64` for building x86_64-MinGW-w64 | ||
`./build --mode=gcc-4.8.1 --arch=x86_64 --preload` for preload sources and building x86_64-MinGW-w64 | ||
`./build --mode=gcc-4.8.1 --arch=i686 --exceptions=dwarf` for building i686-MinGW-w64 with DWARF exception handling | ||
``` | ||
|
||
For example, during the process of building of the i686-gcc-4.7.2 will | ||
be created the following directories: | ||
``` | ||
``` | ||
<buildroot>/i686-4.7.2-release-posix-sjlj-rev1/build | ||
<buildroot>/i686-4.7.2-release-posix-sjlj-rev1/libs | ||
<buildroot>/i686-4.7.2-release-posix-sjlj-rev1/logs | ||
<buildroot>/i686-4.7.2-release-posix-sjlj-rev1/prefix | ||
``` | ||
|
||
For x86_64: | ||
``` | ||
<buildroot>/x86_64-4.7.2-release-posix-sjlj-rev1/build | ||
<buildroot>/x86_64-4.7.2-release-posix-sjlj-rev1/libs | ||
<buildroot>/x86_64-4.7.2-release-posix-sjlj-rev1/logs | ||
<buildroot>/x86_64-4.7.2-release-posix-sjlj-rev1/prefix | ||
``` | ||
|
||
And the sources directory: | ||
`<buildroot>/src` | ||
|
||
``` | ||
<buildroot>/mingw-sources | ||
``` | ||
|
||
The archives with the built MinGW will be created in `<buildroot>/archives/` | ||
The archives with the built MinGW will be created in '<buildroot>/archives/' | ||
|
||
At the moment, successfully building the following versions: | ||
``` | ||
gcc-4.6.2 | ||
gcc-4.6.3 | ||
gcc-4.6.4 | ||
gcc-4.7.0 | ||
gcc-4.7.1 | ||
gcc-4.7.2 | ||
gcc-4.7.3 | ||
gcc-4.7.4 | ||
gcc-4.8.0 | ||
gcc-4.8.1 | ||
gcc-4.8.2 | ||
gcc-4.8.3 | ||
gcc-4.8.4 | ||
gcc-4.8.5 | ||
gcc-4.9.0 | ||
gcc-4.9.1 | ||
gcc-4.9.2 | ||
gcc-4.9.3 | ||
gcc-4.9.4 | ||
gcc-5.1.0 | ||
gcc-5.2.0 | ||
gcc-5.3.0 | ||
gcc-5.4.0 | ||
gcc-5.5.0 | ||
gcc-6.1.0 | ||
gcc-6.2.0 | ||
gcc-6.3.0 | ||
gcc-6.4.0 | ||
gcc-7.1.0 | ||
gcc-7.2.0 | ||
gcc-7.3.0 | ||
gcc-8.1.0 | ||
gcc-8.2.0 | ||
gcc-4_6-branch (currently 4.6.5 prerelease) | ||
gcc-4_7-branch (currently 4.7.5 prerelease) | ||
gcc-4_8-branch (currently 4.8.6 prerelease) | ||
gcc-4_9-branch (currently 4.9.5 prerelease) | ||
gcc-5-branch (currently 5.6.0 prerelease) | ||
gcc-6-branch (currently 6.5.0 prerelease) | ||
gcc-7-branch (currently 7.4.0 prerelease) | ||
gcc-8-branch (currently 8.3.0 prerelease) | ||
gcc-trunk (currently 9.0.0 snapshot) | ||
gcc-4_7-branch (currently 4.7.4 prerelease) | ||
gcc-4_8-branch (currently 4.8.3 prerelease) | ||
gcc-4_9-branch (currently 4.9.4 prerelease) | ||
gcc-5-branch (currently 5.3.0 prerelease) | ||
gcc-trunk (currently 6.0.0 snapshot) | ||
``` | ||
|
||
Builds also contains patches for building Python 2.7.9 and 3.4.3 versions for support gdb pretty printers. | ||
Big thanks for these patches to: | ||
``` | ||
2010-2013 Roumen Petrov, Руслан Ижбулатов | ||
2012-2015 Ray Donnelly, Alexey Pavlov | ||
``` | ||
|
||
[1] http://sourceforge.net/projects/mingw-w64/ | ||
[2] http://www.opensource.org/licenses/BSD-3-Clause | ||
``` |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
*asm: | ||
%{m32:--32} %{m64:--64} | ||
|
||
*asm_debug: | ||
%{!g0:%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}} %{fdebug-prefix-map=*:--debug-prefix-map %*} | ||
|
||
*asm_final: | ||
%{gsplit-dwarf: | ||
objcopy --extract-dwo %{c:%{o*:%*}%{!o*:%b%O}}%{!c:%U%O} %{c:%{o*:%:replace-extension(%{o*:%*} .dwo)}%{!o*:%b.dwo}}%{!c:%b.dwo} | ||
objcopy --strip-dwo %{c:%{o*:%*}%{!o*:%b%O}}%{!c:%U%O} } | ||
|
||
*asm_options: | ||
%{-target-help:%:print-asm-header()} %{v} %{w:-W} %{I*} %{gz*:%e-gz is not supported in this configuration} %a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O} | ||
|
||
*invoke_as: | ||
%{!fwpa*: %{fcompare-debug=*|fdump-final-insns=*:%:compare-debug-dump-opt()} %{!S:-o %|.s | | ||
as %(asm_options) %m.s %A } } | ||
|
||
*cpp: | ||
%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} %{municode:-DUNICODE} %{pthread:-D_REENTRANT} %{!no-pthread:-U_REENTRANT} -D__MSVCRT_VERSION__=0x1000 | ||
|
||
*cpp_options: | ||
%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w} %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*} %{undef} %{save-temps*:-fpch-preprocess} | ||
|
||
*cpp_debug_options: | ||
%{d*} | ||
|
||
*cpp_unique_options: | ||
%{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*&F*} %{P} %I %{MD:-MD %{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{!MT:%{!MQ:%{MD|MMD:%{o*:-MQ %*}}}}}}} %{remap} %{g3|ggdb3|gstabs3|gcoff3|gxcoff3|gvms3:-dD} %{!iplugindir*:%{fplugin*:%:find-plugindir()}} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{E|M|MM:%W{o*}} | ||
|
||
*trad_capable_cpp: | ||
cc1 -E %{traditional|traditional-cpp:-traditional-cpp} | ||
|
||
*cc1: | ||
%(cc1_cpu) | ||
|
||
*cc1_options: | ||
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %{!iplugindir*:%{fplugin*:%:find-plugindir()}} %1 %{!Q:-quiet} %{!dumpbase:-dumpbase %B} %{d*} %{m*} %{aux-info*} %{fcompare-debug-second:%:compare-debug-auxbase-opt(%b)} %{!fcompare-debug-second:%{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}}%{!c:%{!S:-auxbase %b}} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{Qy:} %{-help:--help} %{-target-help:--target-help} %{-version:--version} %{-help=*:--help=%*} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*} %{coverage:-fprofile-arcs -ftest-coverage} -mincoming-stack-boundary=2 | ||
|
||
*cc1plus: | ||
-mincoming-stack-boundary=2 -D__MSVCRT_VERSION__=0x1000 | ||
|
||
*link_gcc_c_sequence: | ||
%G %L %G | ||
|
||
*link_ssp: | ||
%{fstack-protector|fstack-protector-all|fstack-protector-strong|fstack-protector-explicit:-lssp_nonshared -lssp} | ||
|
||
*endfile: | ||
%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} %{!shared:%:if-exists(default-manifest.o%s)} %{fvtable-verify=none:%s; fvtable-verify=preinit:vtv_end.o%s; fvtable-verify=std:vtv_end.o%s} crtend.o%s | ||
|
||
*link: | ||
%{m64:-m i386pep} %{!m64:-m i386pe} %{mwindows:--subsystem windows} %{mconsole:--subsystem console} %{shared: %{mdll: %eshared and mdll are not compatible}} %{shared: --shared} %{mdll:--dll} %{static:-Bstatic} %{!static:-Bdynamic} %{shared|mdll: %{m64:-e DllMainCRTStartup} %{!m64:-e _DllMainCRTStartup@12} --enable-auto-image-base} %(shared_libgcc_undefs) | ||
|
||
*lib: | ||
%{pg:-lgmon} %{pthread:-lpthread} %{!no-pthread: } %{mwindows:-lgdi32 -lcomdlg32} %{fvtable-verify=preinit:-lvtv -lpsapi; fvtable-verify=std:-lvtv -lpsapi} -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv | ||
|
||
*link_gomp: | ||
|
||
|
||
*libgcc: | ||
%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcr100 | ||
|
||
*startfile: | ||
%{shared|mdll:dllcrt2%O%s} %{!shared:%{!mdll:%{!municode:crt2%O%s}}} %{!shared:%{!mdll:%{municode:crt2u%O%s}}} %{pg:gcrt2%O%s} crtbegin.o%s %{fvtable-verify=none:%s; fvtable-verify=preinit:vtv_start.o%s; fvtable-verify=std:vtv_start.o%s} | ||
|
||
*cross_compile: | ||
0 | ||
|
||
*version: | ||
5.3.0 | ||
|
||
*multilib: | ||
. !m64 !m32;.:../lib64 m64 !m32;.:../lib !m64 m32; | ||
|
||
*multilib_defaults: | ||
m32 | ||
|
||
*multilib_extra: | ||
|
||
|
||
*multilib_matches: | ||
m64 m64;m32 m32; | ||
|
||
*multilib_exclusions: | ||
|
||
|
||
*multilib_options: | ||
m64/m32 | ||
|
||
*multilib_reuse: | ||
|
||
|
||
*linker: | ||
collect2 | ||
|
||
*linker_plugin_file: | ||
|
||
|
||
*lto_wrapper: | ||
|
||
|
||
*lto_gcc: | ||
|
||
|
||
*link_libgcc: | ||
%D | ||
|
||
*md_exec_prefix: | ||
|
||
|
||
*md_startfile_prefix: | ||
|
||
|
||
*md_startfile_prefix_1: | ||
|
||
|
||
*startfile_prefix_spec: | ||
|
||
|
||
*sysroot_spec: | ||
--sysroot=%R | ||
|
||
*sysroot_suffix_spec: | ||
|
||
|
||
*sysroot_hdrs_suffix_spec: | ||
|
||
|
||
*self_spec: | ||
|
||
|
||
*cc1_cpu: | ||
%{march=native:%>march=native %:local_cpu_detect(arch) %{!mtune=*:%>mtune=native %:local_cpu_detect(tune)}} %{mtune=native:%>mtune=native %:local_cpu_detect(tune)} | ||
|
||
*shared_libgcc_undefs: | ||
|
||
|
||
*link_command: | ||
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %{!fno-use-linker-plugin:%{!fno-lto: -plugin %(linker_plugin_file) -plugin-opt=%(lto_wrapper) -plugin-opt=-fresolution=%u.res %{!nostdlib:%{!nodefaultlibs:%:pass-through-libs(%(link_gcc_c_sequence))}} }}%{flto|flto=*:%<fcompare-debug*} %{flto} %{fno-lto} %{flto=*} %l %{pie:-pie} %{fuse-ld=*:-fuse-ld=%*} %{gz*:%e-gz is not supported in this configuration} %X %{o*} %{e*} %{N} %{n} %{r} %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} %{!nostdlib:%{fvtable-verify=std: -lvtv -u_vtable_map_vars_start -u_vtable_map_vars_end} %{fvtable-verify=preinit: -lvtv -u_vtable_map_vars_start -u_vtable_map_vars_end}} %{static:} %{L*} %(mfwrap) %(link_libgcc) %{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):} %{%:sanitize(thread):} %{%:sanitize(leak):}}} %o %{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %{fcilkplus:%:include(libcilkrts.spec)%(link_cilkrts)} %{fgnu-tm:%:include(libitm.spec)%(link_itm)} %(mflib) %{fsplit-stack: --wrap=pthread_create} %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} %{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):%{static-libasan:-Bstatic} -lasan %{static-libasan:-Bdynamic} %{static-libasan:%:include(libsanitizer.spec)%(link_libasan)} %{static:%ecannot specify -static with -fsanitize=address}} %{%:sanitize(thread):%{static-libtsan:-Bstatic} -ltsan %{static-libtsan:-Bdynamic} %{static-libtsan:%:include(libsanitizer.spec)%(link_libtsan)} %{static:%ecannot specify -static with -fsanitize=thread}} %{%:sanitize(undefined):%{static-libubsan:-Bstatic} -lubsan %{static-libubsan:-Bdynamic} %{static-libubsan:%:include(libsanitizer.spec)%(link_libubsan)}} %{%:sanitize(leak):%{static-liblsan:-Bstatic} -llsan %{static-liblsan:-Bdynamic} %{static-liblsan:%:include(libsanitizer.spec)%(link_liblsan)}}}} %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}} %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}} | ||
|
Oops, something went wrong.