973b27b91d
One problem with the cpuid instruction is that it uses %ebx which, when code is compiled as PIC for i386, is used as the PIC base register. This patch tries to handle this case by replacing the second register (%1) constraint with "=r", i.e. any (other) register, and swapping %ebx and %1 around the cpuid instruction. This patch could use a test, preferably on real i686 hardware. At least it needs some review and perhaps inspection of the generated assembler output. The idea and reasoning was taken from this comment: http://gcc.gnu.org/ml/gcc-patches/2007-09/msg00324.html
36 lines
1,018 B
Bash
36 lines
1,018 B
Bash
# Template file for 'cpufrequtils'
|
|
pkgname=cpufrequtils
|
|
version=008
|
|
revision=11
|
|
short_desc="Userspace tools for the Linux kernel cpufreq subsystem"
|
|
homepage="ftp://ftp.archlinux.org/other/cpufrequtils/"
|
|
license="GPL-2"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
distfiles="${KERNEL_SITE}/utils/kernel/cpufreq/${pkgname}-${version}.tar.xz"
|
|
checksum=a2149db551f83112209b1a8e79bd50d386979bbf64edbc69126f4e0b4f0a4cab
|
|
|
|
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
|
|
|
|
do_build() {
|
|
make CC=$CC CFLAGS="$CFLAGS" STRIP=true
|
|
}
|
|
do_install() {
|
|
sed -i "s|/usr/bin/install|install|g" Makefile
|
|
make DESTDIR=${DESTDIR} mandir=/usr/share/man install
|
|
}
|
|
|
|
libcpufreq_package() {
|
|
short_desc="Library for the kernel cpufreq subsystem"
|
|
pkg_install() {
|
|
vmove "usr/lib/*.so.*"
|
|
}
|
|
}
|
|
libcpufreq-devel_package() {
|
|
conflicts="libcpupower-devel>=0"
|
|
depends="libcpufreq>=${version}_${revision}"
|
|
short_desc="Library for the kernel cpufreq subsystem - development tools"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|