add support for more ADDLANG=fortran

This commit is contained in:
bebbo
2023-12-11 18:50:08 +01:00
parent 8cd833d2a6
commit 44f120f8e1
2 changed files with 16 additions and 1 deletions
+1 -1
View File
@@ -425,7 +425,7 @@ $(BUILD)/binutils/gprof/Makefile: $(PROJECTS)/binutils/configure $(BUILD)/binuti
# =================================================
# gcc
# =================================================
CONFIG_GCC = --prefix=$(PREFIX) --target=$(TARGET) --enable-languages=c,c++,objc --enable-version-specific-runtime-libs --disable-libssp --disable-nls \
CONFIG_GCC = --prefix=$(PREFIX) --target=$(TARGET) --enable-languages=c,c++,objc,$(ADDLANG) --enable-version-specific-runtime-libs --disable-libssp --disable-nls \
--with-headers=$(PROJECTS)/newlib-cygwin/newlib/libc/sys/amigaos/include/ --disable-shared --enable-threads=$(THREADS) \
--with-stage1-ldflags="-dynamic-libgcc -dynamic-libstdc++" --with-boot-ldflags="-dynamic-libgcc -dynamic-libstdc++"
+15
View File
@@ -234,3 +234,18 @@ export PREFIX=/opt/amiga13
make branch branch=amiga13.1 mod=gcc
make all -j20
```
## Fortran support
m68k-amigaos-gfortran is available now too. To build it add `ADDLANG=fortran`:
```
make all -j20 ADDLANG=fortran
```
The example from https://gcc.gnu.org/wiki/GFortranGettingStarted does work, you have to link using gcc:
```
> m68k-amigaos-gfortran -Os fprog.f90 -c
> m68k-amigaos-gcc -Os -noixemul sub.c -c
> m68k-amigaos-gcc fprog.o sub.o -o fprog -lgfortran -noixemul -lm
> vamos fprog
abcd 5 4711 4712.000000 13 14
```