# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 PortGroup crossgcc 1.0 set mingw_name w64-mingw32 set mingw_arch i686 set mingw_target ${mingw_arch}-${mingw_name} set mingw_prefix ${prefix}/${mingw_target} crossgcc.setup ${mingw_target} 6.2.0 dist_subdir gcc6 # name i686-w64-mingw32-gcc # set branch [join [lrange [split ${version} .] 0 1] .] maintainers mojca openmaintainer checksums rmd160 d9154ca51f40ae3ce42950a0476f701a9f86fc95 \ sha256 9944589fc722d3e66308c0ce5257788ebd7872982a718aa2516123940671b7c5 depends_lib-append port:${mingw_target}-binutils \ port:${mingw_target}-headers # TODO: check the difference in headers installed by MinGW and those by the compiler # this doesn't work configure.args-delete \ --prefix=${prefix} configure.args-append \ --prefix=${mingw_prefix} \ --with-sysroot=${mingw_prefix} \ --disable-multilib \ --enable-shared \ --with-dwarf \ --enable-fully-dynamic-string \ --enable-libssp \ --enable-lto # TODO: # --enable-version-specific-runtime-libs # Installs libgcc/libstdc++ and other target support libraries in such a # way that multiple GCC installs can coexist simultaneously. # --enable-libgomp # Enable OpenMP support, it is not enabled by default on MinGW platforms. # Requires pthreads-win32 (target) installed. # --with-{cloog,ppl}= # Tells GCC where the host support libraries are installed to. # (i.e. search /include & /lib) if {${subport} eq ${name}} { build.target all-gcc destroot.target install-gcc # TODO: this code should be removed once --prefix gets fixed post-destroot { ui_info "path: ${destroot}${mingw_prefix}/bin" foreach file [glob -tails -directory ${destroot}${mingw_prefix}/bin ${mingw_target}-*] { ln -s "${mingw_prefix}/bin/${file}" "${destroot}${prefix}/bin/" } # TODO: # delete contents of ${destroot}/${prefix}/share/x86_64-w64-mingw32-gcc/locale } } subport ${mingw_target}-libgcc { depends_lib-append port:${mingw_target}-crt \ port:${mingw_target}-gcc build.target all-target-libgcc destroot.target install-target-libgcc # move libgcc_*.dll to a more suitable place } subport ${mingw_target}-all { # TODO: pthread-win32 depends_lib-append port:${mingw_target}-gcc \ port:${mingw_target}-libgcc post-destroot { # TODO: # - delete contents of # ${destroot}/${prefix}/share/x86_64-w64-mingw32-gcc/locale } } # TODO: # - first build gcc with "make all-gcc & make install-gcc" # - then build CRT # - then libgcc in the same folder as the compiler was being built (make all-target-libgcc, make install-target-libgcc) # - then pthreads # - and another build of the compiler (make, make install)