Skip to content

Commit

Permalink
Enable Fortran compiler in all builds
Browse files Browse the repository at this point in the history
When I first put w64devkit together, there were incompatibilities with
Binutils and supporting gfortran was difficult. It's been stable for
years, and I want to simplify the download options.
  • Loading branch information
skeeto committed Jul 29, 2024
1 parent 6b6b644 commit 85a52aa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 32 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ RUN cat $PREFIX/src/gcc-*.patch | patch -d/gcc-$GCC_VERSION -p1 \
--enable-static \
--disable-shared \
--with-pic \
--enable-languages=c,c++ \
--enable-languages=c,c++,fortran \
--enable-libgomp \
--enable-threads=posix \
--enable-version-specific-runtime-libs \
Expand Down Expand Up @@ -263,7 +263,7 @@ RUN /gcc-$GCC_VERSION/configure \
--with-mpc-lib=/deps/lib \
--with-mpfr-include=/deps/include \
--with-mpfr-lib=/deps/lib \
--enable-languages=c,c++ \
--enable-languages=c,c++,fortran \
--enable-libgomp \
--enable-threads=posix \
--enable-version-specific-runtime-libs \
Expand Down Expand Up @@ -301,7 +301,7 @@ RUN $ARCH-gcc -DEXE=gcc.exe -DCMD=cc \
-o $PREFIX/bin/c89.exe $PREFIX/src/alias.c -lkernel32 \
&& printf '%s\n' addr2line ar as c++filt cpp dlltool dllwrap elfedit g++ \
gcc gcc-ar gcc-nm gcc-ranlib gcov gcov-dump gcov-tool ld nm objcopy \
objdump ranlib readelf size strings strip windmc windres \
objdump ranlib readelf size strings strip windmc windres gfortran \
| xargs -I{} -P$(nproc) \
$ARCH-gcc -DEXE={}.exe -DCMD=$ARCH-{} \
-Os -fno-asynchronous-unwind-tables \
Expand Down
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Portable C and C++ Development Kit for x64 Windows
# Portable C, C++, and Fortran Development Kit for x64 and x86 Windows

[w64devkit][] is a Dockerfile that builds from source a small, portable
development suite for creating C and C++ applications on and for x64
Expand Down Expand Up @@ -83,12 +83,6 @@ then the hint is zeroed: "no data." Eliminating this random data makes
binaries more compressible and *theoretically* faster loading. See also:
`peports`.

## Fortran support

Only C and C++ are included by default, but w64devkit also has full
support for Fortran. To build a Fortran compiler, add `fortran` to the
`--enable-languages` lines in the Dockerfile.

## Recommended downloadable, offline documentation

With a few exceptions, such as Vim's built-in documentation (`:help`),
Expand Down
6 changes: 1 addition & 5 deletions multibuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ usage: multibuild.sh [-48abfhnOs] [-s SUFFIX]
-4 Enable i686 build (default: no)
-8 Enable x86_64 build (default: auto)
-a All: Enable all builds
-b Enable vanilla build (default: auto)
-f Enable Fortran build (default: no)
-h Print this help message
-n Dry run, print commands but do nothing
-O Compact with advzip (default: no, less compatible)
Expand All @@ -33,9 +31,7 @@ while getopts 48abfhmnOs: opt; do
case $opt in
4) arch="$arch w64devkit-i686";;
8) arch="$arch w64devkit";;
a) flavors="X -fortran"; arch="w64devkit w64devkit-i686";;
b) flavors="$flavors X";;
f) flavors="$flavors -fortran";;
a) flavors="X"; arch="w64devkit w64devkit-i686";;
h) usage; exit 0;;
n) dryrun=echo;;
O) compact=yes;;
Expand Down
17 changes: 0 additions & 17 deletions src/variant-fortran.patch

This file was deleted.

0 comments on commit 85a52aa

Please sign in to comment.