mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-30 22:48:07 -07:00
dev-cpp/highway: needs >=gas-2.44
[21:17] <asturm> {standard input}: Assembler messages:
[21:17] <asturm> {standard input}:8396: Error: no such instruction: `vucomxsh 62(%r12),%xmm0'
Added in b6324bbd83d6b3009ea45b7a6ca6794a8c0b018a. Copy the check from
sys-apps/pciutils.
Bug: https://bugs.gentoo.org/966644
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake-multilib
|
||||
inherit cmake-multilib toolchain-funcs
|
||||
|
||||
DESCRIPTION="Performance-portable, length-agnostic SIMD with runtime dispatch"
|
||||
HOMEPAGE="https://github.com/google/highway"
|
||||
@@ -21,9 +21,63 @@ SLOT="0"
|
||||
IUSE="cpu_flags_arm_neon test"
|
||||
|
||||
DEPEND="test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )"
|
||||
BDEPEND="|| ( >=sys-devel/binutils-2.44:* llvm-core/lld sys-devel/native-cctools )"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
check_binutils_version() {
|
||||
if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && ! tc-ld-is-gold && ! tc-ld-is-lld ; then
|
||||
# Okay, hopefully it's Binutils, but we don't have a nice way of checking
|
||||
# the gas version.
|
||||
#
|
||||
# Convert this:
|
||||
# ```
|
||||
# GNU assembler (Gentoo 2.44 p1) 2.44
|
||||
# Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
# This program is free software; you may redistribute it under the terms of
|
||||
# the GNU General Public License version 3 or (at your option) a later version.
|
||||
# This program has absolutely no warranty.
|
||||
# ```
|
||||
#
|
||||
# into...
|
||||
# ```
|
||||
# 2.44
|
||||
# ```
|
||||
local ver=$($(tc-getAS) --version 2>&1 | head -n 1 | rev | cut -d' ' -f1 | rev)
|
||||
|
||||
if ! [[ ${ver} =~ [0-9].[0-9][0-9] ]] ; then
|
||||
# Skip if unrecognised format so we don't pass something
|
||||
# odd into ver_cut.
|
||||
return
|
||||
fi
|
||||
|
||||
ver_major=$(ver_cut 1 "${ver}")
|
||||
ver_minor=$(ver_cut 2 "${ver}")
|
||||
|
||||
# Check borrowed from sys-apps/pciutils (see bug #966644).
|
||||
if [[ ${ver_major} -eq 2 && ${ver_minor} -lt 44 ]] ; then
|
||||
eerror "Old version of binutils activated! ${P} cannot be built with an old version."
|
||||
eerror "Please follow these steps:"
|
||||
eerror "1. Select a newer binutils (>= 2.44) using binutils-config"
|
||||
eerror " (If no such version is installed, run emerge -v1 sys-devel/binutils)"
|
||||
eerror "2. Run: . /etc/profile"
|
||||
eerror "3. Try emerging again with: emerge -v1 ${CATEGORY}/${P}"
|
||||
eerror "4. Complete your world upgrade if you were performing one."
|
||||
eerror "5. Perform a depclean (emerge -acv)"
|
||||
eerror "\tYou MUST depclean after every world upgrade in future!"
|
||||
die "Old binutils found! Change to a newer (g)as using binutils-config."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
[[ ${MERGE_TYPE} != binary ]] && check_binutils_version
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
[[ ${MERGE_TYPE} != binary ]] && check_binutils_version
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DHWY_CMAKE_ARM7=$(usex cpu_flags_arm_neon)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake-multilib
|
||||
inherit cmake-multilib toolchain-funcs
|
||||
|
||||
DESCRIPTION="Performance-portable, length-agnostic SIMD with runtime dispatch"
|
||||
HOMEPAGE="https://github.com/google/highway"
|
||||
@@ -21,9 +21,63 @@ SLOT="0"
|
||||
IUSE="cpu_flags_arm_neon test"
|
||||
|
||||
DEPEND="test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )"
|
||||
BDEPEND="|| ( >=sys-devel/binutils-2.44:* llvm-core/lld sys-devel/native-cctools )"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
check_binutils_version() {
|
||||
if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && ! tc-ld-is-gold && ! tc-ld-is-lld ; then
|
||||
# Okay, hopefully it's Binutils, but we don't have a nice way of checking
|
||||
# the gas version.
|
||||
#
|
||||
# Convert this:
|
||||
# ```
|
||||
# GNU assembler (Gentoo 2.44 p1) 2.44
|
||||
# Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
# This program is free software; you may redistribute it under the terms of
|
||||
# the GNU General Public License version 3 or (at your option) a later version.
|
||||
# This program has absolutely no warranty.
|
||||
# ```
|
||||
#
|
||||
# into...
|
||||
# ```
|
||||
# 2.44
|
||||
# ```
|
||||
local ver=$($(tc-getAS) --version 2>&1 | head -n 1 | rev | cut -d' ' -f1 | rev)
|
||||
|
||||
if ! [[ ${ver} =~ [0-9].[0-9][0-9] ]] ; then
|
||||
# Skip if unrecognised format so we don't pass something
|
||||
# odd into ver_cut.
|
||||
return
|
||||
fi
|
||||
|
||||
ver_major=$(ver_cut 1 "${ver}")
|
||||
ver_minor=$(ver_cut 2 "${ver}")
|
||||
|
||||
# Check borrowed from sys-apps/pciutils (see bug #966644).
|
||||
if [[ ${ver_major} -eq 2 && ${ver_minor} -lt 44 ]] ; then
|
||||
eerror "Old version of binutils activated! ${P} cannot be built with an old version."
|
||||
eerror "Please follow these steps:"
|
||||
eerror "1. Select a newer binutils (>= 2.44) using binutils-config"
|
||||
eerror " (If no such version is installed, run emerge -v1 sys-devel/binutils)"
|
||||
eerror "2. Run: . /etc/profile"
|
||||
eerror "3. Try emerging again with: emerge -v1 ${CATEGORY}/${P}"
|
||||
eerror "4. Complete your world upgrade if you were performing one."
|
||||
eerror "5. Perform a depclean (emerge -acv)"
|
||||
eerror "\tYou MUST depclean after every world upgrade in future!"
|
||||
die "Old binutils found! Change to a newer (g)as using binutils-config."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
[[ ${MERGE_TYPE} != binary ]] && check_binutils_version
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
[[ ${MERGE_TYPE} != binary ]] && check_binutils_version
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DHWY_CMAKE_ARM7=$(usex cpu_flags_arm_neon)
|
||||
|
||||
Reference in New Issue
Block a user