links: fix build on x86 (32 bits). (#7764)

* links: fix build on x86 (32 bits).

This seems to have been broken since the update to 2.28, as 2.21
is the last version available on the repositories.

The fix avoids errors resulting from conflicting integer types
between the <tiff.h> and <SupportDefs.h> headers.

Needed to also specify "-g -O2 -fopenmp" when defining CFLAGS to
avoid linking errors (and to match the default flags used otherwise).

None of this is necessary on x86_64, thus the conditional on "_x86".

* links: use a better check to detect the "x86" target arch

Co-authored-by: Jérôme Duval <jerome.duval@gmail.com>

Co-authored-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
OscarL
2023-01-11 17:08:35 -03:00
committed by GitHub
parent 00371725b4
commit 32aba6f6bd

View File

@@ -77,12 +77,18 @@ defineDebugInfoPackage links$secondaryArchSuffix \
BUILD()
{
autoreconf -vfi
if [ $effectiveTargetArchitecture == 'x86' ]; then
export CFLAGS="-DTIFF_DISABLE_DEPRECATED -g -O2 -fopenmp"
fi
runConfigure --omit-dirs binDir ./configure \
--bindir="$commandBinDir" \
--without-x \
--with-haiku \
--with-ssl \
--enable-graphics
make $jobArgs
}