Index of /pub/mathcw/dgcc/dragonflybsd

[ICO]NameLast modifiedSize

[PARENTDIR]Parent Directory  -
[TXT]README.html2020-02-17 17:36 4.7K
[DIR]x86_64/2020-02-18 10:10 -

Notes for gcc builds on DragonFlyBSD 5.6.2

Notes for gcc builds on DragonFlyBSD 5.6.2

At the time of writing this in February 2020, the latest version of DragonFlyBSD is 5.6.2. Although builds of several versions of gcc had succeeded on earlier DragonFlyBSD releases, attempts at building current versions of that compiler on DragonFlyBSD 5.6.2 for gcc versions 5.x to 10.x initially all failed.

After some probing into the build logs, I found the problem. DragonFlyBSD ships with version 0.19 of the Integer Set Library, -lisl, and that version broke the API compared to earlier versions, with header file conflicts, and dropped functions and header files, compared to what gcc's configure scripts expect.

I therefore built the previous version of the Integer Set Library package and installed it in a separate tree, $prefix/ashare/isl/isl-0.18/.

I then added the flag --with-isl=$prefix/ashare/isl/isl-0.18 to the CONFIGUREFLAGS environment variable and tried a gcc build. That provided partial success, but the build still failed after compiling numerous files. I found that I had to manually patch the top-level Makefile, and the file gcc/Makefile, with these settings:

    # for top-level Makefile:
    HOST_ISLLIBS = -L$(prefix)/ashare/isl/isl-0.18/lib $(prefix)/ashare/isl/isl-0.18/lib/libisl.a
    HOST_ISLINC =  -I$(prefix)/ashare/isl/isl-0.18/include

    # for gcc/Makefile
    ISLLIBS = -L$(prefix)/ashare/isl/isl-0.18/lib $(prefix)/ashare/isl/isl-0.18/lib/libisl.a
    ISLINC =  -I$(prefix)/ashare/isl/isl-0.18/include

The library settings intentionally choose the static version of -lisl, so the compilers contain no references to the unusual build-site-dependent location of that library.

With those patches, I could resume the build with gmake bootstrap, and in that way, got successful builds of all of the latest gcc versions. I chose gcc-5.5.0 for dgcc, and successfully built the MathCW library, after a minor source tweak to enable decimal support for DragonFlyBSD:

    % diff -c deccw.h.org deccw.h
    *** deccw.h.org Tue Jul 30 16:32:06 2019
    --- deccw.h     Sat Feb  8 17:54:59 2020
    ***************
    *** 104,112 ****
    --- 104,114 ----
      #endif

      #if defined(__DragonFly__) && defined(__unix__)
    + #if 0
      #undef  HAVE_BROKEN_DECIMAL
      #define HAVE_BROKEN_DECIMAL
      #endif
    + #endif

      #if defined(__NetBSD__)
      #undef  HAVE_BROKEN_DECIMAL

Not all of gcc's several possible compilers could be built on DragonFlyBSD 5.6.2: in particular, builds of compilers for D, Go, and Java had to be suppressed in some gcc versions, because attempts to create them failed at build time.

With a working dgcc, I was then able to build binary and decimal versions of hoc on DragonFlyBSD 5.6.2.

NB: The GNU config.guess script on DragonFlyBSD 5.6.2 returns x86_64-unknown-dragonfly5.7, so that is the prefix of the binary distributions in the subdirectory x86_64 of this directory.