Skip to content

Commit

Permalink
util-linux: fix build on i686 (#5204)
Browse files Browse the repository at this point in the history
It needs the --disable-year2038 configure argument due to i686 Cygwin's
32-bit time_t.

Also, fallocate only builds for Cygwin 3.5+, and i686 is stuck on 3.3
forever.
  • Loading branch information
jeremyd2019 authored Feb 11, 2025
1 parent 73248ab commit e2e1b6e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion util-linux/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pkgname=("util-linux" "libutil-linux" "libutil-linux-devel")
_pkgmajor=2.40
pkgver=${_pkgmajor}.2
pkgrel=1
pkgrel=2
pkgdesc="Miscellaneous system utilities for Linux"
arch=('i686' 'x86_64')
license=('spdx:GPL-2.0-or-later')
Expand Down Expand Up @@ -88,6 +88,14 @@ build() {

export MSYSTEM=CYGWIN
local CYGWIN_CHOST="${CHOST/-msys/-cygwin}"
local -a extra_config
# 32-bit cygwin only has 32-bit time_t
# https://github.com/msys2/MSYS2-packages/issues/4078
#
# fallocate only builds for Cygwin 3.5+, and i686 is stuck on 3.3
if [[ "$CARCH" == "i686" ]]; then
extra_config+=("--disable-year2038" "--disable-fallocate")
fi
../${pkgname}-${pkgver}/configure \
--build=${CYGWIN_CHOST} \
--prefix=/usr \
Expand Down Expand Up @@ -151,6 +159,7 @@ build() {
--disable-makeinstall-setuid \
--without-libiconv-prefix \
--without-libintl-prefix \
"${extra_config[@]}" \
SOLIB_LDFLAGS=-no-undefined

make
Expand Down

0 comments on commit e2e1b6e

Please sign in to comment.