git: libz: Override z_off_t to 'long' to fix bootloader linking

Aaron LI aly at crater.dragonflybsd.org
Mon Mar 30 05:44:59 PDT 2026


commit cadc00930f90c7d5673cdb47cdedce4b41f89181
Author: Aaron LI <aly at aaronly.me>
Date:   Mon Mar 30 20:39:05 2026 +0800

    libz: Override z_off_t to 'long' to fix bootloader linking
    
    zlib v1.3.2 changed 'z_off_t' from 'long' to 'long long', which is
    always 64bit even on i386.  As a result, the built libstand32.a
    depended on libgcc to provide 64-bit operations, e.g., '__moddi3', and
    thus the bootloader failed to link with errors like:
    
    ```
    /usr/obj/home/jenkins/workspace/DragonFlyBSD/ctools_x86_64_x86_64/usr/libexec/binutils234/elf/ld.bfd: /usr/obj/home/jenkins/workspace/DragonFlyBSD/world_x86_64/home/jenkins/workspace/DragonFlyBSD/stand/boot/pc32/loader/../../libstand32/libstand32.a(adler32.o): in function `adler32_combine_':
    adler32.c:(.text+0x22): undefined reference to `__moddi3'
    collect2: error: ld returned 1 exit status
    ```
    
    Fix this problem by overriding 'z_off_t' to 'long' for libstand32.

Summary of changes:
 lib/libz/Makefile.stand | 7 +++++++
 1 file changed, 7 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/cadc00930f90c7d5673cdb47cdedce4b41f89181


-- 
DragonFly BSD source repository


More information about the Commits mailing list