diff --git a/Dockerfile b/Dockerfile index b082c58..2872aa7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,10 @@ ARG BINUTILS_VERSION=2.46.0 \ BINUTILS_SHA256=d75a94f4d73e7a4086f7513e67e439e8fcdcbb726ffe63f4661744e6256b2cf2 \ GCC_VERSION=16.1.0 \ GCC_SHA256=50efb4d94c3397aff3b0d61a5abd748b4dd31d9d3f2ab7be05b171d36a510f79 \ + BDWGC_VERSION=8.2.8 \ + BDWGC_SHA256=7649020621cb26325e1fb5c8742590d92fb48ce5c259b502faf7d9fb5dabb160 \ + LIBATOMIC_OPS_VERSION=7.8.2 \ + LIBATOMIC_OPS_SHA256=d305207fe207f2b3fb5cb4c019da12b44ce3fcbc593dfd5080d867b1a2419b51 \ GMP_VERSION=6.3.0 \ GMP_SHA256=a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898 \ MINGW_VERSION=14.0.0 \ @@ -33,6 +37,8 @@ WORKDIR /dl RUN curl --insecure --location --remote-name-all --remote-header-name \ https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS_VERSION.tar.xz \ https://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.xz \ + https://github.com/ivmai/bdwgc/releases/download/v$BDWGC_VERSION/gc-$BDWGC_VERSION.tar.gz \ + https://github.com/ivmai/libatomic_ops/releases/download/v$LIBATOMIC_OPS_VERSION/libatomic_ops-$LIBATOMIC_OPS_VERSION.tar.gz \ https://ftp.gnu.org/gnu/gmp/gmp-$GMP_VERSION.tar.xz \ https://ftp.gnu.org/gnu/mpc/mpc-$MPC_VERSION.tar.xz \ https://ftp.gnu.org/gnu/mpfr/mpfr-$MPFR_VERSION.tar.xz \ @@ -40,6 +46,8 @@ RUN curl --insecure --location --remote-name-all --remote-header-name \ && printf '%s %s\n' \ $BINUTILS_SHA256 binutils-$BINUTILS_VERSION.tar.xz \ $GCC_SHA256 gcc-$GCC_VERSION.tar.xz \ + $BDWGC_SHA256 gc-$BDWGC_VERSION.tar.gz \ + $LIBATOMIC_OPS_SHA256 libatomic_ops-$LIBATOMIC_OPS_VERSION.tar.gz \ $GMP_SHA256 gmp-$GMP_VERSION.tar.xz \ $MPC_SHA256 mpc-$MPC_VERSION.tar.xz \ $MPFR_SHA256 mpfr-$MPFR_VERSION.tar.xz \ @@ -49,6 +57,10 @@ RUN curl --insecure --location --remote-name-all --remote-header-name \ && tar xJf binutils-$BINUTILS_VERSION.tar.xz -C binutils --strip-components=1 \ && mkdir gcc \ && tar xJf gcc-$GCC_VERSION.tar.xz -C gcc --strip-components=1 \ + && mkdir bdwgc \ + && tar xzf gc-$BDWGC_VERSION.tar.gz -C bdwgc --strip-components=1 \ + && mkdir bdwgc/libatomic_ops \ + && tar xzf libatomic_ops-$LIBATOMIC_OPS_VERSION.tar.gz -C bdwgc/libatomic_ops --strip-components=1 \ && mkdir gmp \ && tar xJf gmp-$GMP_VERSION.tar.xz -C gmp --strip-components=1 \ && mkdir mpc \ @@ -234,12 +246,13 @@ WORKDIR /dl/binutils COPY src/binutils-*.patch $PREFIX/src/ RUN sed -ri 's/(static bool insert_timestamp = )/\1!/' ld/emultempl/pe*.em \ && sed -ri 's/(int pe_enable_stdcall_fixup = )/\1!!/' ld/emultempl/pe*.em \ - && sed -ri 's/(static int use_big_obj = )/\1!/' gas/config/tc-i386.c \ + && sed -ri 's/(int obj_coff_use_big_obj = )/\1!/' gas/config/tc-i386.c \ && cat $PREFIX/src/binutils-*.patch | patch -p1 WORKDIR /x-binutils RUN /dl/binutils/configure \ --prefix=/bootstrap \ --with-sysroot=/bootstrap \ + --with-target-bdw-gc=/bootstrap \ --target=$ARCH \ --disable-nls \ --with-static-standard-libraries \ @@ -274,7 +287,7 @@ RUN cat $PREFIX/src/gcc-*.patch | patch -d/dl/gcc -p1 \ --enable-static \ --disable-shared \ --with-pic \ - --enable-languages=c,c++,fortran \ + --enable-languages=c,c++,fortran,algol68 \ --enable-libgomp \ --enable-threads=posix \ --enable-tls \ @@ -330,6 +343,24 @@ RUN /dl/mingw/mingw-w64-libraries/winpthreads/configure \ && make -j$(nproc) \ && make install +WORKDIR /x-gcc +RUN make -j$(nproc) all-target-libgcc \ + && make install-target-libgcc + +WORKDIR /x-bdwgc +RUN /dl/bdwgc/configure \ + --prefix=/bootstrap \ + --host=$ARCH \ + --enable-static \ + --disable-shared \ + CC=$ARCH-gcc \ + AR=$ARCH-ar \ + RANLIB=$ARCH-ranlib \ + CFLAGS="-O2" \ + LDFLAGS="-s" \ + && make -j$(nproc) \ + && make install + WORKDIR /x-gcc RUN make -j$(nproc) \ && make install @@ -434,6 +465,20 @@ RUN /dl/mingw/mingw-w64-libraries/winpthreads/configure \ && make -j$(nproc) \ && make install +WORKDIR /bdwgc +RUN /dl/bdwgc/configure \ + --prefix=$PREFIX \ + --host=$ARCH \ + --enable-static \ + --disable-shared \ + CC=$ARCH-gcc \ + AR=$ARCH-ar \ + RANLIB=$ARCH-ranlib \ + CFLAGS="-O2" \ + LDFLAGS="-s" \ + && make -j$(nproc) \ + && make install + WORKDIR /gcc COPY src/crossgcc-*.patch $PREFIX/src/ RUN echo 'BEGIN {print "pecoff"}' \ @@ -443,6 +488,7 @@ RUN echo 'BEGIN {print "pecoff"}' \ --prefix=$PREFIX \ --with-sysroot=$PREFIX \ --with-native-system-header-dir=/include \ + --with-target-bdw-gc=$PREFIX \ --target=$ARCH \ --host=$ARCH \ --enable-static \ @@ -451,7 +497,7 @@ RUN echo 'BEGIN {print "pecoff"}' \ --with-gmp=/deps \ --with-mpc=/deps \ --with-mpfr=/deps \ - --enable-languages=c,c++,fortran \ + --enable-languages=c,c++,fortran,algol68 \ --enable-libgomp \ --enable-threads=posix \ --enable-tls \ diff --git a/src/binutils-gas-add-mno-big-obj.patch b/src/binutils-gas-add-mno-big-obj.patch new file mode 100644 index 0000000..efa26c0 --- /dev/null +++ b/src/binutils-gas-add-mno-big-obj.patch @@ -0,0 +1,309 @@ +From 6dc8c3bf5a493f264595d950420fec221271fdd3 Mon Sep 17 00:00:00 2001 +From: Peter Damianov +Date: Sun, 10 May 2026 13:06:21 +0100 +Subject: [PATCH] gas: Add -mno-big-obj + +Add an inverse PE/COFF big object option so that toolchains which +enable -mbig-obj by default can explicitly return to the regular COFF +object format. Keep the PE/COFF bigobj state and target-format +selection in obj-coff, while target backends register the option using +their existing option parsing style. + +gas/ + * config/obj-coff.c (obj_coff_use_big_obj): Define. + (obj_coff_target_format): New function. + * config/obj-coff.h (obj_coff_use_big_obj): Declare. + (obj_coff_target_format): Declare. + * config/tc-aarch64.c (coff_aarch64_target_format): Use + obj_coff_target_format. + (aarch64_opts): Add mbig-obj and mno-big-obj. + * config/tc-i386.c (OPTION_MNO_BIG_OBJ): Define. + (md_longopts): Add mno-big-obj. + (md_parse_option): Handle it. + (md_show_usage): Document it. + (i386_target_format): Use obj_coff_target_format. + * doc/c-aarch64.texi: Document -mno-big-obj. + * doc/c-i386.texi: Likewise. + * testsuite/gas/pe/pe.exp: Run no-big-obj. + * testsuite/gas/pe/no-big-obj.d: New test. + * testsuite/gas/pe/no-big-obj.s: New test source. +--- + gas/config/obj-coff.c | 11 +++++++++++ + gas/config/obj-coff.h | 3 +++ + gas/config/tc-aarch64.c | 28 +++++++--------------------- + gas/config/tc-i386.c | 20 +++++++++++--------- + gas/doc/c-aarch64.texi | 5 ++++- + gas/doc/c-i386.texi | 7 +++++-- + gas/testsuite/gas/pe/no-big-obj.d | 6 ++++++ + gas/testsuite/gas/pe/no-big-obj.s | 6 ++++++ + gas/testsuite/gas/pe/pe.exp | 1 + + 9 files changed, 54 insertions(+), 33 deletions(-) + create mode 100644 gas/testsuite/gas/pe/no-big-obj.d + create mode 100644 gas/testsuite/gas/pe/no-big-obj.s + +diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c +index 30e3ca2e2c8..ce9a5da3f87 100644 +--- a/gas/config/obj-coff.c ++++ b/gas/config/obj-coff.c +@@ -52,10 +52,21 @@ static symbolS *def_symbol_in_progress; + #ifdef TE_PE + /* PE weak alternate symbols begin with this string. */ + static const char weak_altprefix[] = ".weak."; ++ ++/* Use big object file format. */ ++int obj_coff_use_big_obj = 0; + #endif /* TE_PE */ + + #include "obj-coff-seh.c" + ++#ifdef TE_PE ++const char * ++obj_coff_target_format (const char *regular, const char *bigobj) ++{ ++ return obj_coff_use_big_obj ? bigobj : regular; ++} ++#endif ++ + typedef struct + { + unsigned long chunk_size; +diff --git a/gas/config/obj-coff.h b/gas/config/obj-coff.h +index 0b933f467b2..ee80ba9caec 100644 +--- a/gas/config/obj-coff.h ++++ b/gas/config/obj-coff.h +@@ -114,6 +114,9 @@ + #ifdef TE_PE + #define obj_set_weak_hook pecoff_obj_set_weak_hook + #define obj_clear_weak_hook pecoff_obj_clear_weak_hook ++ ++extern int obj_coff_use_big_obj; ++extern const char *obj_coff_target_format (const char *, const char *); + #endif + + #ifndef OBJ_COFF_MAX_AUXENTRIES +diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c +index cd76163488c..bccf861d5ed 100644 +--- a/gas/config/tc-aarch64.c ++++ b/gas/config/tc-aarch64.c +@@ -10328,11 +10328,6 @@ aarch64_after_parse_args (void) + #endif + } + +-#ifdef OBJ_COFF +-/* Use big object file format. */ +-static bool use_big_obj = false; +-#endif +- + #ifdef OBJ_ELF + const char * + elf64_aarch64_target_format (void) +@@ -10352,7 +10347,8 @@ aarch64elf_frob_symbol (symbolS * symp, int *puntp) + const char * + coff_aarch64_target_format (void) + { +- return use_big_obj ? "pe-bigobj-aarch64-little" : "pe-aarch64-little"; ++ return obj_coff_target_format ("pe-aarch64-little", ++ "pe-bigobj-aarch64-little"); + } + #endif + +@@ -10726,17 +10722,12 @@ const char md_shortopts[] = "m:"; + #define OPTION_EL (OPTION_MD_BASE + 1) + #endif + #endif +-#define OPTION_MBIG_OBJ (OPTION_MD_BASE + 2) +- + const struct option md_longopts[] = { + #ifdef OPTION_EB + {"EB", no_argument, NULL, OPTION_EB}, + #endif + #ifdef OPTION_EL + {"EL", no_argument, NULL, OPTION_EL}, +-#endif +-#ifdef OBJ_COFF +- {"mbig-obj", no_argument, NULL, OPTION_MBIG_OBJ}, + #endif + {NULL, no_argument, NULL, 0} + }; +@@ -10756,6 +10747,11 @@ static struct aarch64_option_table aarch64_opts[] = { + {"mbig-endian", N_("assemble for big-endian"), &target_big_endian, 1, NULL}, + {"mlittle-endian", N_("assemble for little-endian"), &target_big_endian, 0, + NULL}, ++#ifdef OBJ_COFF ++ {"mbig-obj", N_("generate big object files"), &obj_coff_use_big_obj, 1, NULL}, ++ {"mno-big-obj", N_("generate regular object files"), ++ &obj_coff_use_big_obj, 0, NULL}, ++#endif + #ifdef DEBUG_AARCH64 + {"mdebug-dump", N_("temporary switch for dumping"), &debug_dump, 1, NULL}, + #endif /* DEBUG_AARCH64 */ +@@ -11382,12 +11378,6 @@ md_parse_option (int c, const char *arg) + break; + #endif + +-#ifdef OBJ_COFF +- case OPTION_MBIG_OBJ: +- use_big_obj = true; +- break; +-#endif +- + case 'a': + /* Listing option. Just ignore these, we don't support additional + ones. */ +@@ -11461,10 +11451,6 @@ md_show_usage (FILE * fp) + -EL assemble code for a little-endian cpu\n")); + #endif + +-#ifdef OBJ_COFF +- fprintf (fp, _("\ +- -mbig-obj generate big object files\n")); +-#endif + } + + /* Parse a .cpu directive. */ +diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c +index edc44a37345..49db1508dde 100644 +--- a/gas/config/tc-i386.c ++++ b/gas/config/tc-i386.c +@@ -669,11 +669,6 @@ enum x86_elf_abi + static enum x86_elf_abi x86_elf_abi = I386_ABI; + #endif + +-#if defined (TE_PE) || defined (TE_PEP) +-/* Use big object file format. */ +-static int use_big_obj = 0; +-#endif +- + #ifdef OBJ_ELF + /* 1 if generating code for a shared library. */ + static int shared = 0; +@@ -17249,6 +17244,7 @@ const char md_shortopts[] = + #define OPTION_MLFENCE_BEFORE_RET (OPTION_MD_BASE + 33) + #define OPTION_MUSE_UNALIGNED_VECTOR_MOVE (OPTION_MD_BASE + 34) + #define OPTION_MTLS_CHECK (OPTION_MD_BASE + 35) ++#define OPTION_MNO_BIG_OBJ (OPTION_MD_BASE + 36) + + const struct option md_longopts[] = + { +@@ -17282,6 +17278,7 @@ const struct option md_longopts[] = + {"mevexwig", required_argument, NULL, OPTION_MEVEXWIG}, + # if defined (TE_PE) || defined (TE_PEP) + {"mbig-obj", no_argument, NULL, OPTION_MBIG_OBJ}, ++ {"mno-big-obj", no_argument, NULL, OPTION_MNO_BIG_OBJ}, + #endif + {"momit-lock-prefix", required_argument, NULL, OPTION_MOMIT_LOCK_PREFIX}, + {"mfence-as-lock-add", required_argument, NULL, OPTION_MFENCE_AS_LOCK_ADD}, +@@ -17675,7 +17672,11 @@ md_parse_option (int c, const char *arg) + + # if defined (TE_PE) || defined (TE_PEP) + case OPTION_MBIG_OBJ: +- use_big_obj = 1; ++ obj_coff_use_big_obj = 1; ++ break; ++ ++ case OPTION_MNO_BIG_OBJ: ++ obj_coff_use_big_obj = 0; + break; + #endif + +@@ -18090,7 +18091,8 @@ md_show_usage (FILE *stream) + #endif + #if defined (TE_PE) || defined (TE_PEP) + fprintf (stream, _("\ +- -mbig-obj generate big object files\n")); ++ -mbig-obj generate big object files\n\ ++ -mno-big-obj generate regular object files\n")); + #endif + fprintf (stream, _("\ + -momit-lock-prefix=[no|yes] (default: no)\n\ +@@ -18202,9 +18204,9 @@ i386_target_format (void) + if (flag_code == CODE_64BIT) + { + object_64bit = 1; +- return use_big_obj ? "pe-bigobj-x86-64" : "pe-x86-64"; ++ return obj_coff_target_format ("pe-x86-64", "pe-bigobj-x86-64"); + } +- return use_big_obj ? "pe-bigobj-i386" : "pe-i386"; ++ return obj_coff_target_format ("pe-i386", "pe-bigobj-i386"); + #endif + #ifdef OBJ_ELF + case bfd_target_elf_flavour: +diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi +index 0620ad8f4d2..cb0d18f6a2a 100644 +--- a/gas/doc/c-aarch64.texi ++++ b/gas/doc/c-aarch64.texi +@@ -128,9 +128,12 @@ extension options as the @option{-mcpu} option. Unlike + @xref{AArch64 Extensions}. + + @cindex @samp{-mbig-obj} option, AArch64 ++@cindex @samp{-mno-big-obj} option, AArch64 + @item -mbig-obj ++@itemx -mno-big-obj + On PE/COFF target this option forces the use of big object file +-format, which allows more than 32768 sections. ++format, which allows more than 32768 sections. The ++@samp{-mno-big-obj} option disables the use of big object file format. + + @cindex @code{-mverbose-error} command-line option, AArch64 + @item -mverbose-error +diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi +index b25a4fbc70e..7e718a8b1b8 100644 +--- a/gas/doc/c-i386.texi ++++ b/gas/doc/c-i386.texi +@@ -447,9 +447,13 @@ instructions. + + @cindex @samp{-mbig-obj} option, i386 + @cindex @samp{-mbig-obj} option, x86-64 ++@cindex @samp{-mno-big-obj} option, i386 ++@cindex @samp{-mno-big-obj} option, x86-64 + @item -mbig-obj ++@itemx -mno-big-obj + On PE/COFF target this option forces the use of big object file +-format, which allows more than 32768 sections. ++format, which allows more than 32768 sections. The ++@samp{-mno-big-obj} option disables the use of big object file format. + + @cindex @samp{-momit-lock-prefix=} option, i386 + @cindex @samp{-momit-lock-prefix=} option, x86-64 +@@ -1848,4 +1852,3 @@ is an immediate mode expression and the second operand is a register. + This is just a shorthand, so that, multiplying @samp{%eax} by 69, for + example, can be done with @samp{imul $69, %eax} rather than @samp{imul + $69, %eax, %eax}. +- +diff --git a/gas/testsuite/gas/pe/no-big-obj.d b/gas/testsuite/gas/pe/no-big-obj.d +new file mode 100644 +index 00000000000..06a134a1f8b +--- /dev/null ++++ b/gas/testsuite/gas/pe/no-big-obj.d +@@ -0,0 +1,6 @@ ++#as: -mbig-obj -mno-big-obj ++#objdump: -f ++#name: PE no big obj ++ ++.*: *file format pe-(aarch64-little|i386|x86-64) ++#... +diff --git a/gas/testsuite/gas/pe/no-big-obj.s b/gas/testsuite/gas/pe/no-big-obj.s +new file mode 100644 +index 00000000000..4b8b51df360 +--- /dev/null ++++ b/gas/testsuite/gas/pe/no-big-obj.s +@@ -0,0 +1,6 @@ ++ .file "no-big-obj.s" ++ ++ .text ++ .globl foo ++foo: ++ .byte 0 +diff --git a/gas/testsuite/gas/pe/pe.exp b/gas/testsuite/gas/pe/pe.exp +index e25de3cfa9d..79050f3728b 100644 +--- a/gas/testsuite/gas/pe/pe.exp ++++ b/gas/testsuite/gas/pe/pe.exp +@@ -70,4 +70,5 @@ if {[istarget "aarch64-*-pe*"] || [istarget "aarch64-*-mingw*"]} { + + if ([istarget "*-*-mingw*"]) then { + run_dump_test "big-obj" ++ run_dump_test "no-big-obj" + } +-- +2.54.0 + diff --git a/src/gcc-algol68-binary-file-read.patch b/src/gcc-algol68-binary-file-read.patch new file mode 100644 index 0000000..cfa03d9 --- /dev/null +++ b/src/gcc-algol68-binary-file-read.patch @@ -0,0 +1,33 @@ +diff --git a/gcc/algol68/a68-lang.cc b/gcc/algol68/a68-lang.cc +--- a/gcc/algol68/a68-lang.cc ++++ b/gcc/algol68/a68-lang.cc +@@ -538,7 +538,7 @@ a68_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, + case OPT_fmodules_map_file: + case OPT_fmodules_map_file_: + { +- FILE *file = fopen (arg, "r"); ++ FILE *file = fopen (arg, "rb"); + if (file == NULL) + fatal_error (UNKNOWN_LOCATION, + "cannot open modules map file %<%s%>", arg); +diff --git a/gcc/algol68/a68-parser-scanner.cc b/gcc/algol68/a68-parser-scanner.cc +--- a/gcc/algol68/a68-parser-scanner.cc ++++ b/gcc/algol68/a68-parser-scanner.cc +@@ -334,7 +334,7 @@ read_source_file (const char *filename) + bool ret = true; + + /* First open the given file. */ +- if (!(FILE_SOURCE_FD (&A68_JOB) = fopen (filename, "r"))) ++ if (!(FILE_SOURCE_FD (&A68_JOB) = fopen (filename, "rb"))) + fatal_error (UNKNOWN_LOCATION, "could not open source file %s", + filename); + FILE_SOURCE_NAME (&A68_JOB) = ggc_strdup (filename); +@@ -1076,7 +1076,7 @@ process_pragmats (LINE_T *top) + t = NO_LINE; + + /* Access the file. */ +- fp = fopen (fn, "r"); ++ fp = fopen (fn, "rb"); + SCAN_ERROR (fp == NULL, start_l, start_c, + "error opening included file"); + ssize = a68_file_size (fileno (fp)); diff --git a/src/gcc-algol68-make-exeext.patch b/src/gcc-algol68-make-exeext.patch new file mode 100644 index 0000000..0f83683 --- /dev/null +++ b/src/gcc-algol68-make-exeext.patch @@ -0,0 +1,12 @@ +diff --git a/gcc/algol68/Make-lang.in b/gcc/algol68/Make-lang.in +--- a/gcc/algol68/Make-lang.in ++++ b/gcc/algol68/Make-lang.in +@@ -219,7 +219,7 @@ algol68.srcextra: + + algol68.all.cross: ga68$(exeext) +-algol68.start.encap: ga68$(exeect) ++algol68.start.encap: ga68$(exeext) + algol68.rest.encap: + algol68.info: doc/ga68.info doc/ga68-internals.info doc/ga68-coding-guidelines.info + algol68.dvi: doc/ga68.dvi doc/ga68-internals.dvi doc/ga68-coding-guidelines.dvi + algol68.pdf: doc/ga68.pdf doc/ga68-internals.pdf doc/ga68-coding-guidelines.pdf diff --git a/src/gcc-libga68-mingw-posix.patch b/src/gcc-libga68-mingw-posix.patch new file mode 100644 index 0000000..4cb0088 --- /dev/null +++ b/src/gcc-libga68-mingw-posix.patch @@ -0,0 +1,39 @@ +diff --git a/libga68/ga68-posix.c b/libga68/ga68-posix.c +--- a/libga68/ga68-posix.c ++++ b/libga68/ga68-posix.c +@@ -28,10 +28,12 @@ + #include /* For open. */ + #include /* For close and write. */ + #include /* For errno. */ ++#ifndef _WIN32 + #include +-#include /* For struct stat */ + #include + #include /* For gethostbyname. */ ++#endif ++#include /* For struct stat */ + #include /* For LLONG_MAX */ + + #define EOF_PSEUDO_CHARACTER -1 +@@ -371,6 +373,13 @@ + { + size_t u8len; + char *host = _libga68_u32_to_u8 (str, len, stride, &u8len); ++#ifdef _WIN32 ++ /* Windows sockets are not CRT file descriptors, so returning a SOCKET here ++ would break the POSIX prelude's read/write/close users. */ ++ _libga68_errno = ENOSYS; ++ _libga68_free_internal (host); ++ return -1; ++#else + + /* Create a stream socket. */ + int fd = socket (AF_INET, SOCK_STREAM, 0); +@@ -408,6 +420,7 @@ _libga68_posixfconnect (uint32_t *str, size_t len, size_t stride, + _libga68_free_internal (host); + error: + return -1; ++#endif + } + + /* Implementation of the posix prelude `fsize'. */