mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
ccache: disable AVX2 on 32bit.
32bit Haiku does not support AVX2 and it crashes with invalid instruction. See https://dev.haiku-os.org/ticket/19804 This was found by NetSurf developpers as they are setting up a new Haiku builder and tried to use ccache to speed up the build.
This commit is contained in:
@@ -7,7 +7,7 @@ COPYRIGHT="2002-2007 Andrew Tridgell
|
||||
2009-2022 Joel Rosdahl and other contributors"
|
||||
LICENSE="GNU GPL v3
|
||||
GNU LGPL v3"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/ccache/ccache/releases/download/v$portVersion/ccache-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="d5a340e199977b7b1e89c0add794132c977fdc2ecc7ca5451e03d43627a1b1be"
|
||||
PATCHES="ccache-$portVersion.patchset"
|
||||
@@ -21,9 +21,13 @@ USER_SETTINGS_FILES="settings/ccache.conf"
|
||||
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
cmakeExtraFlags=""
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
|
||||
# AVX support is broken on 32bit Haiku, see https://dev.haiku-os.org/ticket/19804
|
||||
cmakeExtraFlags="-DHAVE_AVX2=0"
|
||||
fi
|
||||
|
||||
PROVIDES="
|
||||
@@ -39,6 +43,8 @@ REQUIRES="
|
||||
lib:libzstd$secondaryArchSuffix
|
||||
"
|
||||
|
||||
defineDebugInfoPackage ccache$secondaryArchSuffix $commandBinDir/ccache
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
libfmt${secondaryArchSuffix}_devel >= 8
|
||||
@@ -68,9 +74,9 @@ BUILD()
|
||||
{
|
||||
cmake -B build -S . \
|
||||
$cmakeDirArgs \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
|
||||
-DENABLE_TESTING=OFF
|
||||
-DENABLE_TESTING=OFF $cmakeExtraFlags
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user