mirror of
https://gitdl.cn/https://github.com/chakralinux/lib32.git
synced 2025-01-23 09:22:17 +08:00
merge testing
This commit is contained in:
commit
e3c5e530f6
@ -1,15 +1,16 @@
|
||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||
# maintainer: Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
# maintainer: Giuseppe Calà <jiveaxe@gmail.com>
|
||||
# maintainer: Manuel Tortosa <manutortosa@chakra-project.org>
|
||||
|
||||
# toolchain build order:
|
||||
# lib32-glibc > binutils-multilib > gcc-multilib > binutils-multilib > lib32-glibc > gcc-multilib
|
||||
|
||||
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
|
||||
|
||||
_pkgname=binutils
|
||||
pkgname=binutils-multilib
|
||||
pkgver=2.21.1
|
||||
pkgver=2.23
|
||||
pkgrel=1
|
||||
_date=20110627
|
||||
pkgdesc="A set of programs to assemble and manipulate binary and object files for multilib"
|
||||
arch=('x86_64')
|
||||
url="http://www.gnu.org/software/binutils/"
|
||||
@ -17,34 +18,54 @@ license=('GPL')
|
||||
groups=('multilib-devel')
|
||||
provides=("binutils=$pkgver-$pkgrel")
|
||||
conflicts=('binutils')
|
||||
depends=('glibc>=2.14' 'zlib')
|
||||
makedepends=('dejagnu' 'gcc-multilib') # Make sure we compile this with gcc-multilib
|
||||
depends=('glibc>=2.15' 'zlib')
|
||||
makedepends=('gcc-multilib') # Make sure we compile this with gcc-multilib
|
||||
checkdepends=('dejagnu' 'bc')
|
||||
options=('!libtool' '!distcc' '!ccache')
|
||||
install=binutils.install
|
||||
source=(http://chakra-project.org/sources/${_pkgname}/${_pkgname}-${pkgver}_${_date}.tar.bz2)
|
||||
md5sums=('2face559e80d649ba148e42bb2d1fb0f')
|
||||
source=(ftp://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.gz{,.sig})
|
||||
md5sums=('ed58f50d8920c3f1d9cb110d5c972c27'
|
||||
'5293d43d444852f71f7c96c6295ba66d')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}
|
||||
mkdir binutils-build && cd binutils-build
|
||||
|
||||
${srcdir}/binutils/configure --prefix=/usr \
|
||||
${srcdir}/binutils-${pkgver}/configure --prefix=/usr \
|
||||
--with-lib-path=/usr/lib:/usr/local/lib \
|
||||
--with-bugurl=http://chakra-linux.org/bugs/ \
|
||||
--enable-ld=default --enable-gold \
|
||||
--enable-plugins --enable-threads \
|
||||
--enable-shared \
|
||||
--enable-64-bit-bfd --enable-multilib
|
||||
--enable-plugins --enable-threads --enable-shared \
|
||||
--disable-werror --enable-multilib
|
||||
|
||||
# check the host environment and makes sure all the necessary tools are available
|
||||
make configure-host
|
||||
|
||||
make tooldir=${pkgdir}/usr
|
||||
|
||||
# Rebuild libiberty.a with -fPIC
|
||||
cp -a libiberty libiberty-pic
|
||||
make -C libiberty-pic clean
|
||||
make CFLAGS="$CFLAGS -fPIC" -C libiberty-pic
|
||||
|
||||
# Rebuild libbfd.a with -fPIC
|
||||
# hidden visability prevent 3rd party shared libraries exporting bfd non-stable API
|
||||
cp -a bfd bfd-pic
|
||||
make -C bfd-pic clean
|
||||
make CFLAGS="$CFLAGS -fPIC -fvisibility=hidden" -C bfd-pic
|
||||
|
||||
# Rebuild libopcodes.a with -fPIC
|
||||
cp -a opcodes opcodes-pic
|
||||
make -C opcodes-pic clean
|
||||
make CFLAGS="$CFLAGS -fPIC" -C opcodes-pic
|
||||
}
|
||||
|
||||
check() {
|
||||
cd ${srcdir}/binutils-build
|
||||
|
||||
# unset LDFLAGS as testsuite makes assumptions about which ones are active
|
||||
# do not abort on errors - manually check log files
|
||||
make -k -j1 check || true
|
||||
make LDFLAGS="" -k check || true
|
||||
}
|
||||
|
||||
package() {
|
||||
@ -52,26 +73,22 @@ package() {
|
||||
make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install
|
||||
|
||||
# Add some useful headers
|
||||
install -m644 ${srcdir}/binutils/include/libiberty.h ${pkgdir}/usr/include
|
||||
install -m644 ${srcdir}/binutils/include/demangle.h ${pkgdir}/usr/include
|
||||
install -m644 ${srcdir}/binutils-${pkgver}/include/libiberty.h ${pkgdir}/usr/include
|
||||
install -m644 ${srcdir}/binutils-${pkgver}/include/demangle.h ${pkgdir}/usr/include
|
||||
|
||||
# Rebuild libiberty.a with -fPIC
|
||||
make -C libiberty clean
|
||||
make CFLAGS="$CFLAGS -fPIC" -C libiberty
|
||||
install -m644 libiberty/libiberty.a ${pkgdir}/usr/lib
|
||||
|
||||
# Rebuild libbfd.a with -fPIC
|
||||
make -C bfd clean
|
||||
# hidden visability prevent 3rd party shared libraries exporting bfd non-stable API
|
||||
make CFLAGS="$CFLAGS -fPIC -fvisibility=hidden" -C bfd
|
||||
install -m644 bfd/libbfd.a ${pkgdir}/usr/lib
|
||||
# install libraries rebuilt with -fPIC
|
||||
install -m644 libiberty-pic/libiberty.a ${pkgdir}/usr/lib
|
||||
install -m644 bfd-pic/libbfd.a ${pkgdir}/usr/lib
|
||||
install -m644 opcodes/libopcodes.a ${pkgdir}/usr/lib
|
||||
|
||||
# Remove Windows/Novell specific man pages
|
||||
rm -f ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}*
|
||||
rm ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}*
|
||||
|
||||
rm ${pkgdir}/usr/share/info/{configure,standards}.info
|
||||
|
||||
# Remove these symlinks, they are not ABI stable.
|
||||
# Programs should compile static to the .a file.
|
||||
rm -f ${pkgdir}/usr/lib/lib{bfd,opcodes}.so
|
||||
rm ${pkgdir}/usr/lib/lib{bfd,opcodes}.so
|
||||
echo "INPUT ( /usr/lib/libbfd.a -liberty -lz )" >${pkgdir}/usr/lib/libbfd.so
|
||||
echo "INPUT ( /usr/lib/libopcodes.a -lbfd )" >${pkgdir}/usr/lib/libopcodes.so
|
||||
}
|
||||
|
35
diff-lib32
Executable file
35
diff-lib32
Executable file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/perl
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
my @lib32_pkgs = `pacman -Sl testing lib32`;
|
||||
my %lib32;
|
||||
|
||||
foreach (@lib32_pkgs) {
|
||||
chomp;
|
||||
next if (! /(?<repo>.+) (?<lib32_pkgname>lib32-.+) (?<lib32_pkgver>.+)-(?<lib32_pkgrel>\d+)/);
|
||||
|
||||
my $lib32_repo = $+{repo};
|
||||
my $lib32_pkgname = $+{lib32_pkgname};
|
||||
my $lib32_pkgver = $+{lib32_pkgver};
|
||||
my $lib32_pkgrel = $+{lib32_pkgrel};
|
||||
|
||||
next if exists $lib32{$lib32_pkgname};
|
||||
$lib32{$lib32_pkgname}="";
|
||||
|
||||
my $pkgname = $lib32_pkgname;
|
||||
$pkgname =~ s/lib32-//;
|
||||
|
||||
my $pkg = `pacman -Ss "^$pkgname\$" | grep -v '^ ' | head -n1`;
|
||||
chomp $pkg;
|
||||
|
||||
next if ( $pkg !~ /(?<repo>.+)\/(?<pkgname>.+) (?<pkgver>.+)-(?<pkgrel>\d+)/ );
|
||||
|
||||
my $repo = $+{repo};
|
||||
my $pkgver = $+{pkgver};
|
||||
my $pkgrel = $+{pkgrel};
|
||||
|
||||
if ("$lib32_pkgver" lt "$pkgver") {
|
||||
print "$lib32_repo/$lib32_pkgname is older than $repo/$pkgname\n";
|
||||
}
|
||||
}
|
@ -1,34 +1,37 @@
|
||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
# maintainer: Giuseppe Calà <jiveaxe@gmail.com>
|
||||
# maintainer: Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
# maintainer: Manuel Tortosa <manutortosa@chakra-project.org>
|
||||
|
||||
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
|
||||
# NOTE: libtool requires rebuilt with each new gcc version
|
||||
# toolchain build order:
|
||||
# lib32-glibc > binutils-multilib > gcc-multilib > binutils-multilib > lib32-glibc > gcc-multilib
|
||||
|
||||
# NOTE: lib32-libtool requires rebuilt with each new gcc-multilib version
|
||||
|
||||
pkgbase='gcc-multilib'
|
||||
pkgname=('gcc-multilib' 'gcc-libs-multilib' 'lib32-gcc-libs' 'gcc-fortran-multilib' 'gcc-objc-multilib' 'gcc-ada-multilib' 'gcc-go-multilib')
|
||||
pkgver=4.6.1
|
||||
pkgver=4.7.2
|
||||
pkgrel=1
|
||||
_snapshot=4.6-20110819
|
||||
_libstdcppmanver=20110814 # Note: check source directory name when updating this
|
||||
#_snapshot=4.7-20120721
|
||||
pkgdesc="The GNU Compiler Collection for multilib"
|
||||
arch=('x86_64')
|
||||
license=('GPL' 'LGPL' 'FDL' 'custom')
|
||||
url="http://gcc.gnu.org"
|
||||
makedepends=('binutils-multilib>=2.21.1' 'libmpc' 'cloog' 'ppl' 'gcc-ada-multilib'
|
||||
'lib32-glibc>=2.14')
|
||||
makedepends=('binutils-multilib>=2.23' 'libmpc' 'cloog' 'ppl' 'gcc-ada-multilib' 'doxygen'
|
||||
'lib32-glibc>=2.15')
|
||||
checkdepends=('dejagnu')
|
||||
options=('!libtool' '!emptydirs')
|
||||
source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
|
||||
ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
|
||||
ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api.${_libstdcppmanver}.man.tar.bz2
|
||||
gcc_pure64.patch
|
||||
gcc-hash-style-both.patch)
|
||||
md5sums=('b14d22730f9085eab7fd927039e68d28'
|
||||
'ce920d2550ff7e042b9f091d27764d8f'
|
||||
'22cec272f9cc2801d3cd348feaca888b'
|
||||
'4df25b623799b148a0703eaeec8fdf3f')
|
||||
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
|
||||
#ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
|
||||
gcc_pure64-multilib.patch
|
||||
gcc-4.7.1-libada-pic.patch
|
||||
gcc-4.7.1-libgo-write.patch)
|
||||
md5sums=('cc308a0891e778cfda7a151ab8a6e762'
|
||||
'2be883cd6707c59c519b15517363ef08'
|
||||
'69f4c4ad538878085042b5c7f206887b'
|
||||
'5647f5bbbb74fab3013b396da1749d2a')
|
||||
|
||||
|
||||
if [ -n "${_snapshot}" ]; then
|
||||
_basedir="${srcdir}/gcc-${_snapshot}"
|
||||
@ -45,8 +48,13 @@ build() {
|
||||
# Do not run fixincludes
|
||||
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
|
||||
|
||||
patch -Np1 -i ${srcdir}/gcc_pure64.patch
|
||||
patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch
|
||||
patch -p1 -i ${srcdir}/gcc_pure64-multilib.patch
|
||||
|
||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53679
|
||||
patch -p1 -i ${srcdir}/gcc-4.7.1-libgo-write.patch
|
||||
|
||||
# bug to file...
|
||||
patch -p1 -i ${srcdir}/gcc-4.7.1-libada-pic.patch
|
||||
|
||||
echo ${pkgver} > gcc/BASE-VER
|
||||
|
||||
@ -56,22 +64,30 @@ build() {
|
||||
${_basedir}/configure --prefix=/usr \
|
||||
--libdir=/usr/lib --libexecdir=/usr/lib \
|
||||
--mandir=/usr/share/man --infodir=/usr/share/info \
|
||||
--with-bugurl=https://bugs.archlinux.org/ \
|
||||
--with-bugurl=http://chakra-linux.org/bugs/ \
|
||||
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ \
|
||||
--enable-shared --enable-threads=posix \
|
||||
--with-system-zlib --enable-__cxa_atexit \
|
||||
--disable-libunwind-exceptions --enable-clocale=gnu \
|
||||
--disable-libstdcxx-pch --enable-libstdcxx-time \
|
||||
--enable-gnu-unique-object --enable-linker-build-id \
|
||||
--with-ppl --enable-cloog-backend=isl \
|
||||
--disable-ppl-version-check --disable-cloog-version-check \
|
||||
--enable-lto --enable-gold --enable-ld=default \
|
||||
--enable-plugin --with-plugin-ld=ld.gold \
|
||||
--enable-multilib --disable-libssp --disable-libstdcxx-pch \
|
||||
--enable-checking=release
|
||||
--with-linker-hash-style=gnu \
|
||||
--enable-multilib --disable-libssp \
|
||||
--disable-build-with-cxx --disable-build-poststage1-with-cxx
|
||||
#--enable-checking=release
|
||||
make
|
||||
|
||||
# make documentation
|
||||
cd $CHOST/libstdc++-v3
|
||||
make doc-man-doxygen
|
||||
}
|
||||
|
||||
check() {
|
||||
cd gcc-build
|
||||
cd ${srcdir}/gcc-build
|
||||
|
||||
# increase stack size to prevent test failures
|
||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31827
|
||||
@ -85,28 +101,29 @@ check() {
|
||||
package_gcc-libs-multilib()
|
||||
{
|
||||
pkgdesc="Runtime libraries shipped by GCC for multilib"
|
||||
depends=('glibc>=2.14' "lib32-gcc-libs=$pkgver-$pkgrel")
|
||||
depends=('glibc>=2.15' "lib32-gcc-libs=$pkgver-$pkgrel")
|
||||
provides=("gcc-libs=$pkgver-$pkgrel")
|
||||
conflicts=('gcc-libs')
|
||||
install=gcc-libs.install
|
||||
|
||||
cd gcc-build
|
||||
cd ${srcdir}/gcc-build
|
||||
make -j1 -C $CHOST/libgcc DESTDIR=${pkgdir} install-shared
|
||||
for lib in libmudflap libgomp libstdc++-v3/src; do
|
||||
for lib in libmudflap libgomp libstdc++-v3/src libitm; do
|
||||
make -j1 -C $CHOST/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
|
||||
done
|
||||
make -j1 -C $CHOST/libstdc++-v3/po DESTDIR=${pkgdir} install
|
||||
make -j1 -C $CHOST/libgomp DESTDIR=${pkgdir} install-info
|
||||
make -j1 -C $CHOST/libitm DESTDIR=${pkgdir} install-info
|
||||
|
||||
make -j1 DESTDIR=${pkgdir} install-target-libquadmath
|
||||
make -j1 DESTDIR=${pkgdir} install-target-libgfortran
|
||||
make -j1 DESTDIR=${pkgdir} install-target-libobjc
|
||||
|
||||
# remove unnecessary files installed by install-target-{libquadmath,libgfortran,libobjc}
|
||||
rm -rf ${pkgdir}/usr/lib/{gcc/,libgfortran.spec}
|
||||
rm -r ${pkgdir}/usr/lib/{gcc/,libgfortran.spec}
|
||||
|
||||
# remove stuff in lib32-gcc-libs
|
||||
rm -rf ${pkgdir}/usr/lib32
|
||||
rm -r ${pkgdir}/usr/lib32
|
||||
|
||||
# remove static libraries
|
||||
find ${pkgdir} -name *.a -delete
|
||||
@ -119,11 +136,11 @@ package_gcc-libs-multilib()
|
||||
package_lib32-gcc-libs()
|
||||
{
|
||||
pkgdesc="Runtime libraries shipped by GCC (32-bit)"
|
||||
depends=('lib32-glibc>=2.14' "gcc-libs>=$pkgver")
|
||||
depends=('lib32-glibc>=2.15' "gcc-libs>=$pkgver")
|
||||
|
||||
cd gcc-build
|
||||
cd ${srcdir}/gcc-build
|
||||
make -j1 -C $CHOST/32/libgcc DESTDIR=${pkgdir} install-shared
|
||||
for lib in libmudflap libgomp libstdc++-v3/src; do
|
||||
for lib in libmudflap libgomp libstdc++-v3/src libitm; do
|
||||
make -j1 -C $CHOST/32/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
|
||||
done
|
||||
|
||||
@ -135,8 +152,8 @@ package_lib32-gcc-libs()
|
||||
rm ${pkgdir}/usr/lib32/libgfortran.spec
|
||||
|
||||
# remove stuff in gcc-libs-multilib
|
||||
rm -rf ${pkgdir}/usr/lib
|
||||
rm -rf ${pkgdir}/usr/share/info
|
||||
rm -r ${pkgdir}/usr/lib
|
||||
rm -r ${pkgdir}/usr/share/info
|
||||
|
||||
# remove static libraries
|
||||
find ${pkgdir} -name *.a -delete
|
||||
@ -149,38 +166,36 @@ package_lib32-gcc-libs()
|
||||
package_gcc-multilib()
|
||||
{
|
||||
pkgdesc="The GNU Compiler Collection - C and C++ frontends for multilib"
|
||||
depends=("gcc-libs-multilib=$pkgver-$pkgrel" 'binutils-multilib>=2.21.1' 'libmpc' 'cloog' 'ppl')
|
||||
depends=("gcc-libs-multilib=$pkgver-$pkgrel" 'binutils-multilib>=2.23' 'libmpc' 'cloog' 'ppl')
|
||||
groups=('multilib-devel')
|
||||
provides=("gcc=$pkgver-$pkgrel")
|
||||
conflicts=('gcc')
|
||||
install=gcc.install
|
||||
|
||||
cd gcc-build
|
||||
cd ${srcdir}/gcc-build
|
||||
|
||||
# unfortunately it is much, much easier to install the lot and clean-up the mess...
|
||||
make -j1 DESTDIR=${pkgdir} install
|
||||
|
||||
install -d $pkgdir/usr/share/gdb/auto-load/usr/lib
|
||||
mv $pkgdir{,/usr/share/gdb/auto-load}/usr/lib/libstdc++.so.6.0.17-gdb.py
|
||||
|
||||
# unfortunately it is much, much easier to install the lot and clean-up the mess...
|
||||
rm $pkgdir/usr/bin/{{$CHOST-,}gfortran,{$CHOST-,}gccgo,gnat*}
|
||||
rm $pkgdir/usr/lib{,32}/*.so*
|
||||
rm $pkgdir/usr/lib{,32}/lib{ffi,gfortran,go{,begin},objc,quadmath}.a
|
||||
rm $pkgdir/usr/lib{,32}/libgfortran.spec
|
||||
rm -r $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{{,32/}ada{include,lib},finclude,include/objc}
|
||||
rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/include/{ffi{,target}.h,quadmath{,_weak}.h}
|
||||
rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{cc1obj{,plus},f951,gnat1,go1,{,32/}libgfortranbegin.a}
|
||||
rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{cc1obj{,plus},f951,gnat1,go1}
|
||||
rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{,32/}{libcaf_single,libgfortranbegin}.a
|
||||
rm -r $pkgdir/usr/lib{,32}/go
|
||||
rm $pkgdir/usr/share/info/{gccgo,gfortran,gnat*,libgomp,libquadmath}.info
|
||||
rm $pkgdir/usr/share/info/{gccgo,gfortran,gnat*,libgomp,libquadmath,libitm}.info
|
||||
rm $pkgdir/usr/share/locale/{de,fr}/LC_MESSAGES/libstdc++.mo
|
||||
rm $pkgdir/usr/share/man/man1/{gccgo,gfortran}.1
|
||||
rm $pkgdir/usr/share/man/man3/ffi*
|
||||
|
||||
# many packages require these symlinks
|
||||
install -dm755 ${pkgdir}/lib
|
||||
ln -sf /usr/bin/cpp ${pkgdir}/lib/cpp
|
||||
ln -sf gcc ${pkgdir}/usr/bin/cc
|
||||
ln -sf g++ ${pkgdir}/usr/bin/c++
|
||||
|
||||
# install gengtype for plugin support
|
||||
install -m755 gcc/build/gengtype $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/
|
||||
install -m644 gcc/gtype.state $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/
|
||||
# many packages expect this symlinks
|
||||
ln -s gcc ${pkgdir}/usr/bin/cc
|
||||
|
||||
# POSIX conformance launcher scripts for c89 and c99
|
||||
cat > $pkgdir/usr/bin/c89 <<"EOF"
|
||||
@ -213,7 +228,8 @@ EOF
|
||||
|
||||
# install the libstdc++ man pages
|
||||
install -dm755 ${pkgdir}/usr/share/man/man3
|
||||
install -m644 ${srcdir}/man/man3/* ${pkgdir}/usr/share/man/man3/
|
||||
install -m644 -t ${pkgdir}/usr/share/man/man3 \
|
||||
${CHOST}/libstdc++-v3/doc/doxygen/man/man3/*.3
|
||||
|
||||
# Install Runtime Library Exception
|
||||
install -Dm644 ${_basedir}/COPYING.RUNTIME \
|
||||
@ -228,7 +244,7 @@ package_gcc-fortran-multilib()
|
||||
conflicts=('gcc-fortran')
|
||||
install=gcc-fortran.install
|
||||
|
||||
cd gcc-build
|
||||
cd ${srcdir}/gcc-build
|
||||
make -j1 DESTDIR=${pkgdir} install-target-libquadmath
|
||||
make -j1 DESTDIR=$pkgdir install-target-libgfortran
|
||||
make -j1 -C $CHOST/libgomp DESTDIR=$pkgdir install-nodist_fincludeHEADERS
|
||||
@ -238,7 +254,9 @@ package_gcc-fortran-multilib()
|
||||
# remove libraries included in gcc-libs
|
||||
rm ${pkgdir}/usr/lib{,32}/lib{gfortran,quadmath}.so*
|
||||
rm ${pkgdir}/usr/share/info/libquadmath.info
|
||||
|
||||
|
||||
ln -s gfortran ${pkgdir}/usr/bin/f95
|
||||
|
||||
# Install Runtime Library Exception
|
||||
install -Dm644 ${_basedir}/COPYING.RUNTIME \
|
||||
${pkgdir}/usr/share/licenses/gcc-fortran-multilib/RUNTIME.LIBRARY.EXCEPTION
|
||||
@ -251,7 +269,7 @@ package_gcc-objc-multilib()
|
||||
provides=("gcc-objc=$pkgver-$pkgrel")
|
||||
conflicts=('gcc-objc')
|
||||
|
||||
cd gcc-build
|
||||
cd ${srcdir}/gcc-build
|
||||
make -j1 DESTDIR=$pkgdir install-target-libobjc
|
||||
install -dm755 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/
|
||||
install -m755 gcc/cc1obj{,plus} $pkgdir/usr/lib/gcc/$CHOST/$pkgver/
|
||||
@ -272,7 +290,7 @@ package_gcc-ada-multilib()
|
||||
conflicts=('gcc-ada')
|
||||
install=gcc-ada.install
|
||||
|
||||
cd gcc-build/gcc
|
||||
cd ${srcdir}/gcc-build/gcc
|
||||
make -j1 DESTDIR=$pkgdir ada.install-{common,info}
|
||||
install -m755 gnat1 $pkgdir/usr/lib/gcc/$CHOST/$pkgver
|
||||
|
||||
@ -280,6 +298,8 @@ package_gcc-ada-multilib()
|
||||
make -j1 DESTDIR=${pkgdir} INSTALL="install" \
|
||||
INSTALL_DATA="install -m644" install-gnatlib
|
||||
|
||||
ln -s gcc ${pkgdir}/usr/bin/gnatgcc
|
||||
|
||||
# Install Runtime Library Exception
|
||||
install -Dm644 ${_basedir}/COPYING.RUNTIME \
|
||||
${pkgdir}/usr/share/licenses/gcc-ada-multilib/RUNTIME.LIBRARY.EXCEPTION
|
||||
@ -293,7 +313,7 @@ package_gcc-go-multilib()
|
||||
conflicts=('gcc-go')
|
||||
install=gcc-go.install
|
||||
|
||||
cd gcc-build
|
||||
cd ${srcdir}/gcc-build
|
||||
make -j1 DESTDIR=$pkgdir install-target-libgo
|
||||
make -j1 -C gcc DESTDIR=$pkgdir go.install-{common,man,info}
|
||||
install -Dm755 gcc/go1 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/go1
|
||||
|
12
gcc-multilib/gcc-4.7.1-libada-pic.patch
Normal file
12
gcc-multilib/gcc-4.7.1-libada-pic.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -Naur gcc-4.7.1-orig/libada/Makefile.in gcc-4.7.1/libada/Makefile.in
|
||||
--- gcc-4.7.1-orig/libada/Makefile.in 2012-06-13 01:12:37.000000000 +1000
|
||||
+++ gcc-4.7.1/libada/Makefile.in 2012-06-16 15:04:32.179911023 +1000
|
||||
@@ -54,7 +54,7 @@
|
||||
PICFLAG = @PICFLAG@
|
||||
GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
|
||||
GNATLIBCFLAGS= -g -O2
|
||||
-GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \
|
||||
+GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(PICFLAG) \
|
||||
-fexceptions -DIN_RTS @have_getipinfo@
|
||||
|
||||
host_subdir = @host_subdir@
|
12
gcc-multilib/gcc-4.7.1-libgo-write.patch
Normal file
12
gcc-multilib/gcc-4.7.1-libgo-write.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -Naur gcc-4.7.1-orig/libgo/runtime/print.c gcc-4.7.1/libgo/runtime/print.c
|
||||
--- gcc-4.7.1-orig/libgo/runtime/print.c 2012-05-26 04:22:14.000000000 +1000
|
||||
+++ gcc-4.7.1/libgo/runtime/print.c 2012-06-16 15:06:28.553138502 +1000
|
||||
@@ -17,7 +17,8 @@
|
||||
G* g = runtime_g();
|
||||
|
||||
if(g == nil || g->writebuf == nil) {
|
||||
- runtime_write(2, v, n);
|
||||
+ ssize_t bytesWritten = runtime_write(2, v, n);
|
||||
+ (void)bytesWritten;
|
||||
return;
|
||||
}
|
@ -1,122 +0,0 @@
|
||||
--- gcc/config/alpha/linux-elf.h.orig 2010-12-09 23:27:07.000000000 +1000
|
||||
+++ gcc/config/alpha/linux-elf.h 2011-03-11 10:01:47.770000457 +1000
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#define ELF_DYNAMIC_LINKER LINUX_DYNAMIC_LINKER
|
||||
|
||||
-#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
|
||||
+#define LINK_SPEC "-m elf64alpha --hash-style=both %{G*} %{relax:-relax} \
|
||||
%{O*:-O3} %{!O*:-O1} \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
--- gcc/config/i386/linux64.h.orig 2011-03-03 08:35:36.000000000 +1000
|
||||
+++ gcc/config/i386/linux64.h 2011-03-11 10:01:47.770000457 +1000
|
||||
@@ -78,7 +78,7 @@
|
||||
%{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
|
||||
|
||||
#undef LINK_SPEC
|
||||
-#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \
|
||||
+#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} --hash-style=both \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
--- gcc/config/i386/linux.h.orig 2011-01-15 04:45:06.000000000 +1000
|
||||
+++ gcc/config/i386/linux.h 2011-03-11 10:01:47.770000457 +1000
|
||||
@@ -104,7 +104,7 @@
|
||||
{ "dynamic_linker", LINUX_DYNAMIC_LINKER }
|
||||
|
||||
#undef LINK_SPEC
|
||||
-#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
|
||||
+#define LINK_SPEC "-m %(link_emulation) --hash-style=both %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
--- gcc/config/ia64/linux.h.orig 2010-12-09 23:27:07.000000000 +1000
|
||||
+++ gcc/config/ia64/linux.h 2011-03-11 10:01:47.770000457 +1000
|
||||
@@ -64,7 +64,7 @@
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
|
||||
|
||||
#undef LINK_SPEC
|
||||
-#define LINK_SPEC "\
|
||||
+#define LINK_SPEC "--hash-style=both \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
--- gcc/config/rs6000/linux64.h.orig 2011-02-11 03:30:10.000000000 +1000
|
||||
+++ gcc/config/rs6000/linux64.h 2011-03-11 10:03:34.280000457 +1000
|
||||
@@ -389,11 +389,11 @@
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
|
||||
|
||||
|
||||
-#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
|
||||
+#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux --hash-style=both %{!shared: %{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}"
|
||||
|
||||
-#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
|
||||
+#define LINK_OS_LINUX_SPEC64 "-m elf64ppc --hash-style=both %{!shared: %{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}"
|
||||
|
||||
--- gcc/config/rs6000/sysv4.h.orig 2011-01-28 04:36:03.000000000 +1000
|
||||
+++ gcc/config/rs6000/sysv4.h 2011-03-11 10:01:47.773333792 +1000
|
||||
@@ -830,7 +830,7 @@
|
||||
#define LINUX_DYNAMIC_LINKER \
|
||||
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
|
||||
|
||||
-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
|
||||
+#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=both %{!shared: %{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
-dynamic-linker " LINUX_DYNAMIC_LINKER "}}"
|
||||
|
||||
--- gcc/config/s390/linux.h.orig 2010-12-09 23:27:07.000000000 +1000
|
||||
+++ gcc/config/s390/linux.h 2011-03-11 10:01:47.770000457 +1000
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
|
||||
+ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=both \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{static:-static} \
|
||||
--- gcc/config/sparc/linux64.h.orig 2011-02-17 23:57:21.000000000 +1000
|
||||
+++ gcc/config/sparc/linux64.h 2011-03-11 10:01:47.770000457 +1000
|
||||
@@ -113,7 +113,7 @@
|
||||
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
|
||||
{ "link_arch", LINK_ARCH_SPEC },
|
||||
|
||||
-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,%R/usr/lib %{shared:-shared} \
|
||||
+#define LINK_ARCH32_SPEC "-m elf32_sparc --hash-style=both -Y P,%R/usr/lib %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
@@ -121,7 +121,7 @@
|
||||
%{static:-static}} \
|
||||
"
|
||||
|
||||
-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \
|
||||
+#define LINK_ARCH64_SPEC "-m elf64_sparc --hash-style=both -Y P,%R/usr/lib64 %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
@@ -193,7 +193,7 @@
|
||||
#else /* !SPARC_BI_ARCH */
|
||||
|
||||
#undef LINK_SPEC
|
||||
-#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \
|
||||
+#define LINK_SPEC "-m elf64_sparc --hash-style=both -Y P,%R/usr/lib64 %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
--- gcc/config/sparc/linux.h.orig 2011-01-27 06:30:12.000000000 +1000
|
||||
+++ gcc/config/sparc/linux.h 2011-03-11 10:01:47.770000457 +1000
|
||||
@@ -74,7 +74,7 @@
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
||||
#undef LINK_SPEC
|
||||
-#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
|
||||
+#define LINK_SPEC "-m elf32_sparc --hash-style=both -Y P,/usr/lib %{shared:-shared} \
|
||||
%{!mno-relax:%{!r:-relax}} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
22
gcc-multilib/gcc_pure64-multilib.patch
Normal file
22
gcc-multilib/gcc_pure64-multilib.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff -u -r gcc-4.7.0/gcc/config/i386/linux64.h gcc-4.7.0-pure64/gcc/config/i386/linux64.h
|
||||
--- gcc-4.7.0/gcc/config/i386/linux64.h 2011-07-07 17:38:34.000000000 +0200
|
||||
+++ gcc-4.7.0-pure64/gcc/config/i386/linux64.h 2012-03-24 11:52:58.926204014 +0100
|
||||
@@ -29,5 +29,5 @@
|
||||
#define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
|
||||
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
|
||||
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
|
||||
#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
|
||||
diff -u -r gcc-4.7.0/gcc/config/i386/t-linux64 gcc-4.7.0-pure64/gcc/config/i386/t-linux64
|
||||
--- gcc-4.7.0/gcc/config/i386/t-linux64 2011-11-02 16:23:48.000000000 +0100
|
||||
+++ gcc-4.7.0-pure64/gcc/config/i386/t-linux64 2012-03-24 11:52:44.119651885 +0100
|
||||
@@ -34,6 +34,6 @@
|
||||
comma=,
|
||||
MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
|
||||
MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
|
||||
-MULTILIB_OSDIRNAMES = m64=../lib64
|
||||
-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib
|
||||
+MULTILIB_OSDIRNAMES+= m32=../lib32
|
||||
MULTILIB_OSDIRNAMES+= mx32=../libx32
|
2
jack2-multilib/40-hpet-permissions.rules
Normal file
2
jack2-multilib/40-hpet-permissions.rules
Normal file
@ -0,0 +1,2 @@
|
||||
KERNEL=="rtc0", GROUP="audio"
|
||||
KERNEL=="hpet", GROUP="audio"
|
2
jack2-multilib/99-audio.conf
Normal file
2
jack2-multilib/99-audio.conf
Normal file
@ -0,0 +1,2 @@
|
||||
@audio - rtprio 99
|
||||
@audio - memlock unlimited
|
146
jack2-multilib/PKGBUILD
Normal file
146
jack2-multilib/PKGBUILD
Normal file
@ -0,0 +1,146 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# Maintainer: Michael Haesel <michael[dot]haesel[at]gmail[dot]com>
|
||||
# Contributor: Ray Rashif <schiv@archlinux.org>
|
||||
# Contributor: SpepS <dreamspepser at yahoo dot it>
|
||||
|
||||
# This one is in response to a need for an equivalent to lib32-jack for
|
||||
# jack2. A lib32-jack2 would require much patching and invading the pure
|
||||
# jack2 package, and what's more, the buildsystem provides a flag just to
|
||||
# build a hybrid jack2 in full. As such, we have opted to provide multilib
|
||||
# users with a replacement package instead of the usual lib32 add-on.
|
||||
#
|
||||
# See http://mailman.archlinux.org/pipermail/arch-multilib/2011-December/000251.html
|
||||
|
||||
pkgbase=jack2-multilib
|
||||
pkgname=('jack2-multilib' 'jack2-dbus-multilib')
|
||||
#pkgname= # single build (overrides split)
|
||||
_tarname=jack
|
||||
pkgver=1.9.8
|
||||
pkgrel=2
|
||||
arch=('x86_64')
|
||||
url="http://jackaudio.org/"
|
||||
backup=(etc/security/limits.d/99-audio.conf)
|
||||
license=('GPL')
|
||||
makedepends=('python2' 'doxygen' 'libffado'
|
||||
'libsamplerate' 'lib32-dbus-core' 'lib32-celt'
|
||||
'gcc-multilib')
|
||||
source=("http://www.grame.fr/~letz/${_tarname}-${pkgver}.tgz"
|
||||
'99-audio.conf'
|
||||
'40-hpet-permissions.rules')
|
||||
sha256sums=('4c712eac54bdf5b4c0245f728654459d0437e5cdab84e7ac633be6fe4502081d'
|
||||
'f6ef5910d8f13ad117851729b396802f8ea4cffa7786b2eea53ce8cbac8f7c15'
|
||||
'08beea3d5594cdb9f78ad9302b6c4d8e89003a9fbd401c9f7b10f2cba23edecb')
|
||||
|
||||
_pyfix() {
|
||||
sed -i 's:bin/env python:bin/env python2:' \
|
||||
"${pkgdir}/usr/bin/jack_control"
|
||||
}
|
||||
|
||||
_wafconf() {
|
||||
python2 waf configure --prefix=/usr \
|
||||
--alsa \
|
||||
--firewire \
|
||||
--mixed \
|
||||
--doxygen $@
|
||||
}
|
||||
|
||||
_isbuild() {
|
||||
printf "%s\n" ${pkgname[@]} | grep -qx $1
|
||||
}
|
||||
|
||||
_mklinks() {
|
||||
ln -s /usr/lib32/libjack.so.0.1.0 "${pkgdir}/usr/lib32/libjack.so.0"
|
||||
ln -s /usr/lib32/libjack.so.0 "${pkgdir}/usr/lib32/libjack.so"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_tarname}-${pkgver}"
|
||||
|
||||
export LINKFLAGS="$LDFLAGS"
|
||||
|
||||
# fix doxygen building
|
||||
sed -i 's:build/default/html:html:' ${_tarname}-${pkgver}/wscript
|
||||
|
||||
# we may do 2 different builds
|
||||
cp -r "${_tarname}-${pkgver}" "${_tarname}-dbus-${pkgver}"
|
||||
|
||||
# mixed dbus/classic build
|
||||
if _isbuild jack2-multilib; then
|
||||
cd "${_tarname}-${pkgver}"
|
||||
msg2 "Running Mixed D-Bus/Classic build"
|
||||
_wafconf --classic --dbus
|
||||
python2 waf build $MAKEFLAGS
|
||||
cd ..
|
||||
fi
|
||||
|
||||
# dbus-ONLY build
|
||||
if _isbuild jack2-dbus-multilib; then
|
||||
cd "${_tarname}-dbus-${pkgver}"
|
||||
msg2 "Running D-Bus-only build"
|
||||
_wafconf --dbus
|
||||
python2 waf build $MAKEFLAGS
|
||||
cd ..
|
||||
fi
|
||||
}
|
||||
|
||||
package_jack2-multilib() {
|
||||
! _isbuild jack2-multilib && return 0
|
||||
|
||||
pkgdesc="The next-generation JACK with SMP support & mixed mode"
|
||||
depends=('libsamplerate' 'lib32-celt' 'lib32-gcc-libs')
|
||||
optdepends=('libffado: FireWire support'
|
||||
'lib32-dbus-core: jackdbus'
|
||||
'python2: jack_control')
|
||||
conflicts=('jack' 'jack2' 'lib32-jack')
|
||||
provides=('jack' 'jackmp' 'jackdmp' 'jackdbus' 'jack-audio-connection-kit'
|
||||
'jack2' 'lib32-jack' 'lib32-jack2')
|
||||
|
||||
cd "${srcdir}/${_tarname}-${pkgver}/${_tarname}-${pkgver}"
|
||||
|
||||
python2 waf install --destdir="${pkgdir}"
|
||||
|
||||
# fix for major python transition
|
||||
_pyfix
|
||||
|
||||
# configure realtime access/scheduling
|
||||
# see https://bugs.archlinux.org/task/26343
|
||||
install -Dm644 "${srcdir}/99-audio.conf" \
|
||||
"${pkgdir}/etc/security/limits.d/99-audio.conf"
|
||||
|
||||
install -Dm644 "${srcdir}/40-hpet-permissions.rules" \
|
||||
"${pkgdir}/usr/lib/udev/rules.d/40-hpet-permissions.rules"
|
||||
|
||||
# should be done by upstream
|
||||
# see http://trac.jackaudio.org/ticket/200
|
||||
_mklinks
|
||||
}
|
||||
|
||||
package_jack2-dbus-multilib() {
|
||||
! _isbuild jack2-dbus-multilib && return 0
|
||||
|
||||
pkgdesc="The next-generation JACK with SMP support & mixed mode (for D-BUS interaction only)"
|
||||
depends=('libsamplerate' 'lib32-celt' 'lib32-dbus-core' 'lib32-gcc-libs')
|
||||
optdepends=('libffado: FireWire support'
|
||||
'python2: jack_control')
|
||||
conflicts=('jack' 'jack2' 'lib32-jack' 'jack2-multilib')
|
||||
provides=('jack' 'jack2' 'jackmp' 'jackdmp' 'jackdbus' 'jack-audio-connection-kit'
|
||||
'jack2-dbus' 'jack2-multilib' 'lib32-jack' 'lib32-jack2')
|
||||
|
||||
cd "${srcdir}/${_tarname}-${pkgver}/${_tarname}-dbus-${pkgver}"
|
||||
|
||||
python2 waf install --destdir="${pkgdir}"
|
||||
|
||||
_pyfix
|
||||
|
||||
install -Dm644 "${srcdir}/99-audio.conf" \
|
||||
"${pkgdir}/etc/security/limits.d/99-audio.conf"
|
||||
|
||||
install -Dm644 "${srcdir}/40-hpet-permissions.rules" \
|
||||
"${pkgdir}/usr/lib/udev/rules.d/40-hpet-permissions.rules"
|
||||
|
||||
_mklinks
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
@ -3,9 +3,8 @@
|
||||
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
|
||||
_pkgbasename=acl
|
||||
pkgname=lib32-acl
|
||||
pkgver=2.2.51
|
||||
pkgver=2.2.49
|
||||
pkgrel=1
|
||||
pkgdesc="Access control list libraries (32-bit)"
|
||||
arch=('x86_64')
|
||||
@ -14,11 +13,11 @@ license=('LGPL')
|
||||
depends=('lib32-attr' 'acl')
|
||||
makedepends=('gcc-multilib')
|
||||
options=('!libtool')
|
||||
source=(http://download.savannah.gnu.org/releases/${_pkgbasename}/${_pkgbasename}-${pkgver}.src.tar.gz)
|
||||
sha256sums=('06854521cf5d396801af7e54b9636680edf8064355e51c07657ec7442a185225')
|
||||
source=(http://mirrors.zerg.biz/nongnu/acl/acl-${pkgver}.src.tar.gz)
|
||||
sha256sums=('b9c7f4752e4ef4930a62fa5aa0d7efe1cba2b5a3a2d6ee2b45c0a70c72b7e5d5')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_pkgbasename}-${pkgver}"
|
||||
cd "${srcdir}/acl-${pkgver}"
|
||||
|
||||
export CC="gcc -m32"
|
||||
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
_pkgbasename=alsa-lib
|
||||
pkgname=lib32-${_pkgbasename}
|
||||
pkgver=1.0.24.1
|
||||
pkgrel=2
|
||||
pkgver=1.0.26
|
||||
pkgrel=1
|
||||
pkgdesc="An alternative implementation of Linux sound support (32 bit)"
|
||||
arch=('x86_64')
|
||||
url="http://www.alsa-project.org"
|
||||
@ -14,8 +14,9 @@ makedepends=('gcc-multilib')
|
||||
depends=('lib32-glibc' 'alsa-lib')
|
||||
license=('GPL')
|
||||
options=(!libtool)
|
||||
source=(ftp://ftp.alsa-project.org/pub/lib/${_pkgbasename}-$pkgver.tar.bz2)
|
||||
md5sums=('7cc05f25e1d5b65da8fb3fdcd540f226')
|
||||
#source=(ftp://ftp.alsa-project.org/pub/lib/${_pkgbasename}-$pkgver.tar.bz2)
|
||||
source=(http://alsa.cybermirror.org/lib/alsa-lib-$pkgver.tar.bz2)
|
||||
md5sums=('2dfa35d28471d721e592b616beedf965')
|
||||
|
||||
build() {
|
||||
cd $srcdir/${_pkgbasename}-$pkgver
|
||||
|
@ -5,16 +5,17 @@
|
||||
|
||||
_pkgbasename=alsa-oss
|
||||
pkgname=lib32-${_pkgbasename}
|
||||
pkgver=1.0.17
|
||||
pkgrel=3
|
||||
pkgver=1.0.25
|
||||
pkgrel=2
|
||||
pkgdesc="OSS compatibility library (32 bit)"
|
||||
arch=(x86_64)
|
||||
license=('GPL')
|
||||
url="http://www.alsa-project.org"
|
||||
options=(!libtool)
|
||||
depends=('lib32-glibc' 'lib32-alsa-lib' 'alsa-oss')
|
||||
source=(ftp://ftp.alsa-project.org/pub/oss-lib/${_pkgbasename}-$pkgver.tar.bz2)
|
||||
md5sums=('1b1850c2fc91476a73d50f537cbd402f')
|
||||
#source=(ftp://ftp.alsa-project.org/pub/oss-lib/${_pkgbasename}-$pkgver.tar.bz2)
|
||||
source=(http://alsa.cybermirror.org/oss-lib/${_pkgbasename}-$pkgver.tar.bz2)
|
||||
md5sums=('922ea177db15c72f1b5037181c73f934')
|
||||
|
||||
build() {
|
||||
cd $srcdir/${_pkgbasename}-$pkgver
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
_pkgbasename=alsa-plugins
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=1.0.24
|
||||
pkgrel=2
|
||||
pkgver=1.0.26
|
||||
pkgrel=1
|
||||
pkgdesc="Extra alsa plugins (32-bit)"
|
||||
arch=(x86_64)
|
||||
url="http://www.alsa-project.org"
|
||||
license=(GPL)
|
||||
depends=(lib32-alsa-lib $_pkgbasename)
|
||||
depends=(lib32-alsa-lib $_pkgbasename=$pkgver)
|
||||
makedepends=(lib32-{libpulse,jack,speex,libsamplerate} gcc-multilib)
|
||||
optdepends=('lib32-libpulse: PulseAudio plugin'
|
||||
'lib32-jack: Jack plugin'
|
||||
'lib32-libsamplerate: libsamplerate resampling plugin'
|
||||
'lib32-speex: libspeexdsp resampling plugin')
|
||||
options=('!libtool')
|
||||
source=("ftp://ftp.alsa-project.org/pub/plugins/$_pkgbasename-$pkgver.tar.bz2")
|
||||
md5sums=('e4d4c90e11ab9d1a117afbbc1edd2b16')
|
||||
#source=("ftp://ftp.alsa-project.org/pub/plugins/$_pkgbasename-$pkgver.tar.bz2")
|
||||
source=("http://alsa.cybermirror.org//plugins/$_pkgbasename-$pkgver.tar.bz2")
|
||||
md5sums=('4facd408326ef5567a7d4ceb6589e6b0')
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$_pkgbasename-$pkgver"
|
||||
@ -35,4 +36,5 @@ build() {
|
||||
package() {
|
||||
cd "$srcdir/$_pkgbasename-$pkgver"
|
||||
make DESTDIR="$pkgdir" install
|
||||
rm -r "$pkgdir/usr/share"
|
||||
}
|
||||
|
@ -5,17 +5,17 @@
|
||||
|
||||
_pkgbasename=atk
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=2.0.1
|
||||
pkgrel=1
|
||||
pkgver=2.2.0
|
||||
pkgrel=2
|
||||
pkgdesc="A library providing a set of interfaces for accessibility (32-bit)"
|
||||
arch=('x86_64')
|
||||
license=('LGPL')
|
||||
depends=('lib32-glib2>=2.25.17' $_pkgbasename)
|
||||
depends=('lib32-glib2' $_pkgbasename=$pkgver)
|
||||
makedepends=('gcc-multilib')
|
||||
options=('!libtool')
|
||||
source=(http://ftp.gnome.org/pub/gnome/sources/${_pkgbasename}/${pkgver%.*}/${_pkgbasename}-${pkgver}.tar.bz2)
|
||||
url='http://www.gtk.org/'
|
||||
sha256sums=('3d81c7d70fc66e5b129567a7706b6f8ff5db18281a818b29d4dd5bcefa3d4a17')
|
||||
sha256sums=('d201e3f5808aef0b1aec2277bfa61074f68863e405428adb57a73aab5c838450')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
|
@ -11,7 +11,7 @@ pkgdesc="Extended attribute support library for ACL support (32-bit)"
|
||||
arch=(x86_64)
|
||||
url="http://oss.sgi.com/projects/xfs/"
|
||||
license=('LGPL')
|
||||
depends=('lib32-glibc' $_pkgbasename)
|
||||
depends=('lib32-glibc' $_pkgbasename=$pkgver)
|
||||
makedepends=('gcc-multilib' 'gettext')
|
||||
options=('!libtool')
|
||||
source=(http://download.savannah.gnu.org/releases/${_pkgbasename}/${_pkgbasename}-${pkgver}.src.tar.gz)
|
||||
|
@ -5,17 +5,17 @@
|
||||
|
||||
_pkgbasename=audiofile
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=0.3.2
|
||||
pkgver=0.2.7
|
||||
pkgrel=1
|
||||
pkgdesc="Silicon Graphics Audio File Library (32-bit)"
|
||||
arch=('x86_64')
|
||||
url="http://www.68k.org/~michael/audiofile/"
|
||||
license=('LGPL')
|
||||
depends=('lib32-glibc' 'lib32-alsa-lib' $_pkgbasename)
|
||||
depends=('lib32-glibc' $_pkgbasename=$pkgver)
|
||||
makedepends=(gcc-multilib)
|
||||
options=('!libtool')
|
||||
source=(http://audiofile.68k.org/${_pkgbasename}-$pkgver.tar.gz)
|
||||
md5sums=('cb2c4fe6e899e688ffe5d1568581cb63')
|
||||
source=(http://ftp.gnome.org/pub/gnome/sources/${_pkgbasename}/0.2/${_pkgbasename}-${pkgver}.tar.bz2)
|
||||
sha256sums=('61efd278627415b5468426fc9e52aef32ea0fdac12b56bcdd72734c2ece5945e')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
|
39
lib32-bzip2/PKGBUILD
Normal file
39
lib32-bzip2/PKGBUILD
Normal file
@ -0,0 +1,39 @@
|
||||
_pkgbasename=bzip2
|
||||
pkgname=lib32-bzip2
|
||||
pkgver=1.0.6
|
||||
pkgrel=1
|
||||
pkgdesc="A high-quality data compression program (32-bit)"
|
||||
arch=('x86_64')
|
||||
license=('custom')
|
||||
url="http://sources.redhat.com/bzip2"
|
||||
depends=('lib32-glibc' $_pkgbasename=$pkgver)
|
||||
makedepends=('gcc-multilib')
|
||||
source=(http://www.bzip.org/$pkgver/bzip2-$pkgver.tar.gz)
|
||||
md5sums=('00b516f4704d4a7cb50a1d97e6e8e15b')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_pkgbasename}-${pkgver}"
|
||||
|
||||
sed -i "s|CC=gcc|CC=gcc -m32|" Makefile
|
||||
sed -i "s|CC=gcc|CC=gcc -m32|" Makefile-libbz2_so
|
||||
|
||||
# add large-file support
|
||||
sed -e 's/^CFLAGS=\(.*\)$/CFLAGS=\1 \$(BIGFILES)/' -i ./Makefile-libbz2_so
|
||||
|
||||
# use our optimization
|
||||
sed -i "s|-O2|${CFLAGS}|g" Makefile
|
||||
sed -i "s|-O2|${CFLAGS}|g" Makefile-libbz2_so
|
||||
|
||||
make -f Makefile-libbz2_so
|
||||
make libbz2.a
|
||||
}
|
||||
|
||||
package(){
|
||||
cd "${srcdir}/${_pkgbasename}-${pkgver}"
|
||||
install -Dm755 libbz2.so.1.0.6 "${pkgdir}"/usr/lib32/libbz2.so.1.0.6
|
||||
ln -s libbz2.so.1.0.6 "${pkgdir}"/usr/lib32/libbz2.so
|
||||
ln -s libbz2.so.1.0.6 "${pkgdir}"/usr/lib32/libbz2.so.1
|
||||
ln -s libbz2.so.1.0.6 "${pkgdir}"/usr/lib32/libbz2.so.1.0
|
||||
|
||||
install -Dm644 libbz2.a ${pkgdir}/usr/lib32/libbz2.a
|
||||
}
|
@ -5,19 +5,21 @@
|
||||
|
||||
_pkgbasename=cairo
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=1.10.2
|
||||
pkgver=1.12.6
|
||||
pkgrel=2
|
||||
pkgdesc="Cairo vector graphics library (32-bit)"
|
||||
arch=('x86_64')
|
||||
url="http://cairographics.org/"
|
||||
license=('LGPL' 'MPL')
|
||||
depends=('lib32-libpng' 'lib32-libxrender' 'lib32-fontconfig'
|
||||
'lib32-pixman' 'lib32-glib2' ${_pkgbasename})
|
||||
makedepends=('gcc-multilib')
|
||||
source=(http://cairographics.org/releases/${_pkgbasename}-${pkgver}.tar.gz
|
||||
cairo-1.10.0-buggy_gradients.patch)
|
||||
sha1sums=('ccce5ae03f99c505db97c286a0c9a90a926d3c6e'
|
||||
'8b843a9934e5112b6188e5bcf4adfc1fdaf9fa04')
|
||||
depends=('lib32-libpng' 'lib32-libxrender' 'lib32-fontconfig' 'lib32-libxext'
|
||||
'lib32-pixman' 'lib32-glib2' ${_pkgbasename}=${pkgver})
|
||||
makedepends=('gcc-multilib' 'libtool-multilib')
|
||||
source=(http://cairographics.org/releases/${_pkgbasename}-${pkgver}.tar.xz
|
||||
cairo-1.10.0-buggy_gradients.patch
|
||||
git_fixes.diff)
|
||||
sha1sums=('a383c6cb4495e18848ea43e1031c294aa9417a43'
|
||||
'e867f1020391686b972d5bedcce3c6d1193d7953'
|
||||
'2184e8d633cfaf09aa87746f7b90e619a8a5afeb')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
@ -25,9 +27,16 @@ build() {
|
||||
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
||||
|
||||
cd "${srcdir}/${_pkgbasename}-${pkgver}"
|
||||
patch -p1 -i "${srcdir}/cairo-1.10.0-buggy_gradients.patch"
|
||||
patch -p1 -i "${srcdir}/git_fixes.diff"
|
||||
|
||||
autoreconf -vfi
|
||||
./configure --prefix=/usr --libdir=/usr/lib32 \
|
||||
--sysconfdir=/etc --localstatedir=/var \
|
||||
--disable-static
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--disable-static \
|
||||
--enable-tee \
|
||||
--disable-xlib-xcb
|
||||
make
|
||||
}
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
--- a/src/cairo-xlib-display.c.ubuntu 2010-08-04 11:57:49.000000000 +0200
|
||||
+++ b/src/cairo-xlib-display.c 2010-08-04 11:58:28.000000000 +0200
|
||||
@@ -353,11 +353,7 @@
|
||||
/* Prior to Render 0.10, there is no protocol support for gradients and
|
||||
* we call function stubs instead, which would silently consume the drawing.
|
||||
*/
|
||||
-#if RENDER_MAJOR == 0 && RENDER_MINOR < 10
|
||||
display->buggy_gradients = TRUE;
|
||||
-#else
|
||||
- display->buggy_gradients = FALSE;
|
||||
-#endif
|
||||
display->buggy_pad_reflect = FALSE;
|
||||
display->buggy_repeat = FALSE;
|
||||
--- a/src/cairo-xlib-display.c.ubuntu 2010-08-04 11:57:49.000000000 +0200
|
||||
+++ b/src/cairo-xlib-display.c 2010-08-04 11:58:28.000000000 +0200
|
||||
@@ -353,11 +353,7 @@
|
||||
/* Prior to Render 0.10, there is no protocol support for gradients and
|
||||
* we call function stubs instead, which would silently consume the drawing.
|
||||
*/
|
||||
-#if RENDER_MAJOR == 0 && RENDER_MINOR < 10
|
||||
display->buggy_gradients = TRUE;
|
||||
-#else
|
||||
- display->buggy_gradients = FALSE;
|
||||
-#endif
|
||||
display->buggy_pad_reflect = FALSE;
|
||||
display->buggy_repeat = FALSE;
|
||||
|
934
lib32-cairo/git_fixes.diff
Normal file
934
lib32-cairo/git_fixes.diff
Normal file
@ -0,0 +1,934 @@
|
||||
From e43f53bf7f3d371116f31f22ab9754b08b5abe7f Mon Sep 17 00:00:00 2001
|
||||
From: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Mon, 22 Oct 2012 12:47:11 +0000
|
||||
Subject: version: Post release bump to 1.12.7
|
||||
|
||||
---
|
||||
diff --git a/cairo-version.h b/cairo-version.h
|
||||
index dc89a19..c685909 100644
|
||||
--- a/cairo-version.h
|
||||
+++ b/cairo-version.h
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
#define CAIRO_VERSION_MAJOR 1
|
||||
#define CAIRO_VERSION_MINOR 12
|
||||
-#define CAIRO_VERSION_MICRO 6
|
||||
+#define CAIRO_VERSION_MICRO 7
|
||||
|
||||
#endif
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
||||
From 00feb8ce530a472abbde445b52d9ae8c99ec97f0 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Fri, 26 Oct 2012 09:51:31 +0000
|
||||
Subject: xlib/shm: Sanity check that the server handles XSendEvent with ShmCompletion
|
||||
|
||||
Uli Schlachter suggested it would be wiser to complement our blacklist
|
||||
of known broken X/libXext with an explicit roundtrip to check for a
|
||||
BadValue error return when we try to use XSendEvent.
|
||||
|
||||
Suggested-by: Uli Schlachter <psychon@znc.in>
|
||||
Reported-by: Martin Husemann <martin@duskware.de>
|
||||
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
---
|
||||
diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
|
||||
index ec0d334..17594b1 100644
|
||||
--- a/src/cairo-xlib-surface-shm.c
|
||||
+++ b/src/cairo-xlib-surface-shm.c
|
||||
@@ -1128,8 +1128,60 @@ _cairo_xlib_shm_surface_is_idle (cairo_surface_t *surface)
|
||||
(((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap)
|
||||
|
||||
static cairo_bool_t
|
||||
-xorg_has_buggy_send_shm_completion_event(Display *dpy)
|
||||
+has_broken_send_shm_event (cairo_xlib_display_t *display,
|
||||
+ cairo_xlib_shm_display_t *shm)
|
||||
{
|
||||
+ Display *dpy = display->display;
|
||||
+ int (*old_handler) (Display *display, XErrorEvent *event);
|
||||
+ XShmCompletionEvent ev;
|
||||
+ XShmSegmentInfo info;
|
||||
+
|
||||
+ info.shmid = shmget (IPC_PRIVATE, 0x1000, IPC_CREAT | 0600);
|
||||
+ if (info.shmid == -1)
|
||||
+ return TRUE;
|
||||
+
|
||||
+ info.readOnly = FALSE;
|
||||
+ info.shmaddr = shmat (info.shmid, NULL, 0);
|
||||
+ if (info.shmaddr == (char *) -1) {
|
||||
+ shmctl (info.shmid, IPC_RMID, NULL);
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+
|
||||
+ ev.type = shm->event;
|
||||
+ ev.drawable = shm->window;
|
||||
+ ev.major_code = shm->opcode;
|
||||
+ ev.minor_code = X_ShmPutImage;
|
||||
+
|
||||
+ ev.shmseg = info.shmid;
|
||||
+ ev.offset = 0;
|
||||
+
|
||||
+ assert (CAIRO_MUTEX_IS_LOCKED (_cairo_xlib_display_mutex));
|
||||
+ _x_error_occurred = FALSE;
|
||||
+
|
||||
+ XLockDisplay (dpy);
|
||||
+ XSync (dpy, False);
|
||||
+ old_handler = XSetErrorHandler (_check_error_handler);
|
||||
+
|
||||
+ XShmAttach (dpy, &info);
|
||||
+ XSendEvent (dpy, ev.drawable, False, 0, (XEvent *)&ev);
|
||||
+ XShmDetach (dpy, &info);
|
||||
+
|
||||
+ XSync (dpy, False);
|
||||
+ XSetErrorHandler (old_handler);
|
||||
+ XUnlockDisplay (dpy);
|
||||
+
|
||||
+ shmctl (info.shmid, IPC_RMID, NULL);
|
||||
+ shmdt (info.shmaddr);
|
||||
+
|
||||
+ return _x_error_occurred;
|
||||
+}
|
||||
+
|
||||
+static cairo_bool_t
|
||||
+xorg_has_buggy_send_shm_completion_event(cairo_xlib_display_t *display,
|
||||
+ cairo_xlib_shm_display_t *shm)
|
||||
+{
|
||||
+ Display *dpy = display->display;
|
||||
+
|
||||
/* As libXext sets the SEND_EVENT bit in the ShmCompletionEvent,
|
||||
* the Xserver may crash if it does not take care when processing
|
||||
* the event type. For instance versions of Xorg prior to 1.11.1
|
||||
@@ -1141,8 +1193,12 @@ xorg_has_buggy_send_shm_completion_event(Display *dpy)
|
||||
*
|
||||
* Remove the SendEvent bit (0x80) before doing range checks on event type.
|
||||
*/
|
||||
- return (strstr (ServerVendor (dpy), "X.Org") != NULL &&
|
||||
- VendorRelease (dpy) < XORG_VERSION_ENCODE(1,11,0,1));
|
||||
+ if (strstr (ServerVendor (dpy), "X.Org") != NULL &&
|
||||
+ VendorRelease (dpy) < XORG_VERSION_ENCODE(1,11,0,1))
|
||||
+ return TRUE;
|
||||
+
|
||||
+ /* For everyone else check that no error is generated */
|
||||
+ return has_broken_send_shm_event (display, shm);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1162,6 +1218,15 @@ _cairo_xlib_display_init_shm (cairo_xlib_display_t *display)
|
||||
if (unlikely (shm == NULL))
|
||||
return;
|
||||
|
||||
+ codes = XInitExtension (display->display, SHMNAME);
|
||||
+ if (codes == NULL) {
|
||||
+ free (shm);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ shm->opcode = codes ->major_opcode;
|
||||
+ shm->event = codes->first_event;
|
||||
+
|
||||
if (unlikely (_pqueue_init (&shm->info))) {
|
||||
free (shm);
|
||||
return;
|
||||
@@ -1177,16 +1242,12 @@ _cairo_xlib_display_init_shm (cairo_xlib_display_t *display)
|
||||
DefaultVisual (display->display, scr),
|
||||
CWOverrideRedirect, &attr);
|
||||
|
||||
- if (xorg_has_buggy_send_shm_completion_event(display->display))
|
||||
+ if (xorg_has_buggy_send_shm_completion_event(display, shm))
|
||||
has_pixmap = 0;
|
||||
|
||||
shm->has_pixmaps = has_pixmap ? MIN_PIXMAP_SIZE : 0;
|
||||
cairo_list_init (&shm->pool);
|
||||
|
||||
- codes = XInitExtension (display->display, SHMNAME);
|
||||
- shm->opcode = codes ->major_opcode;
|
||||
- shm->event = codes->first_event;
|
||||
-
|
||||
cairo_list_init (&shm->surfaces);
|
||||
|
||||
display->shm = shm;
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
||||
From fdd2082f923012a1354be7086d03f78fb166695b Mon Sep 17 00:00:00 2001
|
||||
From: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Fri, 26 Oct 2012 09:51:31 +0000
|
||||
Subject: xlib: Check for both X.org and Xorg ServerVendors
|
||||
|
||||
Martin Husemann reported that on his NetBSD machine the vendor was being
|
||||
reported as "The Xorg Foundation", a non-conformist separatist split of
|
||||
the Peoples' Liberation Army^W^W^W "The X.Org Foundation". Simply check
|
||||
for both during initialisation.
|
||||
|
||||
Reported-by: Martin Husemann <martin@duskware.de>
|
||||
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
---
|
||||
diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c
|
||||
index 67c0673..04c89b2 100644
|
||||
--- a/src/cairo-xlib-display.c
|
||||
+++ b/src/cairo-xlib-display.c
|
||||
@@ -315,7 +315,7 @@ _cairo_xlib_device_create (Display *dpy)
|
||||
* safest to just blacklist all old-versioning-scheme X servers,
|
||||
* (just using VendorRelease < 70000000), as buggy_repeat=TRUE.
|
||||
*/
|
||||
- if (strstr (ServerVendor (dpy), "X.Org") != NULL) {
|
||||
+ if (_cairo_xlib_vendor_is_xorg (dpy)) {
|
||||
if (VendorRelease (dpy) >= 60700000) {
|
||||
if (VendorRelease (dpy) < 70000000)
|
||||
display->buggy_repeat = TRUE;
|
||||
diff --git a/src/cairo-xlib-private.h b/src/cairo-xlib-private.h
|
||||
index d2bd588..c328302 100644
|
||||
--- a/src/cairo-xlib-private.h
|
||||
+++ b/src/cairo-xlib-private.h
|
||||
@@ -216,6 +216,13 @@ struct _cairo_xlib_proxy {
|
||||
cairo_surface_t *owner;
|
||||
};
|
||||
|
||||
+inline static cairo_bool_t
|
||||
+_cairo_xlib_vendor_is_xorg (Display *dpy)
|
||||
+{
|
||||
+ const char *const vendor = ServerVendor (dpy);
|
||||
+ return strstr (vendor, "X.Org") || strstr (vendor, "Xorg");
|
||||
+}
|
||||
+
|
||||
cairo_private cairo_status_t
|
||||
_cairo_xlib_surface_get_gc (cairo_xlib_display_t *display,
|
||||
cairo_xlib_surface_t *surface,
|
||||
diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
|
||||
index 17594b1..89f51a9 100644
|
||||
--- a/src/cairo-xlib-surface-shm.c
|
||||
+++ b/src/cairo-xlib-surface-shm.c
|
||||
@@ -1193,7 +1193,7 @@ xorg_has_buggy_send_shm_completion_event(cairo_xlib_display_t *display,
|
||||
*
|
||||
* Remove the SendEvent bit (0x80) before doing range checks on event type.
|
||||
*/
|
||||
- if (strstr (ServerVendor (dpy), "X.Org") != NULL &&
|
||||
+ if (_cairo_xlib_vendor_is_xorg (dpy) &&
|
||||
VendorRelease (dpy) < XORG_VERSION_ENCODE(1,11,0,1))
|
||||
return TRUE;
|
||||
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
||||
From d57e652f08f5ff7c334d01bc071962e6a131928f Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Johnson <ajohnson@redneon.com>
|
||||
Date: Fri, 26 Oct 2012 12:30:01 +0000
|
||||
Subject: type1-subset: parse all operators
|
||||
|
||||
The PDF at bug 56265 contained a Type 1 font that used the "div"
|
||||
operator to compute the glyph width. As the "div" operator was
|
||||
not handled by the charstring parser this resulted in an incorrect
|
||||
glyph width in the PDF output.
|
||||
|
||||
Fix this by upgrading the charstring parsing to handle all Type 1
|
||||
operators.
|
||||
---
|
||||
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
|
||||
index 1bdb12b..c7f613a 100644
|
||||
--- a/src/cairo-type1-subset.c
|
||||
+++ b/src/cairo-type1-subset.c
|
||||
@@ -137,13 +137,10 @@ typedef struct _cairo_type1_font_subset {
|
||||
int hex_column;
|
||||
|
||||
struct {
|
||||
- int stack[TYPE1_STACKSIZE], sp, top_value;
|
||||
+ double stack[TYPE1_STACKSIZE];
|
||||
+ int sp;
|
||||
} build_stack;
|
||||
|
||||
- struct {
|
||||
- int other_subr_args[TYPE1_STACKSIZE], num_other_subr_args, cur_other_subr_arg;
|
||||
- } ps_stack;
|
||||
-
|
||||
|
||||
} cairo_type1_font_subset_t;
|
||||
|
||||
@@ -742,15 +739,33 @@ use_standard_encoding_glyph (cairo_type1_font_subset_t *font, int index)
|
||||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
}
|
||||
|
||||
-#define TYPE1_CHARSTRING_COMMAND_ESCAPE 0x0c
|
||||
-#define TYPE1_CHARSTRING_COMMAND_SEAC 0x0c06
|
||||
-#define TYPE1_CHARSTRING_COMMAND_SBW 0x0c07
|
||||
-#define TYPE1_CHARSTRING_COMMAND_HSBW 0x0d
|
||||
-#define TYPE1_CHARSTRING_COMMAND_CALLSUBR 0x0a
|
||||
-#define TYPE1_CHARSTRING_COMMAND_CALLOTHERSUBR 0x0c10
|
||||
-#define TYPE1_CHARSTRING_COMMAND_POP 0x0c11
|
||||
-
|
||||
|
||||
+#define TYPE1_CHARSTRING_COMMAND_HSTEM 0x01
|
||||
+#define TYPE1_CHARSTRING_COMMAND_VSTEM 0x03
|
||||
+#define TYPE1_CHARSTRING_COMMAND_VMOVETO 0x04
|
||||
+#define TYPE1_CHARSTRING_COMMAND_RLINETO 0x05
|
||||
+#define TYPE1_CHARSTRING_COMMAND_HLINETO 0x06
|
||||
+#define TYPE1_CHARSTRING_COMMAND_VLINETO 0x07
|
||||
+#define TYPE1_CHARSTRING_COMMAND_RRCURVETO 0x08
|
||||
+#define TYPE1_CHARSTRING_COMMAND_CLOSEPATH 0x09
|
||||
+#define TYPE1_CHARSTRING_COMMAND_CALLSUBR 0x0a
|
||||
+#define TYPE1_CHARSTRING_COMMAND_RETURN 0x0b
|
||||
+#define TYPE1_CHARSTRING_COMMAND_ESCAPE 0x0c
|
||||
+#define TYPE1_CHARSTRING_COMMAND_HSBW 0x0d
|
||||
+#define TYPE1_CHARSTRING_COMMAND_ENDCHAR 0x0e
|
||||
+#define TYPE1_CHARSTRING_COMMAND_RMOVETO 0x15
|
||||
+#define TYPE1_CHARSTRING_COMMAND_HMOVETO 0x16
|
||||
+#define TYPE1_CHARSTRING_COMMAND_VHCURVETO 0x1e
|
||||
+#define TYPE1_CHARSTRING_COMMAND_HVCURVETO 0x1f
|
||||
+#define TYPE1_CHARSTRING_COMMAND_DOTSECTION 0x0c00
|
||||
+#define TYPE1_CHARSTRING_COMMAND_VSTEM3 0x0c01
|
||||
+#define TYPE1_CHARSTRING_COMMAND_HSTEM3 0x0c02
|
||||
+#define TYPE1_CHARSTRING_COMMAND_SEAC 0x0c06
|
||||
+#define TYPE1_CHARSTRING_COMMAND_SBW 0x0c07
|
||||
+#define TYPE1_CHARSTRING_COMMAND_DIV 0x0c0c
|
||||
+#define TYPE1_CHARSTRING_COMMAND_CALLOTHERSUBR 0x0c10
|
||||
+#define TYPE1_CHARSTRING_COMMAND_POP 0x0c11
|
||||
+#define TYPE1_CHARSTRING_COMMAND_SETCURRENTPOINT 0x0c21
|
||||
|
||||
/* Get glyph width and look for seac operatorParse charstring */
|
||||
static cairo_status_t
|
||||
@@ -765,7 +780,6 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
|
||||
const unsigned char *p;
|
||||
cairo_bool_t last_op_was_integer;
|
||||
int command;
|
||||
- int subr_num, i;
|
||||
|
||||
charstring = malloc (encrypted_charstring_length);
|
||||
if (unlikely (charstring == NULL))
|
||||
@@ -785,37 +799,60 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
|
||||
if (*p < 32) {
|
||||
command = *p++;
|
||||
switch (command) {
|
||||
- case TYPE1_CHARSTRING_COMMAND_HSBW:
|
||||
- if (! last_op_was_integer)
|
||||
- return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
-
|
||||
- font->glyphs[glyph].width = font->build_stack.stack[1]/font->base.units_per_em;
|
||||
+ case TYPE1_CHARSTRING_COMMAND_HSTEM:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_VSTEM:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_VMOVETO:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_RLINETO:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_HLINETO:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_VLINETO:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_RRCURVETO:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_CLOSEPATH:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_RMOVETO:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_HMOVETO:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_VHCURVETO:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_HVCURVETO:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_RETURN:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_ENDCHAR:
|
||||
+ default:
|
||||
font->build_stack.sp = 0;
|
||||
- last_op_was_integer = FALSE;
|
||||
break;
|
||||
|
||||
case TYPE1_CHARSTRING_COMMAND_CALLSUBR:
|
||||
- if (font->subset_subrs &&
|
||||
- last_op_was_integer &&
|
||||
- font->build_stack.top_value >= 0 &&
|
||||
- font->build_stack.top_value < font->num_subrs)
|
||||
- {
|
||||
- subr_num = font->build_stack.top_value;
|
||||
- font->build_stack.sp--;
|
||||
- font->subrs[subr_num].used = TRUE;
|
||||
- last_op_was_integer = FALSE;
|
||||
- status = cairo_type1_font_subset_parse_charstring (font,
|
||||
- glyph,
|
||||
- font->subrs[subr_num].subr_string,
|
||||
- font->subrs[subr_num].subr_length);
|
||||
- } else {
|
||||
- font->subset_subrs = FALSE;
|
||||
+ if (font->subset_subrs && font->build_stack.sp > 0) {
|
||||
+ int subr_num = font->build_stack.stack[--font->build_stack.sp];
|
||||
+ if (subr_num >= 0 && subr_num < font->num_subrs) {
|
||||
+ font->subrs[subr_num].used = TRUE;
|
||||
+ status = cairo_type1_font_subset_parse_charstring (
|
||||
+ font,
|
||||
+ glyph,
|
||||
+ font->subrs[subr_num].subr_string,
|
||||
+ font->subrs[subr_num].subr_length);
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
+ font->subset_subrs = FALSE;
|
||||
+ break;
|
||||
+
|
||||
+ case TYPE1_CHARSTRING_COMMAND_HSBW:
|
||||
+ if (font->build_stack.sp < 2)
|
||||
+ return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
+
|
||||
+ font->glyphs[glyph].width = font->build_stack.stack[1]/font->base.units_per_em;
|
||||
+ font->build_stack.sp = 0;
|
||||
break;
|
||||
|
||||
case TYPE1_CHARSTRING_COMMAND_ESCAPE:
|
||||
command = command << 8 | *p++;
|
||||
switch (command) {
|
||||
+ case TYPE1_CHARSTRING_COMMAND_DOTSECTION:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_VSTEM3:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_HSTEM3:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_SETCURRENTPOINT:
|
||||
+ case TYPE1_CHARSTRING_COMMAND_CALLOTHERSUBR:
|
||||
+ default:
|
||||
+ font->build_stack.sp = 0;
|
||||
+ break;
|
||||
+
|
||||
case TYPE1_CHARSTRING_COMMAND_SEAC:
|
||||
/* The seac command takes five integer arguments. The
|
||||
* last two are glyph indices into the PS standard
|
||||
@@ -823,6 +860,9 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
|
||||
* glyph is composed from. All we need to do is to
|
||||
* make sure those glyphs are present in the subset
|
||||
* under their standard names. */
|
||||
+ if (font->build_stack.sp < 5)
|
||||
+ return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
+
|
||||
status = use_standard_encoding_glyph (font, font->build_stack.stack[3]);
|
||||
if (unlikely (status))
|
||||
return status;
|
||||
@@ -832,55 +872,49 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
|
||||
return status;
|
||||
|
||||
font->build_stack.sp = 0;
|
||||
- last_op_was_integer = FALSE;
|
||||
break;
|
||||
|
||||
case TYPE1_CHARSTRING_COMMAND_SBW:
|
||||
- if (! last_op_was_integer)
|
||||
+ if (font->build_stack.sp < 4)
|
||||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
|
||||
font->glyphs[glyph].width = font->build_stack.stack[2]/font->base.units_per_em;
|
||||
font->build_stack.sp = 0;
|
||||
- last_op_was_integer = FALSE;
|
||||
- break;
|
||||
-
|
||||
- case TYPE1_CHARSTRING_COMMAND_CALLOTHERSUBR:
|
||||
- for (i = 0; i < font->build_stack.sp; i++)
|
||||
- font->ps_stack.other_subr_args[i] = font->build_stack.stack[i];
|
||||
- font->ps_stack.num_other_subr_args = font->build_stack.sp;
|
||||
- font->ps_stack.cur_other_subr_arg = 0;
|
||||
- font->build_stack.sp = 0;
|
||||
- last_op_was_integer = FALSE;
|
||||
break;
|
||||
|
||||
- case TYPE1_CHARSTRING_COMMAND_POP:
|
||||
- if (font->ps_stack.num_other_subr_args > font->ps_stack.cur_other_subr_arg) {
|
||||
- font->build_stack.top_value = font->ps_stack.other_subr_args[font->ps_stack.cur_other_subr_arg++];
|
||||
- last_op_was_integer = TRUE;
|
||||
+ case TYPE1_CHARSTRING_COMMAND_DIV:
|
||||
+ if (font->build_stack.sp < 2) {
|
||||
+ return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
} else {
|
||||
- font->subset_subrs = FALSE;
|
||||
+ double num1 = font->build_stack.stack[font->build_stack.sp - 2];
|
||||
+ double num2 = font->build_stack.stack[font->build_stack.sp - 1];
|
||||
+ font->build_stack.sp--;
|
||||
+ if (num2 == 0.0)
|
||||
+ return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
+
|
||||
+ font->build_stack.stack[font->build_stack.sp - 1] = num1/num2;
|
||||
}
|
||||
break;
|
||||
|
||||
- default:
|
||||
- font->build_stack.sp = 0;
|
||||
- last_op_was_integer = FALSE;
|
||||
+ case TYPE1_CHARSTRING_COMMAND_POP:
|
||||
+ if (font->build_stack.sp < TYPE1_STACKSIZE) {
|
||||
+ /* use negative number to prevent it being used as a subr_num */
|
||||
+ font->build_stack.stack[font->build_stack.sp++] = -1.0;
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
break;
|
||||
-
|
||||
- default:
|
||||
- font->build_stack.sp = 0;
|
||||
- last_op_was_integer = FALSE;
|
||||
- break;
|
||||
}
|
||||
- } else {
|
||||
+ } else {
|
||||
/* integer argument */
|
||||
- p = cairo_type1_font_subset_decode_integer (p, &font->build_stack.top_value);
|
||||
- last_op_was_integer = TRUE;
|
||||
- if (font->build_stack.sp < TYPE1_STACKSIZE)
|
||||
- font->build_stack.stack[font->build_stack.sp++] = font->build_stack.top_value;
|
||||
- }
|
||||
+ if (font->build_stack.sp < TYPE1_STACKSIZE) {
|
||||
+ int val;
|
||||
+ p = cairo_type1_font_subset_decode_integer (p, &val);
|
||||
+ font->build_stack.stack[font->build_stack.sp++] = val;
|
||||
+ } else {
|
||||
+ return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
free (charstring);
|
||||
@@ -1321,7 +1355,6 @@ skip_subrs:
|
||||
for (j = 0; j < font->num_glyphs; j++) {
|
||||
glyph = font->subset_index_to_glyphs[j];
|
||||
font->build_stack.sp = 0;
|
||||
- font->ps_stack.num_other_subr_args = 0;
|
||||
status = cairo_type1_font_subset_parse_charstring (font,
|
||||
glyph,
|
||||
font->glyphs[glyph].encrypted_charstring,
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
||||
From f18199fcfb3b052c198041fc05156ae3d9e6aee7 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Sun, 28 Oct 2012 10:04:12 +0000
|
||||
Subject: xlib/shm: Check for XShm headers
|
||||
|
||||
Not all version of libXext ship the same set of headers, so play safe
|
||||
and check during configure that we have the headers we depend upon in
|
||||
the code.
|
||||
|
||||
Reported-by: Sebastian Haas <sehaas@gmail.com>
|
||||
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
---
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7adbeb1..021ec8e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -105,6 +105,10 @@ CAIRO_ENABLE_SURFACE_BACKEND(xlib, Xlib, auto, [
|
||||
AC_MSG_RESULT(no),
|
||||
AC_MSG_RESULT(assuming no))
|
||||
fi
|
||||
+
|
||||
+ AC_CHECK_HEADERS([X11/extensions/XShm.h X11/extensions/shmproto.h], [], [],
|
||||
+ [#include <X11/Xlibint.h>
|
||||
+ #include <X11/Xproto.h>])
|
||||
])
|
||||
|
||||
CAIRO_ENABLE_SURFACE_BACKEND(xlib_xrender, Xlib Xrender, auto, [
|
||||
diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
|
||||
index 89f51a9..a3d4385 100644
|
||||
--- a/src/cairo-xlib-surface-shm.c
|
||||
+++ b/src/cairo-xlib-surface-shm.c
|
||||
@@ -41,12 +41,105 @@
|
||||
|
||||
#include "cairo-xlib-private.h"
|
||||
#include "cairo-xlib-surface-private.h"
|
||||
-#include "cairo-image-surface-private.h"
|
||||
-#include "cairo-mempool-private.h"
|
||||
+
|
||||
+#if !HAVE_X11_EXTENSIONS_XSHM_H || !HAVE_X11_EXTENSIONS_SHMPROTO_H
|
||||
+void _cairo_xlib_display_init_shm (cairo_xlib_display_t *display) {}
|
||||
+
|
||||
+cairo_surface_t *
|
||||
+_cairo_xlib_surface_get_shm (cairo_xlib_surface_t *surface,
|
||||
+ cairo_bool_t overwrite)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+cairo_int_status_t
|
||||
+_cairo_xlib_surface_put_shm (cairo_xlib_surface_t *surface)
|
||||
+{
|
||||
+ ASSERT_NOT_REACHED;
|
||||
+ return CAIRO_INT_STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+cairo_surface_t *
|
||||
+_cairo_xlib_surface_create_shm (cairo_xlib_surface_t *other,
|
||||
+ pixman_format_code_t format,
|
||||
+ int width, int height)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+cairo_surface_t *
|
||||
+_cairo_xlib_surface_create_shm__image (cairo_xlib_surface_t *surface,
|
||||
+ pixman_format_code_t format,
|
||||
+ int width, int height)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+cairo_surface_t *
|
||||
+_cairo_xlib_surface_create_similar_shm (void *other,
|
||||
+ cairo_format_t format,
|
||||
+ int width, int height)
|
||||
+{
|
||||
+ return cairo_image_surface_create (format, width, height);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+_cairo_xlib_shm_surface_mark_active (cairo_surface_t *_shm)
|
||||
+{
|
||||
+ ASSERT_NOT_REACHED;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+_cairo_xlib_shm_surface_get_ximage (cairo_surface_t *surface,
|
||||
+ XImage *ximage)
|
||||
+{
|
||||
+ ASSERT_NOT_REACHED;
|
||||
+}
|
||||
+
|
||||
+void *
|
||||
+_cairo_xlib_shm_surface_get_obdata (cairo_surface_t *surface)
|
||||
+{
|
||||
+ ASSERT_NOT_REACHED;
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+Pixmap
|
||||
+_cairo_xlib_shm_surface_get_pixmap (cairo_surface_t *surface)
|
||||
+{
|
||||
+ ASSERT_NOT_REACHED;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+XRenderPictFormat *
|
||||
+_cairo_xlib_shm_surface_get_xrender_format (cairo_surface_t *surface)
|
||||
+{
|
||||
+ ASSERT_NOT_REACHED;
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+cairo_bool_t
|
||||
+_cairo_xlib_shm_surface_is_active (cairo_surface_t *surface)
|
||||
+{
|
||||
+ ASSERT_NOT_REACHED;
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+cairo_bool_t
|
||||
+_cairo_xlib_shm_surface_is_idle (cairo_surface_t *surface)
|
||||
+{
|
||||
+ ASSERT_NOT_REACHED;
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+void _cairo_xlib_display_fini_shm (cairo_xlib_display_t *display) {}
|
||||
+
|
||||
+#else
|
||||
|
||||
#include "cairo-damage-private.h"
|
||||
#include "cairo-default-context-private.h"
|
||||
+#include "cairo-image-surface-private.h"
|
||||
#include "cairo-list-inline.h"
|
||||
+#include "cairo-mempool-private.h"
|
||||
|
||||
#include <X11/Xlibint.h>
|
||||
#include <X11/Xproto.h>
|
||||
@@ -1281,5 +1374,5 @@ _cairo_xlib_display_fini_shm (cairo_xlib_display_t *display)
|
||||
free (shm);
|
||||
display->shm = NULL;
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
#endif
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
||||
From 0e2458697848cf8c89c9d57fa9b64f0ea7bd0877 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Sun, 28 Oct 2012 10:08:39 +0000
|
||||
Subject: xlib/shm: Use shmstr.h instead of shmproto.h if available
|
||||
|
||||
Before it was known as shmproto.h, the wire protocol definition was to
|
||||
be found in shmstr.h, so if we don't have the current version of libXext
|
||||
try to use the older includes.
|
||||
|
||||
Reported-by: Sebastian Haas <sehaas@gmail.com>
|
||||
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
---
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 021ec8e..f523284 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -106,7 +106,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(xlib, Xlib, auto, [
|
||||
AC_MSG_RESULT(assuming no))
|
||||
fi
|
||||
|
||||
- AC_CHECK_HEADERS([X11/extensions/XShm.h X11/extensions/shmproto.h], [], [],
|
||||
+ AC_CHECK_HEADERS([X11/extensions/XShm.h X11/extensions/shmproto.h X11/extensions/shmstr.h], [], [],
|
||||
[#include <X11/Xlibint.h>
|
||||
#include <X11/Xproto.h>])
|
||||
])
|
||||
diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
|
||||
index a3d4385..44e6284 100644
|
||||
--- a/src/cairo-xlib-surface-shm.c
|
||||
+++ b/src/cairo-xlib-surface-shm.c
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "cairo-xlib-private.h"
|
||||
#include "cairo-xlib-surface-private.h"
|
||||
|
||||
-#if !HAVE_X11_EXTENSIONS_XSHM_H || !HAVE_X11_EXTENSIONS_SHMPROTO_H
|
||||
+#if !HAVE_X11_EXTENSIONS_XSHM_H || !(HAVE_X11_EXTENSIONS_SHMPROTO_H || HAVE_X11_EXTENSIONS_SHMSTR_H)
|
||||
void _cairo_xlib_display_init_shm (cairo_xlib_display_t *display) {}
|
||||
|
||||
cairo_surface_t *
|
||||
@@ -144,7 +144,11 @@ void _cairo_xlib_display_fini_shm (cairo_xlib_display_t *display) {}
|
||||
#include <X11/Xlibint.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/XShm.h>
|
||||
+#if HAVE_X11_EXTENSIONS_SHMPROTO_H
|
||||
#include <X11/extensions/shmproto.h>
|
||||
+#elif HAVE_X11_EXTENSIONS_SHMSTR_H
|
||||
+#include <X11/extensions/shmstr.h>
|
||||
+#endif
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
||||
From 5a6e1d680a5bf1c4091e74f999abd611abd92334 Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Johnson <ajohnson@redneon.com>
|
||||
Date: Sun, 28 Oct 2012 10:28:52 +0000
|
||||
Subject: type1-subset: restore correct callothersub behavior
|
||||
|
||||
that was removed in d57e652f. Without this subsetting of subroutines
|
||||
won't work for some fonts.
|
||||
---
|
||||
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
|
||||
index c7f613a..786055a 100644
|
||||
--- a/src/cairo-type1-subset.c
|
||||
+++ b/src/cairo-type1-subset.c
|
||||
@@ -141,6 +141,11 @@ typedef struct _cairo_type1_font_subset {
|
||||
int sp;
|
||||
} build_stack;
|
||||
|
||||
+ struct {
|
||||
+ int stack[TYPE1_STACKSIZE];
|
||||
+ int sp;
|
||||
+ } ps_stack;
|
||||
+
|
||||
|
||||
} cairo_type1_font_subset_t;
|
||||
|
||||
@@ -767,7 +772,9 @@ use_standard_encoding_glyph (cairo_type1_font_subset_t *font, int index)
|
||||
#define TYPE1_CHARSTRING_COMMAND_POP 0x0c11
|
||||
#define TYPE1_CHARSTRING_COMMAND_SETCURRENTPOINT 0x0c21
|
||||
|
||||
-/* Get glyph width and look for seac operatorParse charstring */
|
||||
+/* Parse the charstring, including recursing into subroutines. Find
|
||||
+ * the glyph width, subroutines called, and glyphs required by the
|
||||
+ * SEAC operator. */
|
||||
static cairo_status_t
|
||||
cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
|
||||
int glyph,
|
||||
@@ -814,6 +821,7 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
|
||||
case TYPE1_CHARSTRING_COMMAND_RETURN:
|
||||
case TYPE1_CHARSTRING_COMMAND_ENDCHAR:
|
||||
default:
|
||||
+ /* stack clearing operator */
|
||||
font->build_stack.sp = 0;
|
||||
break;
|
||||
|
||||
@@ -848,8 +856,8 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
|
||||
case TYPE1_CHARSTRING_COMMAND_VSTEM3:
|
||||
case TYPE1_CHARSTRING_COMMAND_HSTEM3:
|
||||
case TYPE1_CHARSTRING_COMMAND_SETCURRENTPOINT:
|
||||
- case TYPE1_CHARSTRING_COMMAND_CALLOTHERSUBR:
|
||||
default:
|
||||
+ /* stack clearing operator */
|
||||
font->build_stack.sp = 0;
|
||||
break;
|
||||
|
||||
@@ -896,11 +904,25 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
|
||||
}
|
||||
break;
|
||||
|
||||
+ case TYPE1_CHARSTRING_COMMAND_CALLOTHERSUBR:
|
||||
+ if (font->build_stack.sp < 1)
|
||||
+ return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
+
|
||||
+ font->build_stack.sp--;
|
||||
+ font->ps_stack.sp = 0;
|
||||
+ while (font->build_stack.sp)
|
||||
+ font->ps_stack.stack[font->ps_stack.sp++] = font->build_stack.stack[--font->build_stack.sp];
|
||||
+
|
||||
+ break;
|
||||
+
|
||||
case TYPE1_CHARSTRING_COMMAND_POP:
|
||||
- if (font->build_stack.sp < TYPE1_STACKSIZE) {
|
||||
- /* use negative number to prevent it being used as a subr_num */
|
||||
- font->build_stack.stack[font->build_stack.sp++] = -1.0;
|
||||
- }
|
||||
+ if (font->ps_stack.sp < 1)
|
||||
+ return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
+
|
||||
+ /* T1 spec states that if the interpreter does not
|
||||
+ * support executing the callothersub, the results
|
||||
+ * must be taken from the callothersub arguments. */
|
||||
+ font->build_stack.stack[font->build_stack.sp++] = font->ps_stack.stack[--font->ps_stack.sp];
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -1355,6 +1377,7 @@ skip_subrs:
|
||||
for (j = 0; j < font->num_glyphs; j++) {
|
||||
glyph = font->subset_index_to_glyphs[j];
|
||||
font->build_stack.sp = 0;
|
||||
+ font->ps_stack.sp = 0;
|
||||
status = cairo_type1_font_subset_parse_charstring (font,
|
||||
glyph,
|
||||
font->glyphs[glyph].encrypted_charstring,
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
||||
From 0c800dc3f64ee030df1cd0a6a1dcd6df71502dea Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Johnson <ajohnson@redneon.com>
|
||||
Date: Tue, 30 Oct 2012 08:53:30 +0000
|
||||
Subject: type1-subset: ensure subroutine numnber is an integer
|
||||
|
||||
---
|
||||
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
|
||||
index 786055a..dff4a95 100644
|
||||
--- a/src/cairo-type1-subset.c
|
||||
+++ b/src/cairo-type1-subset.c
|
||||
@@ -827,15 +827,18 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
|
||||
|
||||
case TYPE1_CHARSTRING_COMMAND_CALLSUBR:
|
||||
if (font->subset_subrs && font->build_stack.sp > 0) {
|
||||
- int subr_num = font->build_stack.stack[--font->build_stack.sp];
|
||||
- if (subr_num >= 0 && subr_num < font->num_subrs) {
|
||||
- font->subrs[subr_num].used = TRUE;
|
||||
- status = cairo_type1_font_subset_parse_charstring (
|
||||
- font,
|
||||
- glyph,
|
||||
- font->subrs[subr_num].subr_string,
|
||||
- font->subrs[subr_num].subr_length);
|
||||
- break;
|
||||
+ double int_val;
|
||||
+ if (modf(font->build_stack.stack[--font->build_stack.sp], &int_val) == 0.0) {
|
||||
+ int subr_num = int_val;
|
||||
+ if (subr_num >= 0 && subr_num < font->num_subrs) {
|
||||
+ font->subrs[subr_num].used = TRUE;
|
||||
+ status = cairo_type1_font_subset_parse_charstring (
|
||||
+ font,
|
||||
+ glyph,
|
||||
+ font->subrs[subr_num].subr_string,
|
||||
+ font->subrs[subr_num].subr_length);
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
font->subset_subrs = FALSE;
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
||||
From 65176b7380f0d633da514be1febe16f17b99d876 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Tardif <kiyoka@gmail.com>
|
||||
Date: Tue, 30 Oct 2012 04:27:27 +0000
|
||||
Subject: type1-subset, cff-subset: Plugged 2 memory leaks
|
||||
|
||||
- _cairo_type1_font_subset_fini doesn't free font->cleartext
|
||||
- _cairo_cff_font_create can exit without freeing font->font_name and/or
|
||||
font->data; _cairo_cff_font_load_opentype_cff is called to allocate
|
||||
font_name, then _cairo_cff_font_load_cff is called to allocate
|
||||
font->data, then _cairo_cff_font_load_cff's return status is checked
|
||||
and if it failed, it jumps to fail1. This can cause font_name to leak
|
||||
since the fail1 target only frees the font variable. In addition,
|
||||
_cairo_cff_font_load_cff can fail -after- allocating data, and then
|
||||
data won't be freed either.
|
||||
|
||||
Bug 56566
|
||||
---
|
||||
diff --git a/src/cairo-cff-subset.c b/src/cairo-cff-subset.c
|
||||
index e3040fc..bd8d5b5 100644
|
||||
--- a/src/cairo-cff-subset.c
|
||||
+++ b/src/cairo-cff-subset.c
|
||||
@@ -2787,7 +2787,7 @@ _cairo_cff_font_create (cairo_scaled_font_subset_t *scaled_font_subset,
|
||||
if (backend->is_synthetic && backend->is_synthetic (scaled_font_subset->scaled_font))
|
||||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
|
||||
- font = malloc (sizeof (cairo_cff_font_t));
|
||||
+ font = calloc (1, sizeof (cairo_cff_font_t));
|
||||
if (unlikely (font == NULL))
|
||||
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
|
||||
@@ -2862,11 +2862,11 @@ fail4:
|
||||
fail3:
|
||||
free (font->subset_font_name);
|
||||
fail2:
|
||||
- free (font->data);
|
||||
- free (font->font_name);
|
||||
free (font->ps_name);
|
||||
_cairo_array_fini (&font->output);
|
||||
fail1:
|
||||
+ free (font->data);
|
||||
+ free (font->font_name);
|
||||
free (font);
|
||||
|
||||
return status;
|
||||
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
|
||||
index dff4a95..2ec56f1 100644
|
||||
--- a/src/cairo-type1-subset.c
|
||||
+++ b/src/cairo-type1-subset.c
|
||||
@@ -1670,6 +1670,8 @@ _cairo_type1_font_subset_fini (cairo_type1_font_subset_t *font)
|
||||
|
||||
free (font->subset_index_to_glyphs);
|
||||
|
||||
+ free (font->cleartext);
|
||||
+
|
||||
return status;
|
||||
}
|
||||
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
||||
From 66625cb46c985321c46b79d2163a4d676d6700ba Mon Sep 17 00:00:00 2001
|
||||
From: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Tue, 30 Oct 2012 12:40:41 +0000
|
||||
Subject: xlib: Apply the image offsets to the destination rather the source
|
||||
|
||||
So that we can specify the entire source surface as the region to copy
|
||||
and not introduce clipping errors.
|
||||
|
||||
Fixes regression from
|
||||
commit c068691ff57c2f6cd750a54db17393c0e132cb00
|
||||
Author: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Fri Aug 17 21:33:54 2012 +0100
|
||||
|
||||
xlib/shm: Use an impromptu upload ShmSegment
|
||||
|
||||
Reported-by: John Lindgren <john.lindgren@aol.com>
|
||||
Reported-by: Kalev Lember <kalevlember@gmail.com>
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56547
|
||||
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
---
|
||||
diff --git a/src/cairo-xlib-render-compositor.c b/src/cairo-xlib-render-compositor.c
|
||||
index e325382..74c43e9 100644
|
||||
--- a/src/cairo-xlib-render-compositor.c
|
||||
+++ b/src/cairo-xlib-render-compositor.c
|
||||
@@ -179,22 +179,19 @@ copy_image_boxes (void *_dst,
|
||||
int x2 = _cairo_fixed_integer_part (chunk->base[i].p2.x);
|
||||
int y2 = _cairo_fixed_integer_part (chunk->base[i].p2.y);
|
||||
|
||||
- rects[j].x = x1;
|
||||
- rects[j].y = y1;
|
||||
- rects[j].width = x2 - x1;
|
||||
- rects[j].height = y2 - y1;
|
||||
- j++;
|
||||
+ if (x2 > x1 && y2 > y1) {
|
||||
+ rects[j].x = x1;
|
||||
+ rects[j].y = y1;
|
||||
+ rects[j].width = x2 - x1;
|
||||
+ rects[j].height = y2 - y1;
|
||||
+ j++;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
- assert (j == boxes->num_boxes);
|
||||
|
||||
XSetClipRectangles (dst->dpy, gc, 0, 0, rects, j, Unsorted);
|
||||
-
|
||||
XCopyArea (dst->dpy, src, dst->drawable, gc,
|
||||
- dx, dy,
|
||||
- image->width, image->height,
|
||||
- 0, 0);
|
||||
-
|
||||
+ 0, 0, image->width, image->height, -dx, -dy);
|
||||
XSetClipMask (dst->dpy, gc, None);
|
||||
|
||||
if (rects != stack_rects)
|
||||
@@ -337,7 +334,8 @@ draw_image_boxes (void *_dst,
|
||||
|
||||
if (_cairo_xlib_shm_surface_get_pixmap (&image->base)) {
|
||||
status = copy_image_boxes (dst, image, boxes, dx, dy);
|
||||
- goto out;
|
||||
+ if (status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
+ goto out;
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
@ -5,20 +5,21 @@
|
||||
|
||||
_pkgsourcename=catalyst-utils
|
||||
pkgname=lib32-$_pkgsourcename
|
||||
pkgver=12.8
|
||||
pkgrel=1
|
||||
_amdver=8.982
|
||||
pkgver=12.12
|
||||
pkgrel=2
|
||||
_amdver=9.01
|
||||
pkgdesc="AMD/ATI catalyst driver utilities and libraries. (32-bit)"
|
||||
url="http://www.ati.amd.com"
|
||||
arch=(x86_64)
|
||||
license=('custom')
|
||||
depends=('lib32-libxext' 'lib32-libdrm' "catalyst-utils>=${pkgver}")
|
||||
conflicts=('lib32-libgl' 'lib32-nvidia-utils' 'lib32-ati-dri')
|
||||
depends=('lib32-libxext' 'lib32-libdrm' "catalyst-utils=${pkgver}")
|
||||
conflicts=('lib32-libgl' 'lib32-nvidia-utils')
|
||||
replaces=('lib32-ati-fglrx-utils' 'lib32-fglrx-utils')
|
||||
provides=('lib32-libgl')
|
||||
source=(http://www2.ati.com/drivers/linux/amd-driver-installer-${pkgver/./-}-x86.x86_64.zip
|
||||
#source=(http://www.ati.com/drivers/linux/amd-driver-installer-${pkgver/./-}-x86.x86_64.run
|
||||
source=(http://www2.ati.com/drivers/embedded/9.01-121106a-150335C-EDG_Direct.zip
|
||||
lib32-catalyst.sh)
|
||||
md5sums=('41c5478322b13be6909eeb46412a3aa0'
|
||||
md5sums=('8682744e49fcd529a7e0c07a167d9df3'
|
||||
'af7fb8ee4fc96fd54c5b483e33dc71c4')
|
||||
|
||||
build() {
|
||||
@ -28,34 +29,42 @@ build() {
|
||||
|
||||
package() {
|
||||
cd ${srcdir}
|
||||
install -D -m755 lib32-catalyst.sh ${pkgdir}/etc/profile.d/lib32-catalyst.sh
|
||||
install -D -m755 lib32-catalyst.sh ${pkgdir}/etc/profile.d/lib32-catalyst.sh || return 1
|
||||
|
||||
# Install lib32 libraries
|
||||
cd "${srcdir}/archive_files/arch/x86/usr"
|
||||
install -dm755 "${pkgdir}/usr/lib32"
|
||||
install -dm755 "${pkgdir}/usr/lib32/fglrx" # since 11.4
|
||||
install -dm755 "${pkgdir}/usr/lib32/xorg/modules/dri"
|
||||
install -m755 lib/*.so* "${pkgdir}/usr/lib32/"
|
||||
cd "${srcdir}/archive_files/arch/x86/usr" || return 1
|
||||
install -dm755 "${pkgdir}/usr/lib32" || return 1
|
||||
install -dm755 "${pkgdir}/usr/lib32/fglrx" || return 1 # since 11.4
|
||||
install -dm755 "${pkgdir}/usr/lib32/xorg/modules/dri" || return 1
|
||||
install -m755 lib/*.so* "${pkgdir}/usr/lib32/" || return 1
|
||||
|
||||
install -m755 X11R6/lib/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib32/fglrx" # since 11.5
|
||||
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib32/fglrx/libGL.so.1.2" # since 11.4
|
||||
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib32/fglrx-libGL.so.1.2" # since 11.4
|
||||
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib32/libGL.so.1.2" # since 11.4
|
||||
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib32/libGL.so.1" # since 11.4
|
||||
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib32/libGL.so" # since 11.4
|
||||
install -m755 X11R6/lib/libAMDXvBA.so.1.0 "${pkgdir}/usr/lib32/" # since 11.4
|
||||
install -m755 X11R6/lib/libatiadlxx.so "${pkgdir}/usr/lib32/" # since 11.4
|
||||
install -m755 X11R6/lib/libfglrx_dm.so.1.0 "${pkgdir}/usr/lib32/" # since 11.4
|
||||
install -m755 X11R6/lib/libXvBAW.so.1.0 "${pkgdir}/usr/lib32/" # since 11.4
|
||||
install -m755 X11R6/lib/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib32/fglrx" || return 1 # since 11.5
|
||||
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib32/fglrx/libGL.so.1.2" # since 11.4
|
||||
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib32/fglrx-libGL.so.1.2" # since 11.4
|
||||
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib32/libGL.so.1.2" # since 11.4
|
||||
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib32/libGL.so.1" # since 11.4
|
||||
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib32/libGL.so" # since 11.4
|
||||
install -m755 X11R6/lib/libAMDXvBA.so.1.0 "${pkgdir}/usr/lib32/" || return 1 # since 11.4
|
||||
install -m755 X11R6/lib/libatiadlxx.so "${pkgdir}/usr/lib32/" || return 1 # since 11.4
|
||||
install -m755 X11R6/lib/libfglrx_dm.so.1.0 "${pkgdir}/usr/lib32/" || return 1 # since 11.4
|
||||
install -m755 X11R6/lib/libXvBAW.so.1.0 "${pkgdir}/usr/lib32/" || return 1 # since 11.4
|
||||
|
||||
install -m755 X11R6/lib/modules/dri/*.so "${pkgdir}/usr/lib32/xorg/modules/dri/"
|
||||
install -m755 X11R6/lib/modules/dri/*.so "${pkgdir}/usr/lib32/xorg/modules/dri/" || return 1
|
||||
ln -snf /usr/lib32/xorg/modules/dri "${pkgdir}/usr/lib32/dri" || return 1
|
||||
|
||||
cd "$pkgdir/usr/lib32/"
|
||||
ln -sf libfglrx_dm.so.1.0 libfglrx_dm.so.1
|
||||
ln -sf libAMDXvBA.so.1.0 libAMDXvBA.so.1
|
||||
ln -sf libXvBAW.so.1.0 libXvBAW.so.1
|
||||
ln -sf libatiuki.so.1.0 libatiuki.so.1
|
||||
ln -sf libatiuki.so.1.0 libatiuki.so
|
||||
install -dm755 "${pkgdir}/usr/lib32/dri"
|
||||
ln -sf xorg/modules/dri/fglrx_dri.so dri/fglrx_dri.so
|
||||
cd "$pkgdir/usr/lib32/" || return 1
|
||||
ln -sf libfglrx_dm.so.1.0 libfglrx_dm.so.1 || return 1
|
||||
ln -sf libAMDXvBA.so.1.0 libAMDXvBA.so.1 || return 1
|
||||
ln -sf libXvBAW.so.1.0 libXvBAW.so.1 || return 1
|
||||
ln -sf libatiuki.so.1.0 libatiuki.so.1 || return 1
|
||||
ln -sf libatiuki.so.1.0 libatiuki.so || return 1
|
||||
ln -sf libOpenCL.so.1 libOpenCL.so || return 1 # since 11.11
|
||||
|
||||
# since 12.8
|
||||
install -m755 -d "${pkgdir}/etc/OpenCL/vendors"
|
||||
install -m644 "${srcdir}/archive_files/arch/x86/etc/OpenCL/vendors/amdocl32.icd" "${pkgdir}/etc/OpenCL/vendors/" || return 1
|
||||
|
||||
# License
|
||||
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
install -m644 "${srcdir}/archive_files/LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
|
||||
}
|
||||
|
45
lib32-celt/PKGBUILD
Normal file
45
lib32-celt/PKGBUILD
Normal file
@ -0,0 +1,45 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# Maintainer: Michael Haesel <michael[dot]haesel[at]gmail[dot]com>
|
||||
# Contributor: Ray Rashif <schiv@archlinux.org>
|
||||
# Contributor: SpepS <dreamspepser at yahoo dot it>
|
||||
# Contributor: Thomas Dziedzic < gostrc at gmail >
|
||||
# Contributor: Lauri Niskanen <ape@ape3000.com>
|
||||
|
||||
_realname=celt
|
||||
pkgname=lib32-$_realname
|
||||
pkgver=0.11.1
|
||||
pkgrel=1
|
||||
pkgdesc='Low-latency audio communication codec (32 bit)'
|
||||
arch=('x86_64')
|
||||
url='http://www.celt-codec.org'
|
||||
license=('BSD')
|
||||
depends=('lib32-glibc' "${_realname}=${pkgver}")
|
||||
makedepends=('gcc-multilib')
|
||||
options=('!libtool')
|
||||
source=("http://downloads.xiph.org/releases/${_realname}/${_realname}-${pkgver}.tar.gz")
|
||||
sha256sums=('01c2579fba8b283c9068cb704a70a6e654aa74ced064c091cafffbe6fb1d4cbf')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
export CC="gcc -m32"
|
||||
export CXX="g++ -m32"
|
||||
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
||||
|
||||
./configure --prefix=/usr --libdir=/usr/lib32
|
||||
make -C libcelt
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
make DESTDIR="${pkgdir}" install-pkgconfigDATA
|
||||
make -C libcelt DESTDIR="${pkgdir}" install
|
||||
|
||||
# remove unneeded stuff
|
||||
rm -rf "${pkgdir}/usr/include"
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
@ -5,18 +5,17 @@
|
||||
|
||||
_pkgbasename=curl
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=7.21.6
|
||||
pkgver=7.28.1
|
||||
pkgrel=1
|
||||
pkgdesc="An URL retrieval utility and library (32-bit)"
|
||||
arch=('x86_64')
|
||||
url="http://curl.haxx.se"
|
||||
license=('MIT')
|
||||
depends=('lib32-zlib' 'lib32-openssl' 'lib32-libssh2' 'bash' 'ca-certificates' $_pkgbasename)
|
||||
depends=('lib32-zlib' 'lib32-openssl' 'lib32-libssh2' 'bash' 'ca-certificates' $_pkgbasename=$pkgver)
|
||||
makedepends=(gcc-multilib)
|
||||
options=('!libtool')
|
||||
source=("http://curl.haxx.se/download/${_pkgbasename}-${pkgver}.tar.bz2")
|
||||
md5sums=('6611989a81ebd7b03a35adc3001ddee0')
|
||||
|
||||
md5sums=('26eb081c999b0e203770869427e9a93d')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
|
@ -11,7 +11,7 @@ pkgdesc="The Berkeley DB embedded database system (32-bit)"
|
||||
arch=('x86_64')
|
||||
url="http://www.oracle.com/technology/software/products/berkeley-db/index.html"
|
||||
license=('custom')
|
||||
depends=('lib32-gcc-libs' $_pkgbasename)
|
||||
depends=('lib32-gcc-libs' $_pkgbasename=$pkgver)
|
||||
makedepends=('gcc-multilib')
|
||||
options=('!libtool' 'force')
|
||||
source=(http://download-uk.oracle.com/berkeley-db/db-${pkgver}.tar.gz)
|
||||
|
@ -5,17 +5,17 @@
|
||||
|
||||
pkgname=lib32-dbus-core
|
||||
_pkgbasename=dbus-core
|
||||
pkgver=1.4.14
|
||||
pkgrel=1
|
||||
pkgver=1.6.4
|
||||
pkgrel=2
|
||||
pkgdesc="Freedesktop.org message bus system (32-bit)"
|
||||
arch=('x86_64')
|
||||
url="http://www.freedesktop.org/Software/dbus"
|
||||
license=('GPL' 'custom')
|
||||
depends=('lib32-glibc' 'lib32-expat' 'dbus-core')
|
||||
depends=('lib32-glibc' 'lib32-expat' $_pkgbasename=$pkgver)
|
||||
makedepends=('gcc-multilib')
|
||||
options=(!libtool)
|
||||
source=(http://dbus.freedesktop.org/releases/dbus/dbus-${pkgver}.tar.gz)
|
||||
md5sums=('ae6de2562a57516cfabaf56903375ba9')
|
||||
md5sums=('5ec43dc4554cba638917317b2b4f7640')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
@ -24,20 +24,15 @@ build() {
|
||||
|
||||
cd "${srcdir}/dbus-${pkgver}"
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--libdir=/usr/lib32 \
|
||||
--libexecdir=/usr/lib/dbus-1.0 \
|
||||
--with-dbus-user=81 \
|
||||
--with-system-pid-file=/var/run/dbus.pid \
|
||||
--enable-inotify \
|
||||
--disable-dnotify \
|
||||
--disable-verbose-mode \
|
||||
--disable-static \
|
||||
--disable-tests \
|
||||
--disable-asserts \
|
||||
--without-x
|
||||
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib32 \
|
||||
--libexecdir=/usr/lib/dbus-1.0 --with-dbus-user=81 \
|
||||
--with-system-pid-file=/var/run/dbus.pid \
|
||||
--with-system-socket=/run/dbus/system_bus_socket \
|
||||
--with-console-auth-dir=/run/console/ \
|
||||
--enable-inotify --disable-dnotify \
|
||||
--disable-verbose-mode --disable-static \
|
||||
--disable-tests --disable-asserts --without-x \
|
||||
--disable-systemd
|
||||
make
|
||||
}
|
||||
package() {
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||
@ -6,17 +7,17 @@
|
||||
_pkgbasename=dbus-glib
|
||||
|
||||
pkgname=lib32-${_pkgbasename}
|
||||
pkgver=0.94
|
||||
pkgver=0.100
|
||||
pkgrel=1
|
||||
pkgdesc="GLib bindings for DBUS (32-bit)"
|
||||
arch=(x86_64)
|
||||
license=('GPL')
|
||||
url="http://www.freedesktop.org/wiki/Software/DBusBindings"
|
||||
depends=('lib32-dbus-core' 'lib32-glib2' ${_pkgbasename})
|
||||
makedepends=('gcc-multilib' 'pkgconfig')
|
||||
makedepends=('gcc-multilib' 'lib32-libffi' 'pkgconfig')
|
||||
options=(!libtool !emptydirs)
|
||||
source=(http://dbus.freedesktop.org/releases/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.gz)
|
||||
md5sums=('e1f1506a6f4941e67bffd614b1ad5af6')
|
||||
md5sums=('d33959a9c0c6a158f5ac6d640316e89e')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
@ -30,7 +31,6 @@ build() {
|
||||
--enable-static=no \
|
||||
--enable-bash-completion=no
|
||||
make
|
||||
make DESTDIR="${pkgdir}" install
|
||||
}
|
||||
|
||||
package() {
|
||||
|
@ -5,17 +5,16 @@
|
||||
|
||||
_pkgbasename=e2fsprogs
|
||||
pkgname=lib32-e2fsprogs
|
||||
pkgver=1.41.14
|
||||
pkgrel=2
|
||||
pkgver=1.42.5
|
||||
pkgrel=1
|
||||
pkgdesc="Ext2 filesystem libraries (32-bit)"
|
||||
arch=(x86_64)
|
||||
license=('GPL' 'LGPL' 'MIT')
|
||||
url="http://e2fsprogs.sourceforge.net"
|
||||
depends=('lib32-util-linux>=2.19.1' $_pkgbasename)
|
||||
depends=('lib32-util-linux>=2.22.1' $_pkgbasename=$pkgver)
|
||||
makedepends=('bc' 'gcc-multilib')
|
||||
source=("http://downloads.sourceforge.net/sourceforge/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.gz")
|
||||
sha1sums=('24f9364fa3d4c0d7d00cb627b819d0e51055d6c5')
|
||||
|
||||
md5sums=('aca828bb4bcca20991a442deb950b670')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
@ -24,11 +23,8 @@ build() {
|
||||
|
||||
cd "${srcdir}/${_pkgbasename}-${pkgver}"
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--libdir=/usr/lib32 \
|
||||
--with-root-prefix="" \
|
||||
--enable-elf-shlibs \
|
||||
--disable-{debugfs,imager,resizer,fsck,uuidd,libuuid,libblkid}
|
||||
./configure --prefix=/usr --libdir=/usr/lib32 --with-root-prefix="" --enable-elf-shlibs \
|
||||
--disable-{debugfs,imager,resizer,fsck,uuidd,libuuid,libblkid}
|
||||
make
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ pkgdesc="Free Lossless Audio Codec (32-bit)"
|
||||
arch=('x86_64')
|
||||
url="http://flac.sourceforge.net/"
|
||||
license=('custom:Xiph' 'LGPL' 'GPL' 'FDL')
|
||||
depends=('lib32-libogg' 'lib32-gcc-libs' $_pkgbasename)
|
||||
depends=('lib32-libogg' 'lib32-gcc-libs' $_pkgbasename=$pkgver)
|
||||
makedepends=('nasm' gcc-multilib)
|
||||
options=('!libtool' '!makeflags')
|
||||
source=(http://downloads.sf.net/sourceforge/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.gz
|
||||
|
@ -6,12 +6,12 @@
|
||||
_pkgbasename=fontconfig
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=2.8.0
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="A library for configuring and customizing font access (32-bit)"
|
||||
arch=(x86_64)
|
||||
url="http://www.fontconfig.org/release/"
|
||||
license=('custom')
|
||||
depends=('lib32-expat>=2.0.1' 'lib32-freetype2>=2.3.11' $_pkgbasename)
|
||||
depends=('lib32-expat>=2.0.1' 'lib32-freetype2>=2.3.11' $_pkgbasename=$pkgver 'lib32-bzip2')
|
||||
makedepends=(gcc-multilib)
|
||||
options=('!libtool')
|
||||
source=(http://www.fontconfig.org/release/${_pkgbasename}-${pkgver}.tar.gz
|
||||
|
@ -5,19 +5,19 @@
|
||||
|
||||
_pkgbasename=freetype2
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=2.4.3
|
||||
pkgrel=2
|
||||
pkgver=2.4.7
|
||||
pkgrel=1
|
||||
pkgdesc="TrueType font rendering library (32-bit)"
|
||||
arch=(x86_64)
|
||||
license=('GPL')
|
||||
url="http://freetype.sourceforge.net"
|
||||
depends=('lib32-zlib' $_pkgbasename)
|
||||
depends=('lib32-zlib' 'lib32-bzip2' $_pkgbasename=$pkgver)
|
||||
makedepends=(gcc-multilib)
|
||||
options=('!libtool')
|
||||
source=(http://downloads.sourceforge.net/sourceforge/freetype/freetype-${pkgver}.tar.bz2
|
||||
freetype-2.3.0-enable-spr.patch
|
||||
freetype-2.2.1-enable-valid.patch)
|
||||
md5sums=('75ac7082bde7b3805dc5d6bc806fa045'
|
||||
md5sums=('dbadce8f0c5e70a0b7c51eadf2dd9394'
|
||||
'816dc8619a6904a7385769433c0a8653'
|
||||
'214119610444c9b02766ccee5e220680')
|
||||
|
||||
|
@ -5,20 +5,20 @@
|
||||
|
||||
_pkgbasename=gdk-pixbuf2
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=2.24.0
|
||||
pkgrel=1
|
||||
pkgver=2.26.4
|
||||
pkgrel=2
|
||||
pkgdesc="An image loading library for gtk2 (32-bit)"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://www.gtk.org/"
|
||||
license=('GPL2')
|
||||
depends=('lib32-glib2>=2.25.15'
|
||||
lib32-lib{'png>=1.4.3','tiff>=3.9.4','jpeg>=8.0.2',x11}
|
||||
depends=('lib32-glib2'
|
||||
lib32-lib{'png','tiff','jpeg','ffi','x11'}
|
||||
$_pkgbasename)
|
||||
makedepends=(gcc-multilib)
|
||||
options=('!libtool' '!docs')
|
||||
install=gdk-pixbuf2.install
|
||||
source=(http://download.gnome.org/sources/gdk-pixbuf/2.24/gdk-pixbuf-${pkgver}.tar.bz2)
|
||||
sha256sums=('38d2630314e6d91976bffd833236f84fefa440a9038f86dc422820a39f2e3700')
|
||||
source=(http://download.gnome.org/sources/gdk-pixbuf/2.26/gdk-pixbuf-${pkgver}.tar.xz)
|
||||
sha256sums=('a91458645f078debf204fef8bb06b30f356fcb5d48f65395132a5dba2b3510be')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
@ -27,10 +27,10 @@ build() {
|
||||
|
||||
cd "${srcdir}/gdk-pixbuf-${pkgver}"
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--libdir=/usr/lib32 \
|
||||
--without-libjasper \
|
||||
--with-included-loaders=png
|
||||
./configure --prefix=/usr --libdir=/usr/lib32 \
|
||||
--without-libjasper \
|
||||
--with-x11 \
|
||||
--with-included-loaders=png
|
||||
make
|
||||
}
|
||||
|
||||
@ -44,5 +44,6 @@ package() {
|
||||
cd "${pkgdir}"/usr/bin
|
||||
mv gdk-pixbuf-query-loaders gdk-pixbuf-query-loaders-32
|
||||
rm gdk-pixbuf-csource
|
||||
rm gdk-pixbuf-pixdata
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ pkgdesc="A library for reading and writing gif images (32-bit)"
|
||||
url="http://sourceforge.net/projects/giflib/"
|
||||
arch=('x86_64')
|
||||
license=('MIT')
|
||||
depends=('lib32-libx11' 'lib32-libsm' $_pkgbasename)
|
||||
depends=('lib32-libx11' 'lib32-libsm' $_pkgbasename=$pkgver)
|
||||
makedepends=(gcc-multilib)
|
||||
provides=("lib32-libungif=${pkgver}")
|
||||
conflicts=('lib32-libungif')
|
||||
|
@ -1,20 +1,19 @@
|
||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
|
||||
_pkgbasename=glew
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=1.5.8
|
||||
pkgver=1.9.0
|
||||
pkgrel=1
|
||||
pkgdesc="A cross-platform C/C++ extension loading library (32 bit)"
|
||||
arch=('x86_64')
|
||||
url="http://glew.sourceforge.net"
|
||||
license=('BSD' 'MIT' 'GPL')
|
||||
depends=('lib32-libxmu' 'lib32-libxi' 'lib32-mesa' "$_pkgbasename>=$pkgver")
|
||||
depends=('lib32-libxmu' 'lib32-libxi' 'lib32-mesa' "$_pkgbasename>=$pkgver" )
|
||||
makedepends=('gcc-multilib')
|
||||
source=(http://downloads.sourceforge.net/${_pkgbasename}/${_pkgbasename}-${pkgver}.tgz)
|
||||
sha1sums=('450946935faa20ac4950cb42ff025be2c1f7c22e')
|
||||
sha1sums=('9291f5c5afefd482c7f3e91ffb3cd4716c6c9ffe')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_pkgbasename}-${pkgver}"
|
||||
|
@ -1,21 +1,21 @@
|
||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||
|
||||
_pkgbasename=glib2
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=2.28.8
|
||||
pkgrel=1
|
||||
pkgdesc="Common C routines used by GTK+ 2.4 and other libs (32-bit)"
|
||||
pkgname="lib32-${_pkgbasename}"
|
||||
pkgver=2.32.1
|
||||
_pkgver=2.32
|
||||
pkgrel=5
|
||||
pkgdesc="Common C routines used by GTK+ 2.4 and other libs. (ELF32)"
|
||||
url="http://www.gtk.org/"
|
||||
arch=('x86_64')
|
||||
license=('LGPL')
|
||||
depends=('lib32-pcre' 'lib32-zlib' 'lib32-dbus-core' $_pkgbasename)
|
||||
makedepends=('gcc-multilib')
|
||||
depends=('lib32-pcre' 'lib32-zlib' 'lib32-dbus-core' "${_pkgbasename}")
|
||||
makedepends=('python2' 'lib32-libffi' 'gcc-multilib')
|
||||
options=('!libtool' '!docs')
|
||||
source=(http://ftp.gnome.org/pub/GNOME/sources/glib/2.28/glib-${pkgver}.tar.bz2)
|
||||
sha256sums=('222f3055d6c413417b50901008c654865e5a311c73f0ae918b0a9978d1f9466f')
|
||||
source=("http://ftp.gnome.org/pub/GNOME/sources/glib/${_pkgver}/glib-${pkgver}.tar.xz")
|
||||
sha256sums=('484d5b7fc09f3fa398355adaf74b369768f5859866c299f229c99721990f8398')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
@ -23,13 +23,8 @@ build() {
|
||||
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
||||
|
||||
cd "${srcdir}/glib-${pkgver}"
|
||||
./configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--libdir=/usr/lib32 \
|
||||
--enable-static \
|
||||
--enable-shared \
|
||||
--with-pcre=system \
|
||||
--disable-fam
|
||||
PYTHON=/usr/bin/python2 ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib32 \
|
||||
--enable-static --enable-shared --with-pcre=system --disable-fam
|
||||
make
|
||||
}
|
||||
|
||||
@ -41,4 +36,6 @@ package() {
|
||||
cd "${pkgdir}"/usr/bin
|
||||
mv gio-querymodules gio-querymodules-32
|
||||
rm -f gdbus glib* gobject-query gsettings gtester*
|
||||
rm -rf "$pkgdir"/usr/lib32/gdbus-2.0
|
||||
find "$pkgdir/usr/bin" -type f -not -name gio-querymodules-32 -delete
|
||||
}
|
||||
|
@ -1,95 +1,205 @@
|
||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
# maintainer: Giuseppe Calà <jiveaxe@gmail.com>
|
||||
# maintainer: Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
# maintainer: Manuel Tortosa <manutortoasÃ@chakra-project.org>
|
||||
|
||||
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
|
||||
# NOTE: valgrind requires rebuild with each new glibc version
|
||||
# toolchain build order:
|
||||
# lib32-glibc > binutils-multilib > gcc-multilib > binutils-multilib > lib32-glibc
|
||||
|
||||
_pkgname=glibc
|
||||
pkgname=lib32-$_pkgname
|
||||
pkgver=2.14
|
||||
pkgrel=1
|
||||
_glibcdate=20110908
|
||||
pkgver=2.15
|
||||
pkgrel=2
|
||||
_glibcdate=20120419
|
||||
pkgdesc="GNU C Library for multilib"
|
||||
arch=('x86_64')
|
||||
url="http://www.gnu.org/software/libc"
|
||||
license=('GPL' 'LGPL')
|
||||
depends=("glibc>=$pkgver")
|
||||
#makedepends=('gcc-multilib>=4.6')
|
||||
#makedepends=('gcc-multilib>=4.7')
|
||||
makedepends=('gcc-multilib')
|
||||
options=('!strip' '!emptydirs')
|
||||
source=(http://chakra-project.org/sources/${_pkgename}/${_pkgname}-${pkgver}_${_glibcdate}.tar.xz
|
||||
glibc-2.10-dont-build-timezone.patch
|
||||
glibc-2.10-bz4781.patch
|
||||
source=(http://chakra.sourceforge.net/sources/${_pkgname}/${_pkgname}-${pkgver}_${_glibcdate}.tar.xz
|
||||
glibc-2.15-do-not-install-timezone-files.patch
|
||||
glibc-2.15-do-not-install-timezone-files-2.patch
|
||||
glibc-__i686.patch
|
||||
glibc-2.12.1-static-shared-getpagesize.patch
|
||||
glibc-2.12.2-ignore-origin-of-privileged-program.patch
|
||||
glibc-2.13-futex.patch
|
||||
glibc-2.13-dlclose-search-reset.patch
|
||||
glibc-2.14-libdl-crash.patch
|
||||
glibc-2.14-avoid-assertion-on-empty-dns-answer.patch
|
||||
glibc-2.14-reexport-rpc-interface.patch
|
||||
glibc-2.14-reinstall-nis-rpc-headers.patch
|
||||
glibc-2.15-fix-res_query-assert.patch
|
||||
glibc-2.15-lddebug-scopes.patch
|
||||
glibc-2.15-revert-c5a0802a.patch
|
||||
glibc-2.15-scanf.patch
|
||||
glibc-2.15-ifunc.patch
|
||||
glibc-2.15-avx.patch
|
||||
glibc-2.15-strcasecmp-disable-avx.patch
|
||||
glibc-2.15-gb18030.patch
|
||||
glibc-2.15-revert-netlink-cache.patch
|
||||
glibc-2.15-arena.patch
|
||||
glibc-2.15-negative-result-cache.patch
|
||||
glibc-2.15-multiarch-x86-strcmp.patch
|
||||
glibc-2.15-vdso.patch
|
||||
glibc-2.15-feraiseexcept-plt.patch
|
||||
glibc-2.15-vfprintf-nargs.patch
|
||||
glibc-2.15-__libc_res_nquerydomain-out-of-bounds.patch
|
||||
glibc-2.15-fmtmsg-locking.patch
|
||||
glibc-2.15-non-signalling-comparisons.patch
|
||||
glibc-2.15-rintf-rounding.patch
|
||||
glibc-2.15-nearbyintf-rounding.patch
|
||||
glibc-2.15-confstr-local-buffer-extent.patch
|
||||
lib32-glibc.conf)
|
||||
md5sums=('069069eb9100cc7affd7ad884cb3c3e9'
|
||||
'4dadb9203b69a3210d53514bb46f41c3'
|
||||
'0c5540efc51c0b93996c51b57a8540ae'
|
||||
md5sums=('c0487f4e83db1b9b30d7989fc47dbead'
|
||||
'349227bcedb19cea008fbcb2c7e1a582'
|
||||
'880439de2c608177ed1d749722d26820'
|
||||
'40cd342e21f71f5e49e32622b25acc52'
|
||||
'a3ac6f318d680347bb6e2805d42b73b2'
|
||||
'b042647ea7d6f22ad319e12e796bd13e'
|
||||
'7d0154b7e17ea218c9fa953599d24cc4'
|
||||
'22d09c58718fb3d1d31c3a6c14ca6886'
|
||||
'cea62cc6b903d222c5f26e05a3c0e0e6'
|
||||
'13728807283f111e5d9d38cf38e0a461'
|
||||
'6970bcfeb3bf88913436d5112d16f588'
|
||||
'c5de2a946215d647c8af5432ec4b0da0'
|
||||
'55febbb72139ac7b65757df085024b83'
|
||||
'684073467137906fb9411f4c7f00db10'
|
||||
'207483814b5034d9841ad090c75bedf4'
|
||||
'62288103a28f5f779da4ee64621d81d1'
|
||||
'34baaa90a8fcd500adfbe8c609ed81f1'
|
||||
'66898e99bf9279db25f1d9b058116c2e'
|
||||
'92e797af8fb7d24c856916e04c382e6c'
|
||||
'fccb89f6628f59752278e125c35941f8'
|
||||
'5022c0c96c770fdaf5225aa44297f13c'
|
||||
'f65fa79b4bd2b5e7ed5563a3d1beadd3'
|
||||
'3eae060bc0eac2a85c07956d2b799f15'
|
||||
'a55eadc2ed4ce869a1e193f0bfb72444'
|
||||
'a0219bb48baf56b3085c118b6db2c1a6'
|
||||
'3d9ca85e0e8507830b3fb67cdee0c04b'
|
||||
'3168364ac51cc7ad479eb6390a5897ff'
|
||||
'de9399a35a9c14f793c66f1230674d67'
|
||||
'9ea0f925e508b58042f9c1f83871be6a'
|
||||
'56e51cd17aa23af99cba46dfadedde38'
|
||||
'f59bd7c9dd6330bfacb3334b09ef73db'
|
||||
'104300a586580bb340bb70162a196c80'
|
||||
'50dc7006874cbd86ee436044752f5228'
|
||||
'4ed0bb09c3851cd9cb5e39c946a8a334'
|
||||
'6e052f1cb693d5d3203f50f9d4e8c33b')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/glibc
|
||||
|
||||
# timezone data is in separate package (tzdata)
|
||||
patch -Np1 -i ${srcdir}/glibc-2.10-dont-build-timezone.patch
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=482ff4da
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-do-not-install-timezone-files.patch
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=a458e7fe
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-do-not-install-timezone-files-2.patch
|
||||
|
||||
# http://sources.redhat.com/bugzilla/show_bug.cgi?id=4781
|
||||
patch -Np1 -i ${srcdir}/glibc-2.10-bz4781.patch
|
||||
|
||||
# http://sources.redhat.com/bugzilla/show_bug.cgi?id=411
|
||||
# http://sourceware.org/ml/libc-alpha/2009-07/msg00072.html
|
||||
patch -Np1 -i ${srcdir}/glibc-__i686.patch
|
||||
|
||||
# http://sourceware.org/bugzilla/show_bug.cgi?id=11929
|
||||
# using Fedora "fix" as patch in that bug report causes breakages...
|
||||
patch -Np1 -i ${srcdir}/glibc-2.12.1-static-shared-getpagesize.patch
|
||||
# undefine __i686
|
||||
# http://sourceware.org/glibc/wiki/Release/2.15#Build_Failures
|
||||
patch -p1 -i ${srcdir}/glibc-__i686.patch
|
||||
|
||||
# http://www.exploit-db.com/exploits/15274/
|
||||
# http://sourceware.org/git/?p=glibc.git;a=patch;h=d14e6b09 (only fedora branch...)
|
||||
patch -Np1 -i ${srcdir}/glibc-2.12.2-ignore-origin-of-privileged-program.patch
|
||||
# http://sourceware.org/git/?p=glibc.git;a=patch;h=d14e6b09 (fedora branch)
|
||||
patch -p1 -i ${srcdir}/glibc-2.12.2-ignore-origin-of-privileged-program.patch
|
||||
|
||||
# http://sourceware.org/bugzilla/show_bug.cgi?id=12403
|
||||
patch -Np1 -i ${srcdir}/glibc-2.13-futex.patch
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=593675
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=2f811bf8 (only fedora branch...)
|
||||
patch -Np1 -i ${srcdir}/glibc-2.13-dlclose-search-reset.patch
|
||||
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9 (only fedora branch...)
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9 (fedora branch)
|
||||
# http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html
|
||||
patch -Np1 -i ${srcdir}/glibc-2.14-libdl-crash.patch
|
||||
|
||||
# http://sourceware.org/bugzilla/show_bug.cgi?id=13013
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=032c0ee3 (only fedora branch...)
|
||||
patch -Np1 -i ${srcdir}/glibc-2.14-avoid-assertion-on-empty-dns-answer.patch
|
||||
patch -p1 -i ${srcdir}/glibc-2.14-libdl-crash.patch
|
||||
|
||||
# re-export RPC interface until libtirpc is ready as a replacement
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...)
|
||||
patch -Np1 -i ${srcdir}/glibc-2.14-reexport-rpc-interface.patch
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...)
|
||||
patch -Np1 -i ${srcdir}/glibc-2.14-reinstall-nis-rpc-headers.patch
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (fedora branch)
|
||||
patch -p1 -i ${srcdir}/glibc-2.14-reexport-rpc-interface.patch
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (fedora branch)
|
||||
patch -p1 -i ${srcdir}/glibc-2.14-reinstall-nis-rpc-headers.patch
|
||||
|
||||
# fix res_query assertion
|
||||
# http://sourceware.org/bugzilla/show_bug.cgi?id=13013
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-fix-res_query-assert.patch
|
||||
|
||||
# propriety nvidia crash - https://bugzilla.redhat.com/show_bug.cgi?id=737223
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c95ab64 (fedora branch)
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-lddebug-scopes.patch
|
||||
|
||||
# revert commit c5a0802a - causes various hangs
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=769421
|
||||
# Note: fedora may have actual fix (not submitted upstream yet...)
|
||||
# http://pkgs.fedoraproject.org/gitweb/?p=glibc.git;a=blob_plain;f=glibc-rh552960-2.patch
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-revert-c5a0802a.patch
|
||||
|
||||
# fix realloc usage in vfscanf
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=20b38e03
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-scanf.patch
|
||||
|
||||
# fix ifunc relocations
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=6ee65ed6
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-ifunc.patch
|
||||
|
||||
# fix AVX detection
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=afc5ed09
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=08cf777f
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-avx.patch
|
||||
# and "fix" strcasecmp
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-strcasecmp-disable-avx.patch
|
||||
|
||||
# fix GB18030 charmap
|
||||
# http://sourceware.org/bugzilla/show_bug.cgi?id=11837
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=2a57bd79 (fedora branch)
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=3d828a61 (fedora branch)
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-gb18030.patch
|
||||
|
||||
# fix crash in __nscd_get_mapping if nscd not running
|
||||
# http://sourceware.org/bugzilla/show_bug.cgi?id=13594 (potential "fix" in comment)
|
||||
# reverts commit 3a2c0242 and other necessary following changes...
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-revert-netlink-cache.patch
|
||||
|
||||
# handle ARENA_TEST correctly
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=41b81892
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-arena.patch
|
||||
|
||||
# Do not cache negative results in nscd if these are transient
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=3e1aa84e
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-negative-result-cache.patch
|
||||
|
||||
# strcasecmp_l, strncasecmp_l act as strcmp for multiarch x86
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=0bab47b6
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-multiarch-x86-strcmp.patch
|
||||
|
||||
# always set l_used for vDSO.
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=1f393a11
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-vdso.patch
|
||||
|
||||
# fix x86 PLT slot usage for feraiseexcept
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=7c35ffed
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-feraiseexcept-plt.patch
|
||||
|
||||
# vfprintf nargs overflow - CVE-2012-0864
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=7c1f4834
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-vfprintf-nargs.patch
|
||||
|
||||
# avoid out ouf bounds read in __libc_res_nquerydomain
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=8fdceb2e
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-__libc_res_nquerydomain-out-of-bounds.patch
|
||||
|
||||
# make fmtmsg function thread-safe
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=7724defc
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-fmtmsg-locking.patch
|
||||
|
||||
# use non-signaling floating-point comparisons in math functions
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=92221550
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-non-signalling-comparisons.patch
|
||||
|
||||
# fix rintf rounding.
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=fe45ce09
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-rintf-rounding.patch
|
||||
|
||||
# fix nearbyintf rounding
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=6cbeae47
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-nearbyintf-rounding.patch
|
||||
|
||||
# fix varaible scope issue in confstr
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=ac4c54f0
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=d6a403f9
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-confstr-local-buffer-extent.patch
|
||||
|
||||
cd ${srcdir}
|
||||
mkdir glibc-build
|
||||
rm -vRf glibc-build
|
||||
mkdir -p glibc-build
|
||||
cd glibc-build
|
||||
|
||||
export CC="gcc -m32"
|
||||
@ -99,32 +209,17 @@ build() {
|
||||
|
||||
echo "slibdir=/usr/lib32" >> configparms
|
||||
|
||||
# remove hardening options from CFLAGS for building libraries
|
||||
CFLAGS=${CFLAGS/-fstack-protector/}
|
||||
CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
|
||||
|
||||
${srcdir}/glibc/configure --prefix=/usr \
|
||||
--libdir=/usr/lib32 --libexecdir=/usr/lib32 \
|
||||
--with-headers=/usr/include \
|
||||
--enable-add-ons=nptl,libidn \
|
||||
--enable-kernel=2.6.27 \
|
||||
--enable-kernel=2.6.32 \
|
||||
--with-tls --with-__thread \
|
||||
--enable-bind-now --without-gd \
|
||||
--without-cvs --disable-profile \
|
||||
--disable-multi-arch i686-unknown-linux-gnu
|
||||
--enable-multi-arch i686-unknown-linux-gnu
|
||||
|
||||
# build libraries with hardening disabled
|
||||
echo "build-programs=no" >> configparms
|
||||
make
|
||||
|
||||
# re-enable hardening for programs
|
||||
sed -i "s#=no#=yes#" configparms
|
||||
echo "CC += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
|
||||
echo "CXX += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
|
||||
make
|
||||
|
||||
# remove harding in preparation to run test-suite
|
||||
sed -i '2,4d' configparms
|
||||
}
|
||||
|
||||
check() {
|
||||
@ -138,23 +233,18 @@ package() {
|
||||
cd ${srcdir}/glibc-build
|
||||
make install_root=${pkgdir} install
|
||||
|
||||
rm -rf ${pkgdir}/{etc,sbin,usr/{bin,sbin,share}}
|
||||
|
||||
rm -rf ${pkgdir}/{etc,sbin,usr/{bin,sbin,share},var}
|
||||
|
||||
# We need one 32 bit specific header file
|
||||
find ${pkgdir}/usr/include -type f -not -name stubs-32.h -delete
|
||||
|
||||
# manually strip files as stripping libpthread-*.so and libthread_db.so
|
||||
# with the default $STRIP_SHARED breaks gdb and stripping ld-*.so breaks
|
||||
# valgrind on x86_64
|
||||
|
||||
cd $pkgdir
|
||||
strip $STRIP_BINARIES usr/lib32/getconf/*
|
||||
|
||||
strip $STRIP_STATIC usr/lib32/*.a \
|
||||
usr/lib32/{{ld,libpthread}-${pkgver},libthread_db-1.0}.so
|
||||
strip $STRIP_STATIC usr/lib32/*.a
|
||||
|
||||
strip $STRIP_SHARED usr/lib32/{libanl,libBrokenLocale,libc,libcidn,libcrypt}-${pkgver}.so \
|
||||
usr/lib32/libnss_{compat,dns,files,hesiod,nis,nisplus}-${pkgver}.so \
|
||||
strip $STRIP_SHARED usr/lib32/{libanl,libBrokenLocale,libcidn,libcrypt}-${pkgver}.so \
|
||||
usr/lib32/libnss_{compat,db,dns,files,hesiod,nis,nisplus}-${pkgver}.so \
|
||||
usr/lib32/{libdl,libm,libnsl,libresolv,librt,libutil}-${pkgver}.so \
|
||||
usr/lib32/{libmemusage,libpcprofile,libSegFault}.so \
|
||||
usr/lib32/{pt_chown,{audit,gconv}/*.so}
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- glibc-2.12-192-g7c08a05/sysdeps/unix/sysv/linux/getpagesize.c
|
||||
+++ glibc-2.12.90-17/sysdeps/unix/sysv/linux/getpagesize.c
|
||||
@@ -28,7 +28,7 @@
|
||||
int
|
||||
__getpagesize ()
|
||||
{
|
||||
-#ifdef __ASSUME_AT_PAGESIZE
|
||||
+#if 0 && defined __ASSUME_AT_PAGESIZE
|
||||
assert (GLRO(dl_pagesize) != 0);
|
||||
return GLRO(dl_pagesize);
|
||||
#else
|
@ -55,7 +55,7 @@ index 9e30594..3890d00 100644
|
||||
if (old_l_initfini != NULL)
|
||||
- map->l_orig_initfini = old_l_initfini;
|
||||
+ _dl_scope_free (old_l_initfini);
|
||||
}
|
||||
|
||||
diff --git a/elf/dl-libc.c b/elf/dl-libc.c
|
||||
index 7be9483..a13fce3 100644
|
||||
--- a/elf/dl-libc.c
|
||||
|
@ -0,0 +1,24 @@
|
||||
diff --git a/resolv/res_query.c b/resolv/res_query.c
|
||||
index 947c651..abccd4a 100644
|
||||
--- a/resolv/res_query.c
|
||||
+++ b/resolv/res_query.c
|
||||
@@ -556,12 +556,16 @@ __libc_res_nquerydomain(res_state statp,
|
||||
* copy without '.' if present.
|
||||
*/
|
||||
n = strlen(name);
|
||||
- if (n >= MAXDNAME) {
|
||||
+
|
||||
+ /* Decrement N prior to checking it against MAXDNAME
|
||||
+ so that we detect a wrap to SIZE_MAX and return
|
||||
+ a reasonable error. */
|
||||
+ n--;
|
||||
+ if (n >= MAXDNAME - 1) {
|
||||
RES_SET_H_ERRNO(statp, NO_RECOVERY);
|
||||
return (-1);
|
||||
}
|
||||
- n--;
|
||||
- if (n >= 0 && name[n] == '.') {
|
||||
+ if (name[n] == '.') {
|
||||
strncpy(nbuf, name, n);
|
||||
nbuf[n] = '\0';
|
||||
} else
|
29
lib32-glibc/glibc-2.15-arena.patch
Normal file
29
lib32-glibc/glibc-2.15-arena.patch
Normal file
@ -0,0 +1,29 @@
|
||||
diff --git a/malloc/arena.c b/malloc/arena.c
|
||||
index d3cf4b9..b1c9469 100644
|
||||
--- a/malloc/arena.c
|
||||
+++ b/malloc/arena.c
|
||||
@@ -828,7 +828,7 @@ arena_get2(mstate a_tsd, size_t size)
|
||||
{
|
||||
if (mp_.arena_max != 0)
|
||||
narenas_limit = mp_.arena_max;
|
||||
- else
|
||||
+ else if (narenas > mp_.arena_test)
|
||||
{
|
||||
int n = __get_nprocs ();
|
||||
|
||||
@@ -842,7 +842,14 @@ arena_get2(mstate a_tsd, size_t size)
|
||||
}
|
||||
repeat:;
|
||||
size_t n = narenas;
|
||||
- if (__builtin_expect (n <= mp_.arena_test || n < narenas_limit, 0))
|
||||
+ /* NB: the following depends on the fact that (size_t)0 - 1 is a
|
||||
+ very large number and that the underflow is OK. If arena_max
|
||||
+ is set the value of arena_test is irrelevant. If arena_test
|
||||
+ is set but narenas is not yet larger or equal to arena_test
|
||||
+ narenas_limit is 0. There is no possibility for narenas to
|
||||
+ be too big for the test to always fail since there is not
|
||||
+ enough address space to create that many arenas. */
|
||||
+ if (__builtin_expect (n <= narenas_limit - 1, 0))
|
||||
{
|
||||
if (catomic_compare_and_exchange_bool_acq (&narenas, n + 1, n))
|
||||
goto repeat;
|
195
lib32-glibc/glibc-2.15-avx.patch
Normal file
195
lib32-glibc/glibc-2.15-avx.patch
Normal file
@ -0,0 +1,195 @@
|
||||
diff --git a/sysdeps/x86_64/fpu/multiarch/e_atan2.c b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
|
||||
index 6867c6e..3a615fc 100644
|
||||
--- a/sysdeps/x86_64/fpu/multiarch/e_atan2.c
|
||||
+++ b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
|
||||
@@ -14,7 +14,7 @@ extern double __ieee754_atan2_fma4 (double, double);
|
||||
|
||||
libm_ifunc (__ieee754_atan2,
|
||||
HAS_FMA4 ? __ieee754_atan2_fma4
|
||||
- : (HAS_AVX ? __ieee754_atan2_avx : __ieee754_atan2_sse2));
|
||||
+ : (HAS_YMM_USABLE ? __ieee754_atan2_avx : __ieee754_atan2_sse2));
|
||||
strong_alias (__ieee754_atan2, __atan2_finite)
|
||||
|
||||
# define __ieee754_atan2 __ieee754_atan2_sse2
|
||||
diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp.c b/sysdeps/x86_64/fpu/multiarch/e_exp.c
|
||||
index 3c65028..7b2320a 100644
|
||||
--- a/sysdeps/x86_64/fpu/multiarch/e_exp.c
|
||||
+++ b/sysdeps/x86_64/fpu/multiarch/e_exp.c
|
||||
@@ -14,7 +14,7 @@ extern double __ieee754_exp_fma4 (double);
|
||||
|
||||
libm_ifunc (__ieee754_exp,
|
||||
HAS_FMA4 ? __ieee754_exp_fma4
|
||||
- : (HAS_AVX ? __ieee754_exp_avx : __ieee754_exp_sse2));
|
||||
+ : (HAS_YMM_USABLE ? __ieee754_exp_avx : __ieee754_exp_sse2));
|
||||
strong_alias (__ieee754_exp, __exp_finite)
|
||||
|
||||
# define __ieee754_exp __ieee754_exp_sse2
|
||||
diff --git a/sysdeps/x86_64/fpu/multiarch/e_log.c b/sysdeps/x86_64/fpu/multiarch/e_log.c
|
||||
index 3b468d0..ab277d6 100644
|
||||
--- a/sysdeps/x86_64/fpu/multiarch/e_log.c
|
||||
+++ b/sysdeps/x86_64/fpu/multiarch/e_log.c
|
||||
@@ -14,7 +14,7 @@ extern double __ieee754_log_fma4 (double);
|
||||
|
||||
libm_ifunc (__ieee754_log,
|
||||
HAS_FMA4 ? __ieee754_log_fma4
|
||||
- : (HAS_AVX ? __ieee754_log_avx
|
||||
+ : (HAS_YMM_USABLE ? __ieee754_log_avx
|
||||
: __ieee754_log_sse2));
|
||||
strong_alias (__ieee754_log, __log_finite)
|
||||
|
||||
diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan.c b/sysdeps/x86_64/fpu/multiarch/s_atan.c
|
||||
index 3160201..78c7e09 100644
|
||||
--- a/sysdeps/x86_64/fpu/multiarch/s_atan.c
|
||||
+++ b/sysdeps/x86_64/fpu/multiarch/s_atan.c
|
||||
@@ -12,7 +12,8 @@ extern double __atan_fma4 (double);
|
||||
# define __atan_fma4 ((void *) 0)
|
||||
# endif
|
||||
|
||||
-libm_ifunc (atan, HAS_FMA4 ? __atan_fma4 : HAS_AVX ? __atan_avx : __atan_sse2);
|
||||
+libm_ifunc (atan, (HAS_FMA4 ? __atan_fma4 :
|
||||
+ HAS_YMM_USABLE ? __atan_avx : __atan_sse2));
|
||||
|
||||
# define atan __atan_sse2
|
||||
#endif
|
||||
diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin.c b/sysdeps/x86_64/fpu/multiarch/s_sin.c
|
||||
index 1ba9dbc..417acd0 100644
|
||||
--- a/sysdeps/x86_64/fpu/multiarch/s_sin.c
|
||||
+++ b/sysdeps/x86_64/fpu/multiarch/s_sin.c
|
||||
@@ -17,10 +17,12 @@ extern double __sin_fma4 (double);
|
||||
# define __sin_fma4 ((void *) 0)
|
||||
# endif
|
||||
|
||||
-libm_ifunc (__cos, HAS_FMA4 ? __cos_fma4 : HAS_AVX ? __cos_avx : __cos_sse2);
|
||||
+libm_ifunc (__cos, (HAS_FMA4 ? __cos_fma4 :
|
||||
+ HAS_YMM_USABLE ? __cos_avx : __cos_sse2));
|
||||
weak_alias (__cos, cos)
|
||||
|
||||
-libm_ifunc (__sin, HAS_FMA4 ? __sin_fma4 : HAS_AVX ? __sin_avx : __sin_sse2);
|
||||
+libm_ifunc (__sin, (HAS_FMA4 ? __sin_fma4 :
|
||||
+ HAS_YMM_USABLE ? __sin_avx : __sin_sse2));
|
||||
weak_alias (__sin, sin)
|
||||
|
||||
# define __cos __cos_sse2
|
||||
diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan.c b/sysdeps/x86_64/fpu/multiarch/s_tan.c
|
||||
index 8f6601e..3047155 100644
|
||||
--- a/sysdeps/x86_64/fpu/multiarch/s_tan.c
|
||||
+++ b/sysdeps/x86_64/fpu/multiarch/s_tan.c
|
||||
@@ -12,7 +12,8 @@ extern double __tan_fma4 (double);
|
||||
# define __tan_fma4 ((void *) 0)
|
||||
# endif
|
||||
|
||||
-libm_ifunc (tan, HAS_FMA4 ? __tan_fma4 : HAS_AVX ? __tan_avx : __tan_sse2);
|
||||
+libm_ifunc (tan, (HAS_FMA4 ? __tan_fma4 :
|
||||
+ HAS_YMM_USABLE ? __tan_avx : __tan_sse2));
|
||||
|
||||
# define tan __tan_sse2
|
||||
#endif
|
||||
diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c
|
||||
index 65b0ee9..76d146c 100644
|
||||
--- a/sysdeps/x86_64/multiarch/init-arch.c
|
||||
+++ b/sysdeps/x86_64/multiarch/init-arch.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Initialize CPU feature data.
|
||||
This file is part of the GNU C Library.
|
||||
- Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -144,6 +144,18 @@ __init_cpu_features (void)
|
||||
else
|
||||
kind = arch_kind_other;
|
||||
|
||||
+ if (__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & bit_AVX)
|
||||
+ {
|
||||
+ /* Reset the AVX bit in case OSXSAVE is disabled. */
|
||||
+ if ((__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & bit_OSXSAVE) != 0
|
||||
+ && ({ unsigned int xcrlow;
|
||||
+ unsigned int xcrhigh;
|
||||
+ asm ("xgetbv"
|
||||
+ : "=a" (xcrlow), "=d" (xcrhigh) : "c" (0));
|
||||
+ (xcrlow & 6) == 6; }))
|
||||
+ __cpu_features.feature[index_YMM_Usable] |= bit_YMM_Usable;
|
||||
+ }
|
||||
+
|
||||
__cpu_features.family = family;
|
||||
__cpu_features.model = model;
|
||||
atomic_write_barrier ();
|
||||
diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h
|
||||
index 2a1df39..2dc75ab 100644
|
||||
--- a/sysdeps/x86_64/multiarch/init-arch.h
|
||||
+++ b/sysdeps/x86_64/multiarch/init-arch.h
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This file is part of the GNU C Library.
|
||||
- Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
@@ -22,11 +22,13 @@
|
||||
#define bit_Prefer_SSE_for_memop (1 << 3)
|
||||
#define bit_Fast_Unaligned_Load (1 << 4)
|
||||
#define bit_Prefer_PMINUB_for_stringop (1 << 5)
|
||||
+#define bit_YMM_Usable (1 << 6)
|
||||
|
||||
#define bit_SSE2 (1 << 26)
|
||||
#define bit_SSSE3 (1 << 9)
|
||||
#define bit_SSE4_1 (1 << 19)
|
||||
#define bit_SSE4_2 (1 << 20)
|
||||
+#define bit_OSXSAVE (1 << 27)
|
||||
#define bit_AVX (1 << 28)
|
||||
#define bit_POPCOUNT (1 << 23)
|
||||
#define bit_FMA (1 << 12)
|
||||
@@ -48,6 +50,7 @@
|
||||
# define index_Prefer_SSE_for_memop FEATURE_INDEX_1*FEATURE_SIZE
|
||||
# define index_Fast_Unaligned_Load FEATURE_INDEX_1*FEATURE_SIZE
|
||||
# define index_Prefer_PMINUB_for_stringop FEATURE_INDEX_1*FEATURE_SIZE
|
||||
+# define index_YMM_Usable FEATURE_INDEX_1*FEATURE_SIZE
|
||||
|
||||
#else /* __ASSEMBLER__ */
|
||||
|
||||
@@ -92,7 +95,7 @@ extern struct cpu_features
|
||||
|
||||
|
||||
extern void __init_cpu_features (void) attribute_hidden;
|
||||
-#define INIT_ARCH()\
|
||||
+# define INIT_ARCH() \
|
||||
do \
|
||||
if (__cpu_features.kind == arch_kind_unknown) \
|
||||
__init_cpu_features (); \
|
||||
@@ -125,23 +128,21 @@ extern const struct cpu_features *__get_cpu_features (void)
|
||||
# define index_Slow_BSF FEATURE_INDEX_1
|
||||
# define index_Prefer_SSE_for_memop FEATURE_INDEX_1
|
||||
# define index_Fast_Unaligned_Load FEATURE_INDEX_1
|
||||
+# define index_YMM_Usable FEATURE_INDEX_1
|
||||
|
||||
-#define HAS_ARCH_FEATURE(idx, bit) \
|
||||
- ((__get_cpu_features ()->feature[idx] & (bit)) != 0)
|
||||
+# define HAS_ARCH_FEATURE(name) \
|
||||
+ ((__get_cpu_features ()->feature[index_##name] & (bit_##name)) != 0)
|
||||
|
||||
-#define HAS_FAST_REP_STRING \
|
||||
- HAS_ARCH_FEATURE (index_Fast_Rep_String, bit_Fast_Rep_String)
|
||||
+# define HAS_FAST_REP_STRING HAS_ARCH_FEATURE (Fast_Rep_String)
|
||||
|
||||
-#define HAS_FAST_COPY_BACKWARD \
|
||||
- HAS_ARCH_FEATURE (index_Fast_Copy_Backward, bit_Fast_Copy_Backward)
|
||||
+# define HAS_FAST_COPY_BACKWARD HAS_ARCH_FEATURE (Fast_Copy_Backward)
|
||||
|
||||
-#define HAS_SLOW_BSF \
|
||||
- HAS_ARCH_FEATURE (index_Slow_BSF, bit_Slow_BSF)
|
||||
+# define HAS_SLOW_BSF HAS_ARCH_FEATURE (Slow_BSF)
|
||||
|
||||
-#define HAS_PREFER_SSE_FOR_MEMOP \
|
||||
- HAS_ARCH_FEATURE (index_Prefer_SSE_for_memop, bit_Prefer_SSE_for_memop)
|
||||
+# define HAS_PREFER_SSE_FOR_MEMOP HAS_ARCH_FEATURE (Prefer_SSE_for_memop)
|
||||
|
||||
-#define HAS_FAST_UNALIGNED_LOAD \
|
||||
- HAS_ARCH_FEATURE (index_Fast_Unaligned_Load, bit_Fast_Unaligned_Load)
|
||||
+# define HAS_FAST_UNALIGNED_LOAD HAS_ARCH_FEATURE (Fast_Unaligned_Load)
|
||||
+
|
||||
+# define HAS_YMM_USABLE HAS_ARCH_FEATURE (YMM_Usable)
|
||||
|
||||
#endif /* __ASSEMBLER__ */
|
||||
--
|
||||
1.7.9
|
297
lib32-glibc/glibc-2.15-confstr-local-buffer-extent.patch
Normal file
297
lib32-glibc/glibc-2.15-confstr-local-buffer-extent.patch
Normal file
@ -0,0 +1,297 @@
|
||||
diff --git a/posix/confstr.c b/posix/confstr.c
|
||||
index 3c9566d..cad6561 100644
|
||||
--- a/posix/confstr.c
|
||||
+++ b/posix/confstr.c
|
||||
@@ -35,6 +34,10 @@ confstr (name, buf, len)
|
||||
const char *string = "";
|
||||
size_t string_len = 1;
|
||||
|
||||
+ /* Note that this buffer must be large enough for the longest strings
|
||||
+ used below. */
|
||||
+ char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"];
|
||||
+
|
||||
switch (name)
|
||||
{
|
||||
case _CS_PATH:
|
||||
@@ -53,59 +56,55 @@ confstr (name, buf, len)
|
||||
wint_t types are no greater than the width of type long.
|
||||
|
||||
Currently this means all environment which the system allows. */
|
||||
- {
|
||||
- char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"];
|
||||
-
|
||||
- string_len = 0;
|
||||
+ string_len = 0;
|
||||
#ifndef _POSIX_V7_ILP32_OFF32
|
||||
- if (__sysconf (_SC_V7_ILP32_OFF32) > 0)
|
||||
+ if (__sysconf (_SC_V7_ILP32_OFF32) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V7_ILP32_OFF32 || _POSIX_V7_ILP32_OFF32 > 0
|
||||
- {
|
||||
- memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32",
|
||||
- sizeof "POSIX_V7_ILP32_OFF32" - 1);
|
||||
- string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32",
|
||||
+ sizeof "POSIX_V7_ILP32_OFF32" - 1);
|
||||
+ string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _POSIX_V7_ILP32_OFFBIG
|
||||
- if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0)
|
||||
+ if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V7_ILP32_OFFBIG || _POSIX_V7_ILP32_OFFBIG > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG",
|
||||
- sizeof "POSIX_V7_ILP32_OFFBIG" - 1);
|
||||
- string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG",
|
||||
+ sizeof "POSIX_V7_ILP32_OFFBIG" - 1);
|
||||
+ string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _POSIX_V7_LP64_OFF64
|
||||
- if (__sysconf (_SC_V7_LP64_OFF64) > 0)
|
||||
+ if (__sysconf (_SC_V7_LP64_OFF64) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V7_LP64_OFF64 || _POSIX_V7_LP64_OFF64 > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64",
|
||||
- sizeof "POSIX_V7_LP64_OFF64" - 1);
|
||||
- string_len += sizeof "POSIX_V7_LP64_OFF64" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64",
|
||||
+ sizeof "POSIX_V7_LP64_OFF64" - 1);
|
||||
+ string_len += sizeof "POSIX_V7_LP64_OFF64" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _POSIX_V7_LPBIG_OFFBIG
|
||||
- if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0)
|
||||
+ if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V7_LPBIG_OFFBIG || _POSIX_V7_LPBIG_OFFBIG > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG",
|
||||
- sizeof "POSIX_V7_LPBIG_OFFBIG" - 1);
|
||||
- string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1;
|
||||
- }
|
||||
-#endif
|
||||
- restenvs[string_len++] = '\0';
|
||||
- string = restenvs;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG",
|
||||
+ sizeof "POSIX_V7_LPBIG_OFFBIG" - 1);
|
||||
+ string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1;
|
||||
+ }
|
||||
+#endif
|
||||
+ restenvs[string_len++] = '\0';
|
||||
+ string = restenvs;
|
||||
break;
|
||||
|
||||
case _CS_V6_WIDTH_RESTRICTED_ENVS:
|
||||
@@ -116,59 +115,55 @@ confstr (name, buf, len)
|
||||
wint_t types are no greater than the width of type long.
|
||||
|
||||
Currently this means all environment which the system allows. */
|
||||
- {
|
||||
- char restenvs[4 * sizeof "POSIX_V6_LPBIG_OFFBIG"];
|
||||
-
|
||||
- string_len = 0;
|
||||
+ string_len = 0;
|
||||
#ifndef _POSIX_V6_ILP32_OFF32
|
||||
- if (__sysconf (_SC_V6_ILP32_OFF32) > 0)
|
||||
+ if (__sysconf (_SC_V6_ILP32_OFF32) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V6_ILP32_OFF32 || _POSIX_V6_ILP32_OFF32 > 0
|
||||
- {
|
||||
- memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32",
|
||||
- sizeof "POSIX_V6_ILP32_OFF32" - 1);
|
||||
- string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32",
|
||||
+ sizeof "POSIX_V6_ILP32_OFF32" - 1);
|
||||
+ string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _POSIX_V6_ILP32_OFFBIG
|
||||
- if (__sysconf (_SC_V6_ILP32_OFFBIG) > 0)
|
||||
+ if (__sysconf (_SC_V6_ILP32_OFFBIG) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V6_ILP32_OFFBIG || _POSIX_V6_ILP32_OFFBIG > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG",
|
||||
- sizeof "POSIX_V6_ILP32_OFFBIG" - 1);
|
||||
- string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG",
|
||||
+ sizeof "POSIX_V6_ILP32_OFFBIG" - 1);
|
||||
+ string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _POSIX_V6_LP64_OFF64
|
||||
- if (__sysconf (_SC_V6_LP64_OFF64) > 0)
|
||||
+ if (__sysconf (_SC_V6_LP64_OFF64) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V6_LP64_OFF64 || _POSIX_V6_LP64_OFF64 > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64",
|
||||
- sizeof "POSIX_V6_LP64_OFF64" - 1);
|
||||
- string_len += sizeof "POSIX_V6_LP64_OFF64" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64",
|
||||
+ sizeof "POSIX_V6_LP64_OFF64" - 1);
|
||||
+ string_len += sizeof "POSIX_V6_LP64_OFF64" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _POSIX_V6_LPBIG_OFFBIG
|
||||
- if (__sysconf (_SC_V6_LPBIG_OFFBIG) > 0)
|
||||
+ if (__sysconf (_SC_V6_LPBIG_OFFBIG) > 0)
|
||||
#endif
|
||||
#if !defined _POSIX_V6_LPBIG_OFFBIG || _POSIX_V6_LPBIG_OFFBIG > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG",
|
||||
- sizeof "POSIX_V6_LPBIG_OFFBIG" - 1);
|
||||
- string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1;
|
||||
- }
|
||||
-#endif
|
||||
- restenvs[string_len++] = '\0';
|
||||
- string = restenvs;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG",
|
||||
+ sizeof "POSIX_V6_LPBIG_OFFBIG" - 1);
|
||||
+ string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1;
|
||||
+ }
|
||||
+#endif
|
||||
+ restenvs[string_len++] = '\0';
|
||||
+ string = restenvs;
|
||||
break;
|
||||
|
||||
case _CS_V5_WIDTH_RESTRICTED_ENVS:
|
||||
@@ -179,59 +174,55 @@ confstr (name, buf, len)
|
||||
wint_t types are no greater than the width of type long.
|
||||
|
||||
Currently this means all environment which the system allows. */
|
||||
- {
|
||||
- char restenvs[4 * sizeof "XBS5_LPBIG_OFFBIG"];
|
||||
-
|
||||
- string_len = 0;
|
||||
+ string_len = 0;
|
||||
#ifndef _XBS5_ILP32_OFF32
|
||||
- if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0)
|
||||
+ if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0)
|
||||
#endif
|
||||
#if !defined _XBS5_ILP32_OFF32 || _XBS5_ILP32_OFF32 > 0
|
||||
- {
|
||||
- memcpy (restenvs + string_len, "XBS5_ILP32_OFF32",
|
||||
- sizeof "XBS5_ILP32_OFF32" - 1);
|
||||
- string_len += sizeof "XBS5_ILP32_OFF32" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ memcpy (restenvs + string_len, "XBS5_ILP32_OFF32",
|
||||
+ sizeof "XBS5_ILP32_OFF32" - 1);
|
||||
+ string_len += sizeof "XBS5_ILP32_OFF32" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _XBS5_ILP32_OFFBIG
|
||||
- if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0)
|
||||
+ if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0)
|
||||
#endif
|
||||
#if !defined _XBS5_ILP32_OFFBIG || _XBS5_ILP32_OFFBIG > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG",
|
||||
- sizeof "XBS5_ILP32_OFFBIG" - 1);
|
||||
- string_len += sizeof "XBS5_ILP32_OFFBIG" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG",
|
||||
+ sizeof "XBS5_ILP32_OFFBIG" - 1);
|
||||
+ string_len += sizeof "XBS5_ILP32_OFFBIG" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _XBS5_LP64_OFF64
|
||||
- if (__sysconf (_SC_XBS5_LP64_OFF64) > 0)
|
||||
+ if (__sysconf (_SC_XBS5_LP64_OFF64) > 0)
|
||||
#endif
|
||||
#if !defined _XBS5_LP64_OFF64 || _XBS5_LP64_OFF64 > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "XBS5_LP64_OFF64",
|
||||
- sizeof "XBS5_LP64_OFF64" - 1);
|
||||
- string_len += sizeof "XBS5_LP64_OFF64" - 1;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "XBS5_LP64_OFF64",
|
||||
+ sizeof "XBS5_LP64_OFF64" - 1);
|
||||
+ string_len += sizeof "XBS5_LP64_OFF64" - 1;
|
||||
+ }
|
||||
#endif
|
||||
#ifndef _XBS5_LPBIG_OFFBIG
|
||||
- if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0)
|
||||
+ if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0)
|
||||
#endif
|
||||
#if !defined _XBS5_LPBIG_OFFBIG || _XBS5_LPBIG_OFFBIG > 0
|
||||
- {
|
||||
- if (string_len)
|
||||
- restenvs[string_len++] = '\n';
|
||||
- memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG",
|
||||
- sizeof "XBS5_LPBIG_OFFBIG" - 1);
|
||||
- string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1;
|
||||
- }
|
||||
-#endif
|
||||
- restenvs[string_len++] = '\0';
|
||||
- string = restenvs;
|
||||
- }
|
||||
+ {
|
||||
+ if (string_len)
|
||||
+ restenvs[string_len++] = '\n';
|
||||
+ memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG",
|
||||
+ sizeof "XBS5_LPBIG_OFFBIG" - 1);
|
||||
+ string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1;
|
||||
+ }
|
||||
+#endif
|
||||
+ restenvs[string_len++] = '\0';
|
||||
+ string = restenvs;
|
||||
break;
|
||||
|
||||
case _CS_XBS5_ILP32_OFF32_CFLAGS:
|
20
lib32-glibc/glibc-2.15-do-not-install-timezone-files-2.patch
Normal file
20
lib32-glibc/glibc-2.15-do-not-install-timezone-files-2.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff --git a/timezone/Makefile b/timezone/Makefile
|
||||
index 00bfba6..9e55a6a 100644
|
||||
--- a/timezone/Makefile
|
||||
+++ b/timezone/Makefile
|
||||
@@ -45,7 +45,6 @@ include ../Makeconfig # Get objpfx defined so we can use it below.
|
||||
CPPFLAGS-zic = -DNOT_IN_libc
|
||||
|
||||
ifeq ($(have-ksh),yes)
|
||||
-install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
|
||||
install-bin-script = tzselect
|
||||
generated += tzselect
|
||||
endif
|
||||
@@ -111,7 +110,3 @@ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
|
||||
-e 's%@TZDIR@%$(zonedir)%g' < $< > $@.new
|
||||
chmod 555 $@.new
|
||||
mv -f $@.new $@
|
||||
-
|
||||
-$(addprefix $(inst_zonedir)/,iso3166.tab zone.tab): \
|
||||
- $(inst_zonedir)/%: % $(+force)
|
||||
- $(do-install)
|
124
lib32-glibc/glibc-2.15-do-not-install-timezone-files.patch
Normal file
124
lib32-glibc/glibc-2.15-do-not-install-timezone-files.patch
Normal file
@ -0,0 +1,124 @@
|
||||
diff --git a/timezone/Makefile b/timezone/Makefile
|
||||
index e8fb716..d5ea538 100644
|
||||
--- a/timezone/Makefile
|
||||
+++ b/timezone/Makefile
|
||||
@@ -1,4 +1,4 @@
|
||||
-# Copyright (C) 1998,1999,2000,2002,2005,2007 Free Software Foundation, Inc.
|
||||
+# Copyright (C) 1998-2000,2002,2005,2007,2012 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -49,33 +49,6 @@ include ../Makeconfig # Get objpfx defined so we can use it below.
|
||||
|
||||
CPPFLAGS-zic = -DNOT_IN_libc
|
||||
|
||||
-# z.* use this variable.
|
||||
-define nl
|
||||
-
|
||||
-
|
||||
-endef
|
||||
-ifndef avoid-generated
|
||||
-ifndef inhibit_timezone_rules
|
||||
--include $(addprefix $(objpfx)z.,$(tzfiles))
|
||||
-endif
|
||||
-endif
|
||||
-
|
||||
-# Make these absolute file names.
|
||||
-installed-localtime-file := $(firstword $(filter /%,$(inst_localtime-file)) \
|
||||
- $(addprefix $(inst_zonedir)/, \
|
||||
- $(localtime-file)))
|
||||
-installed-posixrules-file := $(firstword $(filter /%,$(posixrules-file)) \
|
||||
- $(addprefix $(inst_zonedir)/, \
|
||||
- $(posixrules-file)))
|
||||
-
|
||||
-ifeq ($(cross-compiling),no)
|
||||
-# Don't try to install the zoneinfo files since we can't run zic.
|
||||
-install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
|
||||
- $(zonenames:%=posix/%) \
|
||||
- $(zonenames:%=right/%)) \
|
||||
- $(installed-localtime-file) $(installed-posixrules-file)
|
||||
-endif
|
||||
-
|
||||
ifeq ($(have-ksh),yes)
|
||||
install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
|
||||
install-bin-script = tzselect
|
||||
@@ -85,79 +58,6 @@ endif
|
||||
include ../Rules
|
||||
|
||||
|
||||
-$(tzfiles:%=$(objpfx)z.%): $(objpfx)z.%: % Makefile
|
||||
-# Kludge alert: we use an implicit rule (in what we are generating here)
|
||||
-# because that is the only way to tell Make that the one command builds all
|
||||
-# the files.
|
||||
-# The extra kludge for the $(tzlinks) files is necessary since running zic
|
||||
-# this file requires all other files to exist. Blech!
|
||||
- $(make-target-directory)
|
||||
- (echo 'define $*-zones' ;\
|
||||
- $(AWK) '$$1 == "Zone" { print $$2 } $$1 == "Link" { print $$3 }' $^ ;\
|
||||
- echo 'endef' ;\
|
||||
- echo '$*-zones := $$(subst $$(nl), ,$$($*-zones))' ;\
|
||||
- echo 'ifdef $*-zones' ;\
|
||||
- if test x$(findstring $*, $(tzlinks)) != x; then \
|
||||
- echo '$$(addprefix $$(inst_zonedir)/right/,$$($*-zones)): \';\
|
||||
- echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_zonedir)/right/,$$($$t-zones)))' ;\
|
||||
- echo '$$(addprefix $$(inst_zonedir)/posix/,$$($*-zones)): \';\
|
||||
- echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_zonedir)/posix/,$$($$t-zones)))' ;\
|
||||
- echo '$$(addprefix $$(inst_zonedir)/,$$($*-zones)): \' ;\
|
||||
- echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_zonedir)/,$$($$t-zones)))' ;\
|
||||
- fi ;\
|
||||
- echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/right/,$$($*-zones)): \' ;\
|
||||
- echo '$< $$(objpfx)zic leapseconds yearistype' ;\
|
||||
- echo ' $$(tzcompile)' ;\
|
||||
- echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/posix/,$$($*-zones)): \' ;\
|
||||
- echo '$< $$(objpfx)zic /dev/null yearistype' ;\
|
||||
- echo ' $$(tzcompile)' ;\
|
||||
- echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/,$$($*-zones)): \' ;\
|
||||
- echo '$< $$(objpfx)zic $$(leapseconds) yearistype' ;\
|
||||
- echo ' $$(tzcompile)' ;\
|
||||
- echo 'endif' ;\
|
||||
- echo 'zonenames := $$(zonenames) $$($*-zones)' ;\
|
||||
- ) > $@.new
|
||||
- mv $@.new $@
|
||||
-
|
||||
-.PHONY: echo-zonenames
|
||||
-echo-zonenames:
|
||||
- @echo 'Known zones: $(zonenames)'
|
||||
-
|
||||
-
|
||||
-# We have to use `-d $(inst_zonedir)' to explictly tell zic where to
|
||||
-# place the output files although $(zonedir) is compiled in. But the
|
||||
-# user might have set $(install_root) on the command line of `make install'.
|
||||
-zic-cmd = $(built-program-cmd) -d $(inst_zonedir)
|
||||
-tzcompile = $(zic-cmd)$(target-zone-flavor) -L $(word 3,$^) \
|
||||
- -y $(dir $(word 4,$^))$(notdir $(word 4,$^)) $<
|
||||
-
|
||||
-# The source files specify the zone names relative to the -d directory,
|
||||
-# so for the posix/ and right/ flavors we need to pass -d $(inst_zonedir)/posix
|
||||
-# and the like. This magic extracts /posix or /right if it's the first
|
||||
-# component after $(inst_zonedir) in the target name $@.
|
||||
-target-zone-flavor = $(filter /posix /right, \
|
||||
- /$(firstword $(subst /, , \
|
||||
- $(patsubst $(inst_zonedir)/%,%,$@))))
|
||||
-
|
||||
-ifdef localtime
|
||||
-$(installed-localtime-file): $(inst_zonedir)/$(localtime) $(objpfx)zic \
|
||||
- $(+force)
|
||||
- $(make-target-directory)
|
||||
- if test -r $@; then \
|
||||
- echo Site timezone NOT reset to Factory.; \
|
||||
- else \
|
||||
- rm -f $@T; \
|
||||
- $(SHELL) $(..)scripts/rellns-sh $< $@T; \
|
||||
- mv -f $@T $@; \
|
||||
- fi
|
||||
-endif
|
||||
-ifdef posixrules
|
||||
-$(installed-posixrules-file): $(inst_zonedir)/$(posixrules) $(objpfx)zic \
|
||||
- $(+force)
|
||||
- $(zic-cmd) -p $(posixrules)
|
||||
-endif
|
||||
-
|
||||
-
|
||||
$(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o
|
||||
|
||||
tz-cflags = -DTZDIR='"$(zonedir)"' \
|
20
lib32-glibc/glibc-2.15-feraiseexcept-plt.patch
Normal file
20
lib32-glibc/glibc-2.15-feraiseexcept-plt.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff --git a/sysdeps/i386/fpu/feupdateenv.c b/sysdeps/i386/fpu/feupdateenv.c
|
||||
index 70f9ee2..6e2ce35 100644
|
||||
--- a/sysdeps/i386/fpu/feupdateenv.c
|
||||
+++ b/sysdeps/i386/fpu/feupdateenv.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Install given floating-point environment and raise exceptions.
|
||||
- Copyright (C) 1997,99,2000,01,07,2010 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1997,99,2000,01,07,2010,2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||
|
||||
@@ -44,7 +44,7 @@ __feupdateenv (const fenv_t *envp)
|
||||
/* Raise the saved exception. Incidently for us the implementation
|
||||
defined format of the values in objects of type fexcept_t is the
|
||||
same as the ones specified using the FE_* constants. */
|
||||
- feraiseexcept ((int) temp);
|
||||
+ __feraiseexcept ((int) temp);
|
||||
|
||||
/* Success. */
|
||||
return 0;
|
51
lib32-glibc/glibc-2.15-fix-res_query-assert.patch
Normal file
51
lib32-glibc/glibc-2.15-fix-res_query-assert.patch
Normal file
@ -0,0 +1,51 @@
|
||||
--- a/resolv/res_query.c
|
||||
+++ a/resolv/res_query.c
|
||||
@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp,
|
||||
int *resplen2)
|
||||
{
|
||||
HEADER *hp = (HEADER *) answer;
|
||||
+ HEADER *hp2;
|
||||
int n, use_malloc = 0;
|
||||
u_int oflags = statp->_flags;
|
||||
|
||||
@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp,
|
||||
/* __libc_res_nsend might have reallocated the buffer. */
|
||||
hp = (HEADER *) *answerp;
|
||||
|
||||
- /* We simplify the following tests by assigning HP to HP2. It
|
||||
- is easy to verify that this is the same as ignoring all
|
||||
- tests of HP2. */
|
||||
- HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
|
||||
-
|
||||
- if (n < (int) sizeof (HEADER) && answerp2 != NULL
|
||||
- && *resplen2 > (int) sizeof (HEADER))
|
||||
+ /* We simplify the following tests by assigning HP to HP2 or
|
||||
+ vice versa. It is easy to verify that this is the same as
|
||||
+ ignoring all tests of HP or HP2. */
|
||||
+ if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER))
|
||||
{
|
||||
- /* Special case of partial answer. */
|
||||
- assert (hp != hp2);
|
||||
- hp = hp2;
|
||||
+ hp2 = hp;
|
||||
}
|
||||
- else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
|
||||
- && n > (int) sizeof (HEADER))
|
||||
+ else
|
||||
{
|
||||
- /* Special case of partial answer. */
|
||||
- assert (hp != hp2);
|
||||
- hp2 = hp;
|
||||
+ hp2 = (HEADER *) *answerp2;
|
||||
+ if (n < (int) sizeof (HEADER))
|
||||
+ {
|
||||
+ hp = hp2;
|
||||
+ }
|
||||
}
|
||||
|
||||
+ /* Make sure both hp and hp2 are defined */
|
||||
+ assert((hp != NULL) && (hp2 != NULL));
|
||||
+
|
||||
if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
|
||||
&& (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {
|
||||
#ifdef DEBUG
|
148
lib32-glibc/glibc-2.15-fmtmsg-locking.patch
Normal file
148
lib32-glibc/glibc-2.15-fmtmsg-locking.patch
Normal file
@ -0,0 +1,148 @@
|
||||
diff --git a/stdlib/fmtmsg.c b/stdlib/fmtmsg.c
|
||||
index 9203317..4c02302 100644
|
||||
--- a/stdlib/fmtmsg.c
|
||||
+++ b/stdlib/fmtmsg.c
|
||||
@@ -103,7 +103,6 @@ fmtmsg (long int classification, const char *label, int severity,
|
||||
const char *text, const char *action, const char *tag)
|
||||
{
|
||||
__libc_once_define (static, once);
|
||||
- int result = MM_OK;
|
||||
struct severity_info *severity_rec;
|
||||
|
||||
/* Make sure everything is initialized. */
|
||||
@@ -124,17 +123,6 @@ fmtmsg (long int classification, const char *label, int severity,
|
||||
return MM_NOTOK;
|
||||
}
|
||||
|
||||
- for (severity_rec = severity_list; severity_rec != NULL;
|
||||
- severity_rec = severity_rec->next)
|
||||
- if (severity == severity_rec->severity)
|
||||
- /* Bingo. */
|
||||
- break;
|
||||
-
|
||||
- /* If we don't know anything about the severity level return an error. */
|
||||
- if (severity_rec == NULL)
|
||||
- return MM_NOTOK;
|
||||
-
|
||||
-
|
||||
#ifdef __libc_ptf_call
|
||||
/* We do not want this call to be cut short by a thread
|
||||
cancellation. Therefore disable cancellation for now. */
|
||||
@@ -143,54 +131,73 @@ fmtmsg (long int classification, const char *label, int severity,
|
||||
0);
|
||||
#endif
|
||||
|
||||
- /* Now we can print. */
|
||||
- if (classification & MM_PRINT)
|
||||
- {
|
||||
- int do_label = (print & label_mask) && label != MM_NULLLBL;
|
||||
- int do_severity = (print & severity_mask) && severity != MM_NULLSEV;
|
||||
- int do_text = (print & text_mask) && text != MM_NULLTXT;
|
||||
- int do_action = (print & action_mask) && action != MM_NULLACT;
|
||||
- int do_tag = (print & tag_mask) && tag != MM_NULLTAG;
|
||||
-
|
||||
- if (__fxprintf (stderr, "%s%s%s%s%s%s%s%s%s%s\n",
|
||||
- do_label ? label : "",
|
||||
- do_label && (do_severity | do_text | do_action | do_tag)
|
||||
- ? ": " : "",
|
||||
- do_severity ? severity_rec->string : "",
|
||||
- do_severity && (do_text | do_action | do_tag)
|
||||
- ? ": " : "",
|
||||
- do_text ? text : "",
|
||||
- do_text && (do_action | do_tag) ? "\n" : "",
|
||||
- do_action ? "TO FIX: " : "",
|
||||
- do_action ? action : "",
|
||||
- do_action && do_tag ? " " : "",
|
||||
- do_tag ? tag : "") < 0)
|
||||
- /* Oh, oh. An error occurred during the output. */
|
||||
- result = MM_NOMSG;
|
||||
- }
|
||||
+ __libc_lock_lock (lock);
|
||||
|
||||
- if (classification & MM_CONSOLE)
|
||||
+ for (severity_rec = severity_list; severity_rec != NULL;
|
||||
+ severity_rec = severity_rec->next)
|
||||
+ if (severity == severity_rec->severity)
|
||||
+ /* Bingo. */
|
||||
+ break;
|
||||
+
|
||||
+ /* If we don't know anything about the severity level return an error. */
|
||||
+ int result = MM_NOTOK;
|
||||
+ if (severity_rec != NULL)
|
||||
{
|
||||
- int do_label = label != MM_NULLLBL;
|
||||
- int do_severity = severity != MM_NULLSEV;
|
||||
- int do_text = text != MM_NULLTXT;
|
||||
- int do_action = action != MM_NULLACT;
|
||||
- int do_tag = tag != MM_NULLTAG;
|
||||
-
|
||||
- syslog (LOG_ERR, "%s%s%s%s%s%s%s%s%s%s\n",
|
||||
- do_label ? label : "",
|
||||
- do_label && (do_severity | do_text | do_action | do_tag)
|
||||
- ? ": " : "",
|
||||
- do_severity ? severity_rec->string : "",
|
||||
- do_severity && (do_text | do_action | do_tag) ? ": " : "",
|
||||
- do_text ? text : "",
|
||||
- do_text && (do_action | do_tag) ? "\n" : "",
|
||||
- do_action ? "TO FIX: " : "",
|
||||
- do_action ? action : "",
|
||||
- do_action && do_tag ? " " : "",
|
||||
- do_tag ? tag : "");
|
||||
+ result = MM_OK;
|
||||
+
|
||||
+ /* Now we can print. */
|
||||
+ if (classification & MM_PRINT)
|
||||
+ {
|
||||
+ int do_label = (print & label_mask) && label != MM_NULLLBL;
|
||||
+ int do_severity = (print & severity_mask) && severity != MM_NULLSEV;
|
||||
+ int do_text = (print & text_mask) && text != MM_NULLTXT;
|
||||
+ int do_action = (print & action_mask) && action != MM_NULLACT;
|
||||
+ int do_tag = (print & tag_mask) && tag != MM_NULLTAG;
|
||||
+ int need_colon = (do_label
|
||||
+ && (do_severity | do_text | do_action | do_tag));
|
||||
+
|
||||
+ if (__fxprintf (stderr, "%s%s%s%s%s%s%s%s%s%s\n",
|
||||
+ do_label ? label : "",
|
||||
+ need_colon ? ": " : "",
|
||||
+ do_severity ? severity_rec->string : "",
|
||||
+ do_severity && (do_text | do_action | do_tag)
|
||||
+ ? ": " : "",
|
||||
+ do_text ? text : "",
|
||||
+ do_text && (do_action | do_tag) ? "\n" : "",
|
||||
+ do_action ? "TO FIX: " : "",
|
||||
+ do_action ? action : "",
|
||||
+ do_action && do_tag ? " " : "",
|
||||
+ do_tag ? tag : "") < 0)
|
||||
+ /* Oh, oh. An error occurred during the output. */
|
||||
+ result = MM_NOMSG;
|
||||
+ }
|
||||
+
|
||||
+ if (classification & MM_CONSOLE)
|
||||
+ {
|
||||
+ int do_label = label != MM_NULLLBL;
|
||||
+ int do_severity = severity != MM_NULLSEV;
|
||||
+ int do_text = text != MM_NULLTXT;
|
||||
+ int do_action = action != MM_NULLACT;
|
||||
+ int do_tag = tag != MM_NULLTAG;
|
||||
+ int need_colon = (do_label
|
||||
+ && (do_severity | do_text | do_action | do_tag));
|
||||
+
|
||||
+ syslog (LOG_ERR, "%s%s%s%s%s%s%s%s%s%s\n",
|
||||
+ do_label ? label : "",
|
||||
+ need_colon ? ": " : "",
|
||||
+ do_severity ? severity_rec->string : "",
|
||||
+ do_severity && (do_text | do_action | do_tag) ? ": " : "",
|
||||
+ do_text ? text : "",
|
||||
+ do_text && (do_action | do_tag) ? "\n" : "",
|
||||
+ do_action ? "TO FIX: " : "",
|
||||
+ do_action ? action : "",
|
||||
+ do_action && do_tag ? " " : "",
|
||||
+ do_tag ? tag : "");
|
||||
+ }
|
||||
}
|
||||
|
||||
+ __libc_lock_unlock (lock);
|
||||
+
|
||||
#ifdef __libc_ptf_call
|
||||
__libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
|
||||
#endif
|
49080
lib32-glibc/glibc-2.15-gb18030.patch
Normal file
49080
lib32-glibc/glibc-2.15-gb18030.patch
Normal file
File diff suppressed because it is too large
Load Diff
262
lib32-glibc/glibc-2.15-ifunc.patch
Normal file
262
lib32-glibc/glibc-2.15-ifunc.patch
Normal file
@ -0,0 +1,262 @@
|
||||
diff --git a/Makeconfig b/Makeconfig
|
||||
index 2db2821..68547b2 100644
|
||||
--- a/Makeconfig
|
||||
+++ b/Makeconfig
|
||||
@@ -900,6 +900,12 @@ else
|
||||
libdl = $(common-objpfx)dlfcn/libdl.a
|
||||
endif
|
||||
|
||||
+ifeq ($(build-shared),yes)
|
||||
+libm = $(common-objpfx)math/libm.so$(libm.so-version)
|
||||
+else
|
||||
+libm = $(common-objpfx)math/libm.a
|
||||
+endif
|
||||
+
|
||||
# These are the subdirectories containing the library source. The order
|
||||
# is more or less arbitrary. The sorting step will take care of the
|
||||
# dependencies.
|
||||
diff --git a/elf/Makefile b/elf/Makefile
|
||||
index 052e763..3f1772a 100644
|
||||
--- a/elf/Makefile
|
||||
+++ b/elf/Makefile
|
||||
@@ -124,7 +124,8 @@ distribute := rtld-Rules \
|
||||
tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
|
||||
tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
|
||||
tst-initorder.c \
|
||||
- tst-initorder2.c
|
||||
+ tst-initorder2.c \
|
||||
+ tst-relsort1.c tst-relsort1mod1.c tst-relsort1mod2.c
|
||||
|
||||
CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
|
||||
@@ -227,7 +228,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
|
||||
tst-audit1 tst-audit2 \
|
||||
tst-stackguard1 tst-addr1 tst-thrlock \
|
||||
tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
|
||||
- tst-initorder tst-initorder2
|
||||
+ tst-initorder tst-initorder2 tst-relsort1
|
||||
# reldep9
|
||||
test-srcs = tst-pathopt
|
||||
selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
|
||||
@@ -290,7 +291,9 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
|
||||
tst-initordera1 tst-initorderb1 \
|
||||
tst-initordera2 tst-initorderb2 \
|
||||
tst-initordera3 tst-initordera4 \
|
||||
- tst-initorder2a tst-initorder2b tst-initorder2c tst-initorder2d
|
||||
+ tst-initorder2a tst-initorder2b tst-initorder2c \
|
||||
+ tst-initorder2d \
|
||||
+ tst-relsort1mod1 tst-relsort1mod2
|
||||
ifeq (yes,$(have-initfini-array))
|
||||
modules-names += tst-array2dep tst-array5dep
|
||||
endif
|
||||
@@ -1195,3 +1198,9 @@ CFLAGS-tst-auditmod6b.c += $(AVX-CFLAGS)
|
||||
CFLAGS-tst-auditmod6c.c += $(AVX-CFLAGS)
|
||||
CFLAGS-tst-auditmod7b.c += $(AVX-CFLAGS)
|
||||
endif
|
||||
+
|
||||
+$(objpfx)tst-relsort1: $(libdl)
|
||||
+$(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so
|
||||
+$(objpfx)tst-relsort1mod2.so: $(libm)
|
||||
+$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
|
||||
+ $(objpfx)tst-relsort1mod2.so
|
||||
diff --git a/elf/dl-open.c b/elf/dl-open.c
|
||||
index a0b5c50..a56bdc1 100644
|
||||
--- a/elf/dl-open.c
|
||||
+++ b/elf/dl-open.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Load a shared object at runtime, relocate it, and run its initializer.
|
||||
- Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1996-2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -302,45 +302,109 @@ dl_open_worker (void *a)
|
||||
if (GLRO(dl_lazy))
|
||||
reloc_mode |= mode & RTLD_LAZY;
|
||||
|
||||
- /* Relocate the objects loaded. We do this in reverse order so that copy
|
||||
- relocs of earlier objects overwrite the data written by later objects. */
|
||||
-
|
||||
+ /* Sort the objects by dependency for the relocation process. This
|
||||
+ allows IFUNC relocations to work and it also means copy
|
||||
+ relocation of dependencies are if necessary overwritten. */
|
||||
+ size_t nmaps = 0;
|
||||
struct link_map *l = new;
|
||||
- while (l->l_next)
|
||||
- l = l->l_next;
|
||||
- while (1)
|
||||
+ do
|
||||
+ {
|
||||
+ if (! l->l_real->l_relocated)
|
||||
+ ++nmaps;
|
||||
+ l = l->l_next;
|
||||
+ }
|
||||
+ while (l != NULL);
|
||||
+ struct link_map *maps[nmaps];
|
||||
+ nmaps = 0;
|
||||
+ l = new;
|
||||
+ do
|
||||
{
|
||||
if (! l->l_real->l_relocated)
|
||||
+ maps[nmaps++] = l;
|
||||
+ l = l->l_next;
|
||||
+ }
|
||||
+ while (l != NULL);
|
||||
+ if (nmaps > 1)
|
||||
+ {
|
||||
+ char seen[nmaps];
|
||||
+ memset (seen, '\0', nmaps);
|
||||
+ size_t i = 0;
|
||||
+ while (1)
|
||||
{
|
||||
-#ifdef SHARED
|
||||
- if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
|
||||
+ ++seen[i];
|
||||
+ struct link_map *thisp = maps[i];
|
||||
+
|
||||
+ /* Find the last object in the list for which the current one is
|
||||
+ a dependency and move the current object behind the object
|
||||
+ with the dependency. */
|
||||
+ size_t k = nmaps - 1;
|
||||
+ while (k > i)
|
||||
{
|
||||
- /* If this here is the shared object which we want to profile
|
||||
- make sure the profile is started. We can find out whether
|
||||
- this is necessary or not by observing the `_dl_profile_map'
|
||||
- variable. If was NULL but is not NULL afterwars we must
|
||||
- start the profiling. */
|
||||
- struct link_map *old_profile_map = GL(dl_profile_map);
|
||||
+ struct link_map **runp = maps[k]->l_initfini;
|
||||
+ if (runp != NULL)
|
||||
+ /* Look through the dependencies of the object. */
|
||||
+ while (*runp != NULL)
|
||||
+ if (__builtin_expect (*runp++ == thisp, 0))
|
||||
+ {
|
||||
+ /* Move the current object to the back past the last
|
||||
+ object with it as the dependency. */
|
||||
+ memmove (&maps[i], &maps[i + 1],
|
||||
+ (k - i) * sizeof (maps[0]));
|
||||
+ maps[k] = thisp;
|
||||
+
|
||||
+ if (seen[i + 1] > 1)
|
||||
+ {
|
||||
+ ++i;
|
||||
+ goto next_clear;
|
||||
+ }
|
||||
+
|
||||
+ char this_seen = seen[i];
|
||||
+ memmove (&seen[i], &seen[i + 1],
|
||||
+ (k - i) * sizeof (seen[0]));
|
||||
+ seen[k] = this_seen;
|
||||
+
|
||||
+ goto next;
|
||||
+ }
|
||||
+
|
||||
+ --k;
|
||||
+ }
|
||||
|
||||
- _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
|
||||
+ if (++i == nmaps)
|
||||
+ break;
|
||||
+ next_clear:
|
||||
+ memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0]));
|
||||
+ next:;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
|
||||
- {
|
||||
- /* We must prepare the profiling. */
|
||||
- _dl_start_profile ();
|
||||
+ for (size_t i = nmaps; i-- > 0; )
|
||||
+ {
|
||||
+ l = maps[i];
|
||||
|
||||
- /* Prevent unloading the object. */
|
||||
- GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
|
||||
- }
|
||||
+#ifdef SHARED
|
||||
+ if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
|
||||
+ {
|
||||
+ /* If this here is the shared object which we want to profile
|
||||
+ make sure the profile is started. We can find out whether
|
||||
+ this is necessary or not by observing the `_dl_profile_map'
|
||||
+ variable. If it was NULL but is not NULL afterwars we must
|
||||
+ start the profiling. */
|
||||
+ struct link_map *old_profile_map = GL(dl_profile_map);
|
||||
+
|
||||
+ _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
|
||||
+
|
||||
+ if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
|
||||
+ {
|
||||
+ /* We must prepare the profiling. */
|
||||
+ _dl_start_profile ();
|
||||
+
|
||||
+ /* Prevent unloading the object. */
|
||||
+ GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
|
||||
}
|
||||
- else
|
||||
-#endif
|
||||
- _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
|
||||
}
|
||||
-
|
||||
- if (l == new)
|
||||
- break;
|
||||
- l = l->l_prev;
|
||||
+ else
|
||||
+#endif
|
||||
+ _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
|
||||
}
|
||||
|
||||
/* If the file is not loaded now as a dependency, add the search
|
||||
diff --git a/elf/tst-relsort1.c b/elf/tst-relsort1.c
|
||||
new file mode 100644
|
||||
index 0000000..972100c
|
||||
--- /dev/null
|
||||
+++ b/elf/tst-relsort1.c
|
||||
@@ -0,0 +1,19 @@
|
||||
+#include <dlfcn.h>
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+do_test ()
|
||||
+{
|
||||
+ const char lib[] = "$ORIGIN/tst-relsort1mod1.so";
|
||||
+ void *h = dlopen (lib, RTLD_NOW);
|
||||
+ if (h == NULL)
|
||||
+ {
|
||||
+ puts (dlerror ());
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#define TEST_FUNCTION do_test ()
|
||||
+#include "../test-skeleton.c"
|
||||
diff --git a/elf/tst-relsort1mod1.c b/elf/tst-relsort1mod1.c
|
||||
new file mode 100644
|
||||
index 0000000..9e4a943
|
||||
--- /dev/null
|
||||
+++ b/elf/tst-relsort1mod1.c
|
||||
@@ -0,0 +1,7 @@
|
||||
+extern int foo (double);
|
||||
+
|
||||
+int
|
||||
+bar (void)
|
||||
+{
|
||||
+ return foo (1.2);
|
||||
+}
|
||||
diff --git a/elf/tst-relsort1mod2.c b/elf/tst-relsort1mod2.c
|
||||
new file mode 100644
|
||||
index 0000000..a2c3e55
|
||||
--- /dev/null
|
||||
+++ b/elf/tst-relsort1mod2.c
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <math.h>
|
||||
+
|
||||
+int
|
||||
+foo (double d)
|
||||
+{
|
||||
+ return floor (d) != 0.0;
|
||||
+}
|
26
lib32-glibc/glibc-2.15-lddebug-scopes.patch
Normal file
26
lib32-glibc/glibc-2.15-lddebug-scopes.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 0c95ab64cb4ec0d22bb222647d9d20c7b4903e38 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Fri, 7 Oct 2011 09:31:27 +0200
|
||||
Subject: [PATCH] Horrible workaround for horribly broken software
|
||||
|
||||
---
|
||||
elf/rtld.c | 4 +++-
|
||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/elf/rtld.c b/elf/rtld.c
|
||||
index 978c609..8422b9f 100644
|
||||
--- a/elf/rtld.c
|
||||
+++ b/elf/rtld.c
|
||||
@@ -1393,7 +1393,9 @@ of this helper program; chances are you did not intend to run this program.\n\
|
||||
char *copy = malloc (len);
|
||||
if (copy == NULL)
|
||||
_dl_fatal_printf ("out of memory\n");
|
||||
- l->l_libname->name = l->l_name = memcpy (copy, dsoname, len);
|
||||
+ l->l_libname->name = memcpy (copy, dsoname, len);
|
||||
+ if (GLRO(dl_debug_mask))
|
||||
+ l->l_name = copy;
|
||||
}
|
||||
|
||||
/* Add the vDSO to the object list. */
|
||||
--
|
||||
1.7.3.4
|
39
lib32-glibc/glibc-2.15-multiarch-x86-strcmp.patch
Normal file
39
lib32-glibc/glibc-2.15-multiarch-x86-strcmp.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff --git a/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c b/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c
|
||||
index d10e872..d4fcd2b 100644
|
||||
--- a/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c
|
||||
+++ b/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c
|
||||
@@ -6,6 +6,8 @@ extern __typeof (strcasecmp_l) __strcasecmp_l_nonascii;
|
||||
#define USE_IN_EXTENDED_LOCALE_MODEL 1
|
||||
#include <string/strcasecmp.c>
|
||||
|
||||
+strong_alias (__strcasecmp_l_nonascii, __strcasecmp_l_ia32)
|
||||
+
|
||||
/* The needs of strcasecmp in libc are minimal, no need to go through
|
||||
the IFUNC. */
|
||||
strong_alias (__strcasecmp_l_nonascii, __GI___strcasecmp_l)
|
||||
diff --git a/sysdeps/i386/i686/multiarch/strcmp.S b/sysdeps/i386/i686/multiarch/strcmp.S
|
||||
index 5410d17..b3b9eb8 100644
|
||||
--- a/sysdeps/i386/i686/multiarch/strcmp.S
|
||||
+++ b/sysdeps/i386/i686/multiarch/strcmp.S
|
||||
@@ -111,6 +111,7 @@ END(STRCMP)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-#ifndef USE_AS_STRNCMP
|
||||
+#if !defined USE_AS_STRNCMP && !defined USE_AS_STRCASECMP_L \
|
||||
+ && !defined USE_AS_STRNCASECMP_L
|
||||
# include "../strcmp.S"
|
||||
#endif
|
||||
diff --git a/sysdeps/i386/i686/multiarch/strncase_l-c.c b/sysdeps/i386/i686/multiarch/strncase_l-c.c
|
||||
index 0c68b8d..7e601af 100644
|
||||
--- a/sysdeps/i386/i686/multiarch/strncase_l-c.c
|
||||
+++ b/sysdeps/i386/i686/multiarch/strncase_l-c.c
|
||||
@@ -6,6 +6,8 @@ extern __typeof (strncasecmp_l) __strncasecmp_l_nonascii;
|
||||
#define USE_IN_EXTENDED_LOCALE_MODEL 1
|
||||
#include <string/strncase.c>
|
||||
|
||||
+strong_alias (__strncasecmp_l_nonascii, __strncasecmp_l_ia32)
|
||||
+
|
||||
/* The needs of strcasecmp in libc are minimal, no need to go through
|
||||
the IFUNC. */
|
||||
strong_alias (__strncasecmp_l_nonascii, __GI___strncasecmp_l)
|
75
lib32-glibc/glibc-2.15-nearbyintf-rounding.patch
Normal file
75
lib32-glibc/glibc-2.15-nearbyintf-rounding.patch
Normal file
@ -0,0 +1,75 @@
|
||||
diff --git a/math/libm-test.inc b/math/libm-test.inc
|
||||
index c8186c8..1016753 100644
|
||||
--- a/math/libm-test.inc
|
||||
+++ b/math/libm-test.inc
|
||||
@@ -4632,6 +4632,29 @@ nearbyint_test (void)
|
||||
TEST_f_f (nearbyint, 524286.75, 524287.0);
|
||||
TEST_f_f (nearbyint, 524288.75, 524289.0);
|
||||
|
||||
+ TEST_f_f (nearbyint, 1048576.75, 1048577.0);
|
||||
+ TEST_f_f (nearbyint, 2097152.75, 2097153.0);
|
||||
+ TEST_f_f (nearbyint, 2492472.75, 2492473.0);
|
||||
+ TEST_f_f (nearbyint, 2886220.75, 2886221.0);
|
||||
+ TEST_f_f (nearbyint, 3058792.75, 3058793.0);
|
||||
+ TEST_f_f (nearbyint, -1048576.75, -1048577.0);
|
||||
+ TEST_f_f (nearbyint, -2097152.75, -2097153.0);
|
||||
+ TEST_f_f (nearbyint, -2492472.75, -2492473.0);
|
||||
+ TEST_f_f (nearbyint, -2886220.75, -2886221.0);
|
||||
+ TEST_f_f (nearbyint, -3058792.75, -3058793.0);
|
||||
+#ifndef TEST_FLOAT
|
||||
+ TEST_f_f (nearbyint, 70368744177664.75, 70368744177665.0);
|
||||
+ TEST_f_f (nearbyint, 140737488355328.75, 140737488355329.0);
|
||||
+ TEST_f_f (nearbyint, 281474976710656.75, 281474976710657.0);
|
||||
+ TEST_f_f (nearbyint, 562949953421312.75, 562949953421313.0);
|
||||
+ TEST_f_f (nearbyint, 1125899906842624.75, 1125899906842625.0);
|
||||
+ TEST_f_f (nearbyint, -70368744177664.75, -70368744177665.0);
|
||||
+ TEST_f_f (nearbyint, -140737488355328.75, -140737488355329.0);
|
||||
+ TEST_f_f (nearbyint, -281474976710656.75, -281474976710657.0);
|
||||
+ TEST_f_f (nearbyint, -562949953421312.75, -562949953421313.0);
|
||||
+ TEST_f_f (nearbyint, -1125899906842624.75, -1125899906842625.0);
|
||||
+#endif
|
||||
+
|
||||
END (nearbyint);
|
||||
}
|
||||
|
||||
diff --git a/sysdeps/ieee754/flt-32/s_nearbyintf.c b/sysdeps/ieee754/flt-32/s_nearbyintf.c
|
||||
index 04ef9ab..a6d602b 100644
|
||||
--- a/sysdeps/ieee754/flt-32/s_nearbyintf.c
|
||||
+++ b/sysdeps/ieee754/flt-32/s_nearbyintf.c
|
||||
@@ -30,18 +30,12 @@ __nearbyintf(float x)
|
||||
{
|
||||
fenv_t env;
|
||||
int32_t i0,j0,sx;
|
||||
- u_int32_t i,i1;
|
||||
float w,t;
|
||||
GET_FLOAT_WORD(i0,x);
|
||||
sx = (i0>>31)&1;
|
||||
j0 = ((i0>>23)&0xff)-0x7f;
|
||||
if(j0<23) {
|
||||
if(j0<0) {
|
||||
- if((i0&0x7fffffff)==0) return x;
|
||||
- i1 = (i0&0x07fffff);
|
||||
- i0 &= 0xfff00000;
|
||||
- i0 |= ((i1|-i1)>>9)&0x400000;
|
||||
- SET_FLOAT_WORD(x,i0);
|
||||
libc_feholdexceptf (&env);
|
||||
w = TWO23[sx]+x;
|
||||
t = w-TWO23[sx];
|
||||
@@ -49,17 +43,11 @@ __nearbyintf(float x)
|
||||
GET_FLOAT_WORD(i0,t);
|
||||
SET_FLOAT_WORD(t,(i0&0x7fffffff)|(sx<<31));
|
||||
return t;
|
||||
- } else {
|
||||
- i = (0x007fffff)>>j0;
|
||||
- if((i0&i)==0) return x; /* x is integral */
|
||||
- i>>=1;
|
||||
- if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0);
|
||||
}
|
||||
} else {
|
||||
if(__builtin_expect(j0==0x80, 0)) return x+x; /* inf or NaN */
|
||||
else return x; /* x is integral */
|
||||
}
|
||||
- SET_FLOAT_WORD(x,i0);
|
||||
libc_feholdexceptf (&env);
|
||||
w = TWO23[sx]+x;
|
||||
t = w-TWO23[sx];
|
138
lib32-glibc/glibc-2.15-negative-result-cache.patch
Normal file
138
lib32-glibc/glibc-2.15-negative-result-cache.patch
Normal file
@ -0,0 +1,138 @@
|
||||
diff --git a/nscd/aicache.c b/nscd/aicache.c
|
||||
index aaaf80d..e1f1244 100644
|
||||
--- a/nscd/aicache.c
|
||||
+++ b/nscd/aicache.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Cache handling for host lookup.
|
||||
- Copyright (C) 2004-2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2004-2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
|
||||
|
||||
@@ -514,8 +514,9 @@ next_nip:
|
||||
if (fd != -1)
|
||||
TEMP_FAILURE_RETRY (send (fd, ¬found, total, MSG_NOSIGNAL));
|
||||
|
||||
- /* If we cannot permanently store the result, so be it. */
|
||||
- if (__builtin_expect (db->negtimeout == 0, 0))
|
||||
+ /* If we have a transient error or cannot permanently store the
|
||||
+ result, so be it. */
|
||||
+ if (rc4 == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
|
||||
{
|
||||
/* Mark the old entry as obsolete. */
|
||||
if (dh != NULL)
|
||||
diff --git a/nscd/grpcache.c b/nscd/grpcache.c
|
||||
index e9607c6..a698f36 100644
|
||||
--- a/nscd/grpcache.c
|
||||
+++ b/nscd/grpcache.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Cache handling for group lookup.
|
||||
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||
|
||||
@@ -120,8 +120,9 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
|
||||
else
|
||||
written = total;
|
||||
|
||||
- /* If we cannot permanently store the result, so be it. */
|
||||
- if (db->negtimeout == 0)
|
||||
+ /* If we have a transient error or cannot permanently store
|
||||
+ the result, so be it. */
|
||||
+ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
|
||||
{
|
||||
/* Mark the old entry as obsolete. */
|
||||
if (dh != NULL)
|
||||
diff --git a/nscd/hstcache.c b/nscd/hstcache.c
|
||||
index 4d68ade..c72feaa 100644
|
||||
--- a/nscd/hstcache.c
|
||||
+++ b/nscd/hstcache.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Cache handling for host lookup.
|
||||
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||
|
||||
@@ -141,8 +141,9 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
|
||||
MSG_NOSIGNAL)) != total)
|
||||
all_written = false;
|
||||
|
||||
- /* If we cannot permanently store the result, so be it. */
|
||||
- if (__builtin_expect (db->negtimeout == 0, 0))
|
||||
+ /* If we have a transient error or cannot permanently store
|
||||
+ the result, so be it. */
|
||||
+ if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
|
||||
{
|
||||
/* Mark the old entry as obsolete. */
|
||||
if (dh != NULL)
|
||||
diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c
|
||||
index 4ac9942..2019991 100644
|
||||
--- a/nscd/initgrcache.c
|
||||
+++ b/nscd/initgrcache.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Cache handling for host lookup.
|
||||
- Copyright (C) 2004-2006, 2008, 2009, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2004-2006, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
|
||||
|
||||
@@ -202,8 +202,9 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
|
||||
written = TEMP_FAILURE_RETRY (send (fd, ¬found, total,
|
||||
MSG_NOSIGNAL));
|
||||
|
||||
- /* If we cannot permanently store the result, so be it. */
|
||||
- if (__builtin_expect (db->negtimeout == 0, 0))
|
||||
+ /* If we have a transient error or cannot permanently store
|
||||
+ the result, so be it. */
|
||||
+ if (all_tryagain || __builtin_expect (db->negtimeout == 0, 0))
|
||||
{
|
||||
/* Mark the old entry as obsolete. */
|
||||
if (dh != NULL)
|
||||
diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c
|
||||
index 49e130c..e2ba09d 100644
|
||||
--- a/nscd/pwdcache.c
|
||||
+++ b/nscd/pwdcache.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Cache handling for passwd lookup.
|
||||
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||
|
||||
@@ -124,8 +124,9 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req,
|
||||
written = TEMP_FAILURE_RETRY (send (fd, ¬found, total,
|
||||
MSG_NOSIGNAL));
|
||||
|
||||
- /* If we cannot permanently store the result, so be it. */
|
||||
- if (__builtin_expect (db->negtimeout == 0, 0))
|
||||
+ /* If we have a transient error or cannot permanently store
|
||||
+ the result, so be it. */
|
||||
+ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
|
||||
{
|
||||
/* Mark the old entry as obsolete. */
|
||||
if (dh != NULL)
|
||||
diff --git a/nscd/servicescache.c b/nscd/servicescache.c
|
||||
index d3d5dce..a6337e3 100644
|
||||
--- a/nscd/servicescache.c
|
||||
+++ b/nscd/servicescache.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Cache handling for services lookup.
|
||||
- Copyright (C) 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@drepper.com>, 2007.
|
||||
|
||||
@@ -108,8 +108,9 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req,
|
||||
written = TEMP_FAILURE_RETRY (send (fd, ¬found, total,
|
||||
MSG_NOSIGNAL));
|
||||
|
||||
- /* If we cannot permanently store the result, so be it. */
|
||||
- if (__builtin_expect (db->negtimeout == 0, 0))
|
||||
+ /* If we have a transient error or cannot permanently store
|
||||
+ the result, so be it. */
|
||||
+ if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
|
||||
{
|
||||
/* Mark the old entry as obsolete. */
|
||||
if (dh != NULL)
|
886
lib32-glibc/glibc-2.15-non-signalling-comparisons.patch
Normal file
886
lib32-glibc/glibc-2.15-non-signalling-comparisons.patch
Normal file
@ -0,0 +1,886 @@
|
||||
diff --git a/math/w_acos.c b/math/w_acos.c
|
||||
index 3138408..0490933 100644
|
||||
--- a/math/w_acos.c
|
||||
+++ b/math/w_acos.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
double
|
||||
__acos (double x)
|
||||
{
|
||||
- if (__builtin_expect (fabs (x) > 1.0, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreater (fabs (x), 1.0), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
/* acos(|x|>1) */
|
||||
feraiseexcept (FE_INVALID);
|
||||
diff --git a/math/w_acosf.c b/math/w_acosf.c
|
||||
index 0e41a2c..2500a7d 100644
|
||||
--- a/math/w_acosf.c
|
||||
+++ b/math/w_acosf.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
float
|
||||
__acosf (float x)
|
||||
{
|
||||
- if (__builtin_expect (fabsf (x) > 1.0f, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
/* acos(|x|>1) */
|
||||
feraiseexcept (FE_INVALID);
|
||||
diff --git a/math/w_acosh.c b/math/w_acosh.c
|
||||
index 0bd2686..d632987 100644
|
||||
--- a/math/w_acosh.c
|
||||
+++ b/math/w_acosh.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
double
|
||||
__acosh (double x)
|
||||
{
|
||||
- if (__builtin_expect (x < 1.0, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isless (x, 1.0), 0) && _LIB_VERSION != _IEEE_)
|
||||
/* acosh(x<1) */
|
||||
return __kernel_standard (x, x, 29);
|
||||
|
||||
diff --git a/math/w_acoshf.c b/math/w_acoshf.c
|
||||
index c59bf94..f77df2b 100644
|
||||
--- a/math/w_acoshf.c
|
||||
+++ b/math/w_acoshf.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
float
|
||||
__acoshf (float x)
|
||||
{
|
||||
- if (__builtin_expect (x < 1.0f, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isless (x, 1.0f), 0) && _LIB_VERSION != _IEEE_)
|
||||
/* acosh(x<1) */
|
||||
return __kernel_standard_f (x, x, 129);
|
||||
|
||||
diff --git a/math/w_acoshl.c b/math/w_acoshl.c
|
||||
index 819bdfc..cc823b8 100644
|
||||
--- a/math/w_acoshl.c
|
||||
+++ b/math/w_acoshl.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
long double
|
||||
__acoshl (long double x)
|
||||
{
|
||||
- if (__builtin_expect (x < 1.0L, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isless (x, 1.0L), 0) && _LIB_VERSION != _IEEE_)
|
||||
/* acosh(x<1) */
|
||||
return __kernel_standard (x, x, 229);
|
||||
|
||||
diff --git a/math/w_acosl.c b/math/w_acosl.c
|
||||
index 6417068..05023b4 100644
|
||||
--- a/math/w_acosl.c
|
||||
+++ b/math/w_acosl.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
long double
|
||||
__acosl (long double x)
|
||||
{
|
||||
- if (__builtin_expect (fabsl (x) > 1.0L, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreater (fabsl (x), 1.0L), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
/* acos(|x|>1) */
|
||||
feraiseexcept (FE_INVALID);
|
||||
diff --git a/math/w_asin.c b/math/w_asin.c
|
||||
index d4e89ce..0fa9487 100644
|
||||
--- a/math/w_asin.c
|
||||
+++ b/math/w_asin.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
double
|
||||
__asin (double x)
|
||||
{
|
||||
- if (__builtin_expect (fabs (x) > 1.0, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreater (fabs (x), 1.0), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
/* asin(|x|>1) */
|
||||
feraiseexcept (FE_INVALID);
|
||||
diff --git a/math/w_asinf.c b/math/w_asinf.c
|
||||
index 270961f..c28edab 100644
|
||||
--- a/math/w_asinf.c
|
||||
+++ b/math/w_asinf.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
float
|
||||
__asinf (float x)
|
||||
{
|
||||
- if (__builtin_expect (fabsf (x) > 1.0f, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
/* asin(|x|>1) */
|
||||
feraiseexcept (FE_INVALID);
|
||||
diff --git a/math/w_asinl.c b/math/w_asinl.c
|
||||
index 32e5273..e4036d8 100644
|
||||
--- a/math/w_asinl.c
|
||||
+++ b/math/w_asinl.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
long double
|
||||
__asinl (long double x)
|
||||
{
|
||||
- if (__builtin_expect (fabsl (x) > 1.0L, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreater (fabsl (x), 1.0L), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
/* asin(|x|>1) */
|
||||
feraiseexcept (FE_INVALID);
|
||||
diff --git a/math/w_atanh.c b/math/w_atanh.c
|
||||
index 1022bd5..190d2e9 100644
|
||||
--- a/math/w_atanh.c
|
||||
+++ b/math/w_atanh.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
double
|
||||
__atanh (double x)
|
||||
{
|
||||
- if (__builtin_expect (fabs (x) >= 1.0, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreaterequal (fabs (x), 1.0), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard (x, x,
|
||||
fabs (x) > 1.0
|
||||
? 30 /* atanh(|x|>1) */
|
||||
diff --git a/math/w_atanhf.c b/math/w_atanhf.c
|
||||
index 3c8cf83..e0c5dc3 100644
|
||||
--- a/math/w_atanhf.c
|
||||
+++ b/math/w_atanhf.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
float
|
||||
__atanhf (float x)
|
||||
{
|
||||
- if (__builtin_expect (fabsf (x) >= 1.0f, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreaterequal (fabsf (x), 1.0f), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_f (x, x,
|
||||
fabsf (x) > 1.0f
|
||||
? 130 /* atanh(|x|>1) */
|
||||
diff --git a/math/w_atanhl.c b/math/w_atanhl.c
|
||||
index f582acf..319535d 100644
|
||||
--- a/math/w_atanhl.c
|
||||
+++ b/math/w_atanhl.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
long double
|
||||
__atanhl (long double x)
|
||||
{
|
||||
- if (__builtin_expect (fabsl (x) >= 1.0L, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreaterequal (fabsl (x), 1.0L), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard (x, x,
|
||||
fabsl (x) > 1.0L
|
||||
? 230 /* atanh(|x|>1) */
|
||||
diff --git a/math/w_exp2.c b/math/w_exp2.c
|
||||
index bf22326..7a3b0af 100644
|
||||
--- a/math/w_exp2.c
|
||||
+++ b/math/w_exp2.c
|
||||
@@ -12,7 +12,8 @@ static const double u_threshold = (double) (DBL_MIN_EXP - DBL_MANT_DIG - 1);
|
||||
double
|
||||
__exp2 (double x)
|
||||
{
|
||||
- if (__builtin_expect (x <= u_threshold || x > o_threshold, 0)
|
||||
+ if (__builtin_expect (islessequal (x, u_threshold)
|
||||
+ || isgreater (x, o_threshold), 0)
|
||||
&& _LIB_VERSION != _IEEE_ && __finite (x))
|
||||
/* exp2 overflow: 44, exp2 underflow: 45 */
|
||||
return __kernel_standard (x, x, 44 + (x <= o_threshold));
|
||||
diff --git a/math/w_exp2f.c b/math/w_exp2f.c
|
||||
index 7215fca..c4e9e94 100644
|
||||
--- a/math/w_exp2f.c
|
||||
+++ b/math/w_exp2f.c
|
||||
@@ -12,7 +12,8 @@ static const float u_threshold = (float) (FLT_MIN_EXP - FLT_MANT_DIG - 1);
|
||||
float
|
||||
__exp2f (float x)
|
||||
{
|
||||
- if (__builtin_expect (x <= u_threshold || x > o_threshold, 0)
|
||||
+ if (__builtin_expect (islessequal (x, u_threshold)
|
||||
+ || isgreater (x, o_threshold), 0)
|
||||
&& _LIB_VERSION != _IEEE_ && __finitef (x))
|
||||
/* exp2 overflow: 144, exp2 underflow: 145 */
|
||||
return __kernel_standard_f (x, x, 144 + (x <= o_threshold));
|
||||
diff --git a/math/w_exp2l.c b/math/w_exp2l.c
|
||||
index ac8d231..442a637 100644
|
||||
--- a/math/w_exp2l.c
|
||||
+++ b/math/w_exp2l.c
|
||||
@@ -13,7 +13,8 @@ static const long double u_threshold
|
||||
long double
|
||||
__exp2l (long double x)
|
||||
{
|
||||
- if (__builtin_expect (x <= u_threshold || x > o_threshold, 0)
|
||||
+ if (__builtin_expect (islessequal (x, u_threshold)
|
||||
+ || isgreater (x, o_threshold), 0)
|
||||
&& _LIB_VERSION != _IEEE_ && __finitel (x))
|
||||
/* exp2 overflow: 244, exp2 underflow: 245 */
|
||||
return __kernel_standard (x, x, 244 + (x <= o_threshold));
|
||||
diff --git a/math/w_j0.c b/math/w_j0.c
|
||||
index 1dff8b4..f8d3724 100644
|
||||
--- a/math/w_j0.c
|
||||
+++ b/math/w_j0.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
double
|
||||
j0 (double x)
|
||||
{
|
||||
- if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
/* j0(|x|>X_TLOSS) */
|
||||
return __kernel_standard (x, x, 34);
|
||||
|
||||
@@ -40,7 +41,8 @@ strong_alias (j0, j0l)
|
||||
double
|
||||
y0 (double x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x < 0.0)
|
||||
{
|
||||
diff --git a/math/w_j0f.c b/math/w_j0f.c
|
||||
index fc52f26..cef36aa 100644
|
||||
--- a/math/w_j0f.c
|
||||
+++ b/math/w_j0f.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
float
|
||||
j0f (float x)
|
||||
{
|
||||
- if (__builtin_expect (fabsf (x) > (float) X_TLOSS, 0)
|
||||
+ if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0)
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
/* j0(|x|>X_TLOSS) */
|
||||
return __kernel_standard_f (x, x, 134);
|
||||
@@ -38,7 +38,8 @@ j0f (float x)
|
||||
float
|
||||
y0f (float x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0f || x > (float) X_TLOSS, 0)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0f)
|
||||
+ || isgreater (x, (float) X_TLOSS), 0)
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x < 0.0f)
|
||||
diff --git a/math/w_j0l.c b/math/w_j0l.c
|
||||
index 8d72d50..144f33c 100644
|
||||
--- a/math/w_j0l.c
|
||||
+++ b/math/w_j0l.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
long double
|
||||
__j0l (long double x)
|
||||
{
|
||||
- if (__builtin_expect (fabsl (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
/* j0(|x|>X_TLOSS) */
|
||||
return __kernel_standard (x, x, 234);
|
||||
|
||||
@@ -38,7 +39,8 @@ weak_alias (__j0l, j0l)
|
||||
long double
|
||||
__y0l (long double x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0L || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0L) || isgreater (x, X_TLOSS), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x < 0.0L)
|
||||
{
|
||||
diff --git a/math/w_j1.c b/math/w_j1.c
|
||||
index 358e0e1..e9a5357 100644
|
||||
--- a/math/w_j1.c
|
||||
+++ b/math/w_j1.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
double
|
||||
j1 (double x)
|
||||
{
|
||||
- if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
/* j1(|x|>X_TLOSS) */
|
||||
return __kernel_standard (x, x, 36);
|
||||
|
||||
@@ -40,7 +41,8 @@ strong_alias (j1, j1l)
|
||||
double
|
||||
y1 (double x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x < 0.0)
|
||||
{
|
||||
diff --git a/math/w_j1f.c b/math/w_j1f.c
|
||||
index 096fdf5..29bd949 100644
|
||||
--- a/math/w_j1f.c
|
||||
+++ b/math/w_j1f.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
float
|
||||
j1f (float x)
|
||||
{
|
||||
- if (__builtin_expect (fabsf (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreater (fabsf (x), X_TLOSS), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
/* j1(|x|>X_TLOSS) */
|
||||
return __kernel_standard_f (x, x, 136);
|
||||
|
||||
@@ -37,7 +38,8 @@ j1f (float x)
|
||||
float
|
||||
y1f (float x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0f || x > (float) X_TLOSS, 0)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0f)
|
||||
+ || isgreater (x, (float) X_TLOSS), 0)
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x < 0.0f)
|
||||
diff --git a/math/w_j1l.c b/math/w_j1l.c
|
||||
index 93e4ee4..01b8551 100644
|
||||
--- a/math/w_j1l.c
|
||||
+++ b/math/w_j1l.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
long double
|
||||
__j1l (long double x)
|
||||
{
|
||||
- if (__builtin_expect (fabsl (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
/* j1(|x|>X_TLOSS) */
|
||||
return __kernel_standard (x, x, 236);
|
||||
|
||||
@@ -38,7 +39,8 @@ weak_alias (__j1l, j1l)
|
||||
long double
|
||||
__y1l (long double x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0L || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0L) || isgreater (x, X_TLOSS), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x < 0.0L)
|
||||
{
|
||||
diff --git a/math/w_jn.c b/math/w_jn.c
|
||||
index f0dd8c6..fd3fb16 100644
|
||||
--- a/math/w_jn.c
|
||||
+++ b/math/w_jn.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
double
|
||||
jn (int n, double x)
|
||||
{
|
||||
- if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
/* jn(n,|x|>X_TLOSS) */
|
||||
return __kernel_standard (n, x, 38);
|
||||
|
||||
@@ -40,7 +41,8 @@ strong_alias (jn, jnl)
|
||||
double
|
||||
yn (int n, double x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0)
|
||||
+ && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x < 0.0)
|
||||
{
|
||||
diff --git a/math/w_jnf.c b/math/w_jnf.c
|
||||
index ef29eb4..36d6f6d 100644
|
||||
--- a/math/w_jnf.c
|
||||
+++ b/math/w_jnf.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
float
|
||||
jnf (int n, float x)
|
||||
{
|
||||
- if (__builtin_expect (fabsf (x) > (float) X_TLOSS, 0)
|
||||
+ if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0)
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
/* jn(n,|x|>X_TLOSS) */
|
||||
return __kernel_standard_f (n, x, 138);
|
||||
@@ -38,7 +38,8 @@ jnf (int n, float x)
|
||||
float
|
||||
ynf (int n, float x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0f || x > (float) X_TLOSS, 0)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0f)
|
||||
+ || isgreater (x, (float) X_TLOSS), 0)
|
||||
&& _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x < 0.0f)
|
||||
diff --git a/math/w_log.c b/math/w_log.c
|
||||
index efc1c4c..ec33605 100644
|
||||
--- a/math/w_log.c
|
||||
+++ b/math/w_log.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
double
|
||||
__log (double x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x == 0.0)
|
||||
{
|
||||
diff --git a/math/w_log10.c b/math/w_log10.c
|
||||
index 2717ade..fe799ad 100644
|
||||
--- a/math/w_log10.c
|
||||
+++ b/math/w_log10.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
double
|
||||
__log10 (double x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x == 0.0)
|
||||
{
|
||||
diff --git a/math/w_log10f.c b/math/w_log10f.c
|
||||
index 60737ca..4b821f7 100644
|
||||
--- a/math/w_log10f.c
|
||||
+++ b/math/w_log10f.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
float
|
||||
__log10f (float x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x == 0.0f)
|
||||
{
|
||||
diff --git a/math/w_log10l.c b/math/w_log10l.c
|
||||
index b26f18c..0e5a137 100644
|
||||
--- a/math/w_log10l.c
|
||||
+++ b/math/w_log10l.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
long double
|
||||
__log10l (long double x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x == 0.0L)
|
||||
{
|
||||
diff --git a/math/w_log2.c b/math/w_log2.c
|
||||
index 998e5d9..e58e109 100644
|
||||
--- a/math/w_log2.c
|
||||
+++ b/math/w_log2.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
double
|
||||
__log2 (double x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x == 0.0)
|
||||
{
|
||||
diff --git a/math/w_log2f.c b/math/w_log2f.c
|
||||
index 6d91bf4..6963ed2 100644
|
||||
--- a/math/w_log2f.c
|
||||
+++ b/math/w_log2f.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
float
|
||||
__log2f (float x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x == 0.0)
|
||||
{
|
||||
diff --git a/math/w_log2l.c b/math/w_log2l.c
|
||||
index e51c1bc..eed04ff6c 100644
|
||||
--- a/math/w_log2l.c
|
||||
+++ b/math/w_log2l.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
long double
|
||||
__log2l (long double x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x == 0.0L)
|
||||
{
|
||||
diff --git a/math/w_logf.c b/math/w_logf.c
|
||||
index 8aa27c8..38d408f 100644
|
||||
--- a/math/w_logf.c
|
||||
+++ b/math/w_logf.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
float
|
||||
__logf (float x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x == 0.0f)
|
||||
{
|
||||
diff --git a/math/w_logl.c b/math/w_logl.c
|
||||
index a3139ff..593b37d 100644
|
||||
--- a/math/w_logl.c
|
||||
+++ b/math/w_logl.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
long double
|
||||
__logl (long double x)
|
||||
{
|
||||
- if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_)
|
||||
{
|
||||
if (x == 0.0L)
|
||||
{
|
||||
diff --git a/math/w_sqrt.c b/math/w_sqrt.c
|
||||
index 409a6df..f6ba542 100644
|
||||
--- a/math/w_sqrt.c
|
||||
+++ b/math/w_sqrt.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
double
|
||||
__sqrt (double x)
|
||||
{
|
||||
- if (__builtin_expect (x < 0.0, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isless (x, 0.0), 0) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard (x, x, 26); /* sqrt(negative) */
|
||||
|
||||
return __ieee754_sqrt (x);
|
||||
diff --git a/math/w_sqrtf.c b/math/w_sqrtf.c
|
||||
index 3c3d2f8..c128e9b 100644
|
||||
--- a/math/w_sqrtf.c
|
||||
+++ b/math/w_sqrtf.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
float
|
||||
__sqrtf (float x)
|
||||
{
|
||||
- if (__builtin_expect (x < 0.0f, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isless (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_f (x, x, 126); /* sqrt(negative) */
|
||||
|
||||
return __ieee754_sqrtf (x);
|
||||
diff --git a/math/w_sqrtl.c b/math/w_sqrtl.c
|
||||
index 5e18f44..2a4a048 100644
|
||||
--- a/math/w_sqrtl.c
|
||||
+++ b/math/w_sqrtl.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
long double
|
||||
__sqrtl (long double x)
|
||||
{
|
||||
- if (__builtin_expect (x < 0.0L, 0) && _LIB_VERSION != _IEEE_)
|
||||
+ if (__builtin_expect (isless (x, 0.0L), 0) && _LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard (x, x, 226); /* sqrt(negative) */
|
||||
|
||||
return __ieee754_sqrtl (x);
|
||||
diff --git a/sysdeps/ieee754/dbl-64/e_atanh.c b/sysdeps/ieee754/dbl-64/e_atanh.c
|
||||
index 9fc21ab..5f471b1 100644
|
||||
--- a/sysdeps/ieee754/dbl-64/e_atanh.c
|
||||
+++ b/sysdeps/ieee754/dbl-64/e_atanh.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -46,7 +46,7 @@ __ieee754_atanh (double x)
|
||||
{
|
||||
double xa = fabs (x);
|
||||
double t;
|
||||
- if (xa < 0.5)
|
||||
+ if (isless (xa, 0.5))
|
||||
{
|
||||
if (__builtin_expect (xa < 0x1.0p-28, 0))
|
||||
{
|
||||
@@ -57,11 +57,11 @@ __ieee754_atanh (double x)
|
||||
t = xa + xa;
|
||||
t = 0.5 * __log1p (t + t * xa / (1.0 - xa));
|
||||
}
|
||||
- else if (__builtin_expect (xa < 1.0, 1))
|
||||
+ else if (__builtin_expect (isless (xa, 1.0), 1))
|
||||
t = 0.5 * __log1p ((xa + xa) / (1.0 - xa));
|
||||
else
|
||||
{
|
||||
- if (xa > 1.0)
|
||||
+ if (isgreater (xa, 1.0))
|
||||
return (x - x) / (x - x);
|
||||
|
||||
return x / 0.0;
|
||||
diff --git a/sysdeps/ieee754/dbl-64/w_exp.c b/sysdeps/ieee754/dbl-64/w_exp.c
|
||||
index ee42587..b584ed8 100644
|
||||
--- a/sysdeps/ieee754/dbl-64/w_exp.c
|
||||
+++ b/sysdeps/ieee754/dbl-64/w_exp.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -28,12 +28,12 @@ u_threshold= -7.45133219101941108420e+02; /* 0xc0874910, 0xD52D3051 */
|
||||
double
|
||||
__exp (double x)
|
||||
{
|
||||
- if (__builtin_expect (x > o_threshold, 0))
|
||||
+ if (__builtin_expect (isgreater (x, o_threshold), 0))
|
||||
{
|
||||
if (_LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_f (x, x, 6);
|
||||
}
|
||||
- else if (__builtin_expect (x < u_threshold, 0))
|
||||
+ else if (__builtin_expect (isless (x, u_threshold), 0))
|
||||
{
|
||||
if (_LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_f (x, x, 7);
|
||||
diff --git a/sysdeps/ieee754/flt-32/e_atanhf.c b/sysdeps/ieee754/flt-32/e_atanhf.c
|
||||
index 75ed691..7af2f6c 100644
|
||||
--- a/sysdeps/ieee754/flt-32/e_atanhf.c
|
||||
+++ b/sysdeps/ieee754/flt-32/e_atanhf.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -46,7 +46,7 @@ __ieee754_atanhf (float x)
|
||||
{
|
||||
float xa = fabsf (x);
|
||||
float t;
|
||||
- if (xa < 0.5f)
|
||||
+ if (isless (xa, 0.5f))
|
||||
{
|
||||
if (__builtin_expect (xa < 0x1.0p-28f, 0))
|
||||
{
|
||||
@@ -57,11 +57,11 @@ __ieee754_atanhf (float x)
|
||||
t = xa + xa;
|
||||
t = 0.5f * __log1pf (t + t * xa / (1.0f - xa));
|
||||
}
|
||||
- else if (__builtin_expect (xa < 1.0f, 1))
|
||||
+ else if (__builtin_expect (isless (xa, 1.0f), 1))
|
||||
t = 0.5f * __log1pf ((xa + xa) / (1.0f - xa));
|
||||
else
|
||||
{
|
||||
- if (xa > 1.0f)
|
||||
+ if (isgreater (xa, 1.0f))
|
||||
return (x - x) / (x - x);
|
||||
|
||||
return x / 0.0f;
|
||||
diff --git a/sysdeps/ieee754/flt-32/w_expf.c b/sysdeps/ieee754/flt-32/w_expf.c
|
||||
index 5500872..bc3b2f6 100644
|
||||
--- a/sysdeps/ieee754/flt-32/w_expf.c
|
||||
+++ b/sysdeps/ieee754/flt-32/w_expf.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -28,12 +28,12 @@ u_threshold= -1.0397208405e+02; /* 0xc2cff1b5 */
|
||||
float
|
||||
__expf (float x)
|
||||
{
|
||||
- if (__builtin_expect (x > o_threshold, 0))
|
||||
+ if (__builtin_expect (isgreater (x, o_threshold), 0))
|
||||
{
|
||||
if (_LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_f (x, x, 106);
|
||||
}
|
||||
- else if (__builtin_expect (x < u_threshold, 0))
|
||||
+ else if (__builtin_expect (isless (x, u_threshold), 0))
|
||||
{
|
||||
if (_LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard_f (x, x, 107);
|
||||
diff --git a/sysdeps/ieee754/ldbl-96/w_expl.c b/sysdeps/ieee754/ldbl-96/w_expl.c
|
||||
index ec9d8a7..d61c0a3 100644
|
||||
--- a/sysdeps/ieee754/ldbl-96/w_expl.c
|
||||
+++ b/sysdeps/ieee754/ldbl-96/w_expl.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
|
||||
|
||||
@@ -30,12 +30,12 @@ u_threshold= -1.140019167866942050398521670162263001513e4;
|
||||
long double
|
||||
__expl (long double x)
|
||||
{
|
||||
- if (__builtin_expect (x > o_threshold, 0))
|
||||
+ if (__builtin_expect (isgreater (x, o_threshold), 0))
|
||||
{
|
||||
if (_LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard (x, x, 206);
|
||||
}
|
||||
- else if (__builtin_expect (x < u_threshold, 0))
|
||||
+ else if (__builtin_expect (isless (x, u_threshold), 0))
|
||||
{
|
||||
if (_LIB_VERSION != _IEEE_)
|
||||
return __kernel_standard (x, x, 207);
|
15
lib32-glibc/glibc-2.15-regex.patch
Normal file
15
lib32-glibc/glibc-2.15-regex.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/posix/regex_internal.c b/posix/regex_internal.c
|
||||
index bc19243..124f8cc 100644
|
||||
--- a/posix/regex_internal.c
|
||||
+++ b/posix/regex_internal.c
|
||||
@@ -868,7 +868,7 @@ re_string_peek_byte_case (const re_string_t *pstr, int idx)
|
||||
}
|
||||
|
||||
static unsigned char
|
||||
-internal_function __attribute ((pure))
|
||||
+internal_function
|
||||
re_string_fetch_byte_case (re_string_t *pstr)
|
||||
{
|
||||
if (BE (!pstr->mbs_allocated, 1))
|
||||
--
|
||||
1.7.3.4
|
229
lib32-glibc/glibc-2.15-revert-c5a0802a.patch
Normal file
229
lib32-glibc/glibc-2.15-revert-c5a0802a.patch
Normal file
@ -0,0 +1,229 @@
|
||||
diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
|
||||
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2011-12-22 18:04:12.937212834 +0000
|
||||
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2011-12-22 18:04:42.104222278 +0000
|
||||
@@ -137,7 +137,6 @@ __pthread_cond_wait:
|
||||
cmpl $PI_BIT, %eax
|
||||
jne 18f
|
||||
|
||||
-90:
|
||||
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
|
||||
movl %ebp, %edx
|
||||
xorl %esi, %esi
|
||||
@@ -151,9 +150,6 @@ __pthread_cond_wait:
|
||||
sete 16(%esp)
|
||||
je 19f
|
||||
|
||||
- cmpl $-EAGAIN, %eax
|
||||
- je 91f
|
||||
-
|
||||
/* Normal and PI futexes dont mix. Use normal futex functions only
|
||||
if the kernel does not support the PI futex functions. */
|
||||
cmpl $-ENOSYS, %eax
|
||||
@@ -398,78 +394,6 @@ __pthread_cond_wait:
|
||||
#endif
|
||||
call __lll_unlock_wake
|
||||
jmp 11b
|
||||
-
|
||||
-91:
|
||||
-.LcleanupSTART2:
|
||||
- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
|
||||
- call it again. */
|
||||
-
|
||||
- /* Get internal lock. */
|
||||
- movl $1, %edx
|
||||
- xorl %eax, %eax
|
||||
- LOCK
|
||||
-#if cond_lock == 0
|
||||
- cmpxchgl %edx, (%ebx)
|
||||
-#else
|
||||
- cmpxchgl %edx, cond_lock(%ebx)
|
||||
-#endif
|
||||
- jz 92f
|
||||
-
|
||||
-#if cond_lock == 0
|
||||
- movl %ebx, %edx
|
||||
-#else
|
||||
- leal cond_lock(%ebx), %edx
|
||||
-#endif
|
||||
-#if (LLL_SHARED-LLL_PRIVATE) > 255
|
||||
- xorl %ecx, %ecx
|
||||
-#endif
|
||||
- cmpl $-1, dep_mutex(%ebx)
|
||||
- setne %cl
|
||||
- subl $1, %ecx
|
||||
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
|
||||
-#if LLL_PRIVATE != 0
|
||||
- addl $LLL_PRIVATE, %ecx
|
||||
-#endif
|
||||
- call __lll_lock_wait
|
||||
-
|
||||
-92:
|
||||
- /* Increment the cond_futex value again, so it can be used as a new
|
||||
- expected value. */
|
||||
- addl $1, cond_futex(%ebx)
|
||||
- movl cond_futex(%ebx), %ebp
|
||||
-
|
||||
- /* Unlock. */
|
||||
- LOCK
|
||||
-#if cond_lock == 0
|
||||
- subl $1, (%ebx)
|
||||
-#else
|
||||
- subl $1, cond_lock(%ebx)
|
||||
-#endif
|
||||
- je 93f
|
||||
-#if cond_lock == 0
|
||||
- movl %ebx, %eax
|
||||
-#else
|
||||
- leal cond_lock(%ebx), %eax
|
||||
-#endif
|
||||
-#if (LLL_SHARED-LLL_PRIVATE) > 255
|
||||
- xorl %ecx, %ecx
|
||||
-#endif
|
||||
- cmpl $-1, dep_mutex(%ebx)
|
||||
- setne %cl
|
||||
- subl $1, %ecx
|
||||
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
|
||||
-#if LLL_PRIVATE != 0
|
||||
- addl $LLL_PRIVATE, %ecx
|
||||
-#endif
|
||||
- call __lll_unlock_wake
|
||||
-
|
||||
-93:
|
||||
- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
|
||||
- xorl %ecx, %ecx
|
||||
- movl dep_mutex(%ebx), %edi
|
||||
- jmp 90b
|
||||
-.LcleanupEND2:
|
||||
-
|
||||
.size __pthread_cond_wait, .-__pthread_cond_wait
|
||||
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
|
||||
GLIBC_2_3_2)
|
||||
@@ -642,10 +566,6 @@ __condvar_w_cleanup:
|
||||
.long .LcleanupEND-.Lsub_cond_futex
|
||||
.long __condvar_w_cleanup-.LSTARTCODE
|
||||
.uleb128 0
|
||||
- .long .LcleanupSTART2-.LSTARTCODE
|
||||
- .long .LcleanupEND2-.LcleanupSTART2
|
||||
- .long __condvar_w_cleanup-.LSTARTCODE
|
||||
- .uleb128 0
|
||||
.long .LcallUR-.LSTARTCODE
|
||||
.long .LENDCODE-.LcallUR
|
||||
.long 0
|
||||
Only in b/nptl/sysdeps/unix/sysv/linux/i386/i486: pthread_cond_wait.S.orig
|
||||
diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
|
||||
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-22 18:04:12.941212837 +0000
|
||||
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-22 18:05:05.155229737 +0000
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <lowlevelcond.h>
|
||||
#include <tcb-offsets.h>
|
||||
#include <pthread-pi-defines.h>
|
||||
-#include <pthread-errnos.h>
|
||||
|
||||
#include <kernel-features.h>
|
||||
|
||||
@@ -137,14 +136,11 @@ __pthread_cond_wait:
|
||||
cmpl $PI_BIT, %eax
|
||||
jne 61f
|
||||
|
||||
-90:
|
||||
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
|
||||
movl $SYS_futex, %eax
|
||||
syscall
|
||||
|
||||
movl $1, %r8d
|
||||
- cmpq $-EAGAIN, %rax
|
||||
- je 91f
|
||||
#ifdef __ASSUME_REQUEUE_PI
|
||||
jmp 62f
|
||||
#else
|
||||
@@ -331,70 +327,6 @@ __pthread_cond_wait:
|
||||
|
||||
13: movq %r10, %rax
|
||||
jmp 14b
|
||||
-
|
||||
-91:
|
||||
-.LcleanupSTART2:
|
||||
- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
|
||||
- call it again. */
|
||||
- movq 8(%rsp), %rdi
|
||||
-
|
||||
- /* Get internal lock. */
|
||||
- movl $1, %esi
|
||||
- xorl %eax, %eax
|
||||
- LOCK
|
||||
-#if cond_lock == 0
|
||||
- cmpxchgl %esi, (%rdi)
|
||||
-#else
|
||||
- cmpxchgl %esi, cond_lock(%rdi)
|
||||
-#endif
|
||||
- jz 92f
|
||||
-
|
||||
-#if cond_lock != 0
|
||||
- addq $cond_lock, %rdi
|
||||
-#endif
|
||||
- cmpq $-1, dep_mutex-cond_lock(%rdi)
|
||||
- movl $LLL_PRIVATE, %eax
|
||||
- movl $LLL_SHARED, %esi
|
||||
- cmovne %eax, %esi
|
||||
- callq __lll_lock_wait
|
||||
-#if cond_lock != 0
|
||||
- subq $cond_lock, %rdi
|
||||
-#endif
|
||||
-92:
|
||||
- /* Increment the cond_futex value again, so it can be used as a new
|
||||
- expected value. */
|
||||
- incl cond_futex(%rdi)
|
||||
- movl cond_futex(%rdi), %edx
|
||||
-
|
||||
- /* Release internal lock. */
|
||||
- LOCK
|
||||
-#if cond_lock == 0
|
||||
- decl (%rdi)
|
||||
-#else
|
||||
- decl cond_lock(%rdi)
|
||||
-#endif
|
||||
- jz 93f
|
||||
-
|
||||
-#if cond_lock != 0
|
||||
- addq $cond_lock, %rdi
|
||||
-#endif
|
||||
- cmpq $-1, dep_mutex-cond_lock(%rdi)
|
||||
- movl $LLL_PRIVATE, %eax
|
||||
- movl $LLL_SHARED, %esi
|
||||
- cmovne %eax, %esi
|
||||
- /* The call preserves %rdx. */
|
||||
- callq __lll_unlock_wake
|
||||
-#if cond_lock != 0
|
||||
- subq $cond_lock, %rdi
|
||||
-#endif
|
||||
-93:
|
||||
- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
|
||||
- xorq %r10, %r10
|
||||
- movq dep_mutex(%rdi), %r8
|
||||
- leaq cond_futex(%rdi), %rdi
|
||||
- jmp 90b
|
||||
-.LcleanupEND2:
|
||||
-
|
||||
.size __pthread_cond_wait, .-__pthread_cond_wait
|
||||
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
|
||||
GLIBC_2_3_2)
|
||||
@@ -547,15 +479,11 @@ __condvar_cleanup1:
|
||||
.uleb128 .LcleanupSTART-.LSTARTCODE
|
||||
.uleb128 .LcleanupEND-.LcleanupSTART
|
||||
.uleb128 __condvar_cleanup1-.LSTARTCODE
|
||||
- .uleb128 0
|
||||
- .uleb128 .LcleanupSTART2-.LSTARTCODE
|
||||
- .uleb128 .LcleanupEND2-.LcleanupSTART2
|
||||
- .uleb128 __condvar_cleanup1-.LSTARTCODE
|
||||
- .uleb128 0
|
||||
+ .uleb128 0
|
||||
.uleb128 .LcallUR-.LSTARTCODE
|
||||
.uleb128 .LENDCODE-.LcallUR
|
||||
.uleb128 0
|
||||
- .uleb128 0
|
||||
+ .uleb128 0
|
||||
.Lcstend:
|
||||
|
||||
|
||||
Only in b/nptl/sysdeps/unix/sysv/linux/x86_64: pthread_cond_wait.S.orig
|
||||
Only in b/nptl/sysdeps/unix/sysv/linux/x86_64: pthread_cond_wait.S.rej
|
680
lib32-glibc/glibc-2.15-revert-netlink-cache.patch
Normal file
680
lib32-glibc/glibc-2.15-revert-netlink-cache.patch
Normal file
@ -0,0 +1,680 @@
|
||||
diff --git a/include/ifaddrs.h b/include/ifaddrs.h
|
||||
index e1c6cac..50e4c48 100644
|
||||
--- a/include/ifaddrs.h
|
||||
+++ b/include/ifaddrs.h
|
||||
@@ -21,13 +21,8 @@ struct in6addrinfo
|
||||
extern void __check_pf (bool *seen_ipv4, bool *seen_ipv6,
|
||||
struct in6addrinfo **in6ai, size_t *in6ailen)
|
||||
attribute_hidden;
|
||||
-extern void __free_in6ai (struct in6addrinfo *in6ai) attribute_hidden;
|
||||
extern void __check_native (uint32_t a1_index, int *a1_native,
|
||||
uint32_t a2_index, int *a2_native)
|
||||
attribute_hidden;
|
||||
|
||||
-#ifdef IS_IN_nscd
|
||||
-extern uint32_t __bump_nl_timestamp (void) attribute_hidden;
|
||||
-#endif
|
||||
-
|
||||
#endif /* ifaddrs.h */
|
||||
diff --git a/inet/check_pf.c b/inet/check_pf.c
|
||||
index 0fa34cc..b015432 100644
|
||||
--- a/inet/check_pf.c
|
||||
+++ b/inet/check_pf.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Determine protocol families for which interfaces exist. Generic version.
|
||||
- Copyright (C) 2003, 2006, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2003, 2006 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -54,19 +54,3 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
|
||||
|
||||
(void) freeifaddrs (ifa);
|
||||
}
|
||||
-
|
||||
-
|
||||
-void
|
||||
-__free_in6ai (struct in6addrinfo *in6ai)
|
||||
-{
|
||||
- /* Nothing to do. */
|
||||
-}
|
||||
-
|
||||
-
|
||||
-#ifdef IS_IN_nscd
|
||||
-uint32_t
|
||||
-__bump_nl_timestamp (void)
|
||||
-{
|
||||
- return 0;
|
||||
-}
|
||||
-#endif
|
||||
diff --git a/nscd/connections.c b/nscd/connections.c
|
||||
index c741996..2b5c7ef 100644
|
||||
--- a/nscd/connections.c
|
||||
+++ b/nscd/connections.c
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <grp.h>
|
||||
-#include <ifaddrs.h>
|
||||
#include <libintl.h>
|
||||
#include <pthread.h>
|
||||
#include <pwd.h>
|
||||
@@ -33,10 +32,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <arpa/inet.h>
|
||||
-#ifdef HAVE_NETLINK
|
||||
-# include <linux/netlink.h>
|
||||
-# include <linux/rtnetlink.h>
|
||||
-#endif
|
||||
#ifdef HAVE_EPOLL
|
||||
# include <sys/epoll.h>
|
||||
#endif
|
||||
@@ -252,11 +247,6 @@ static int sock;
|
||||
int inotify_fd = -1;
|
||||
#endif
|
||||
|
||||
-#ifdef HAVE_NETLINK
|
||||
-/* Descriptor for netlink status updates. */
|
||||
-static int nl_status_fd = -1;
|
||||
-#endif
|
||||
-
|
||||
#ifndef __ASSUME_SOCK_CLOEXEC
|
||||
/* Negative if SOCK_CLOEXEC is not supported, positive if it is, zero
|
||||
before be know the result. */
|
||||
@@ -913,65 +903,6 @@ cannot set socket to close on exec: %s; disabling paranoia mode"),
|
||||
exit (1);
|
||||
}
|
||||
|
||||
-#ifdef HAVE_NETLINK
|
||||
- if (dbs[hstdb].enabled)
|
||||
- {
|
||||
- /* Try to open netlink socket to monitor network setting changes. */
|
||||
- nl_status_fd = socket (AF_NETLINK,
|
||||
- SOCK_RAW | SOCK_CLOEXEC | SOCK_NONBLOCK,
|
||||
- NETLINK_ROUTE);
|
||||
- if (nl_status_fd != -1)
|
||||
- {
|
||||
- struct sockaddr_nl snl;
|
||||
- memset (&snl, '\0', sizeof (snl));
|
||||
- snl.nl_family = AF_NETLINK;
|
||||
- /* XXX Is this the best set to use? */
|
||||
- snl.nl_groups = (RTMGRP_IPV4_IFADDR | RTMGRP_TC | RTMGRP_IPV4_MROUTE
|
||||
- | RTMGRP_IPV4_ROUTE | RTMGRP_IPV4_RULE
|
||||
- | RTMGRP_IPV6_IFADDR | RTMGRP_IPV6_MROUTE
|
||||
- | RTMGRP_IPV6_ROUTE | RTMGRP_IPV6_IFINFO
|
||||
- | RTMGRP_IPV6_PREFIX);
|
||||
-
|
||||
- if (bind (nl_status_fd, (struct sockaddr *) &snl, sizeof (snl)) != 0)
|
||||
- {
|
||||
- close (nl_status_fd);
|
||||
- nl_status_fd = -1;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- /* Start the timestamp process. */
|
||||
- dbs[hstdb].head->extra_data[NSCD_HST_IDX_CONF_TIMESTAMP]
|
||||
- = __bump_nl_timestamp ();
|
||||
-
|
||||
-# ifndef __ASSUME_SOCK_CLOEXEC
|
||||
- if (have_sock_cloexec < 0)
|
||||
- {
|
||||
- /* We don't want to get stuck on accept. */
|
||||
- int fl = fcntl (nl_status_fd, F_GETFL);
|
||||
- if (fl == -1
|
||||
- || fcntl (nl_status_fd, F_SETFL, fl | O_NONBLOCK) == -1)
|
||||
- {
|
||||
- dbg_log (_("\
|
||||
-cannot change socket to nonblocking mode: %s"),
|
||||
- strerror (errno));
|
||||
- exit (1);
|
||||
- }
|
||||
-
|
||||
- /* The descriptor needs to be closed on exec. */
|
||||
- if (paranoia
|
||||
- && fcntl (nl_status_fd, F_SETFD, FD_CLOEXEC) == -1)
|
||||
- {
|
||||
- dbg_log (_("cannot set socket to close on exec: %s"),
|
||||
- strerror (errno));
|
||||
- exit (1);
|
||||
- }
|
||||
- }
|
||||
-# endif
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
/* Change to unprivileged uid/gid/groups if specified in config file */
|
||||
if (server_user != NULL)
|
||||
finish_drop_privileges ();
|
||||
@@ -1895,18 +1826,6 @@ main_loop_poll (void)
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef HAVE_NETLINK
|
||||
- size_t idx_nl_status_fd = 0;
|
||||
- if (nl_status_fd != -1)
|
||||
- {
|
||||
- idx_nl_status_fd = nused;
|
||||
- conns[nused].fd = nl_status_fd;
|
||||
- conns[nused].events = POLLRDNORM;
|
||||
- ++nused;
|
||||
- firstfree = nused;
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
while (1)
|
||||
{
|
||||
/* Wait for any event. We wait at most a couple of seconds so
|
||||
@@ -2049,20 +1968,6 @@ disabled inotify after read error %d"),
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef HAVE_NETLINK
|
||||
- if (idx_nl_status_fd != 0 && conns[idx_nl_status_fd].revents != 0)
|
||||
- {
|
||||
- char buf[4096];
|
||||
- /* Read all the data. We do not interpret it here. */
|
||||
- while (TEMP_FAILURE_RETRY (read (nl_status_fd, buf,
|
||||
- sizeof (buf))) != -1)
|
||||
- ;
|
||||
-
|
||||
- dbs[hstdb].head->extra_data[NSCD_HST_IDX_CONF_TIMESTAMP]
|
||||
- = __bump_nl_timestamp ();
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
for (size_t cnt = first; cnt < nused && n > 0; ++cnt)
|
||||
if (conns[cnt].revents != 0)
|
||||
{
|
||||
@@ -2141,17 +2046,6 @@ main_loop_epoll (int efd)
|
||||
}
|
||||
# endif
|
||||
|
||||
-# ifdef HAVE_NETLINK
|
||||
- if (nl_status_fd != -1)
|
||||
- {
|
||||
- ev.events = EPOLLRDNORM;
|
||||
- ev.data.fd = nl_status_fd;
|
||||
- if (epoll_ctl (efd, EPOLL_CTL_ADD, nl_status_fd, &ev) == -1)
|
||||
- /* We cannot use epoll. */
|
||||
- return;
|
||||
- }
|
||||
-# endif
|
||||
-
|
||||
while (1)
|
||||
{
|
||||
struct epoll_event revs[100];
|
||||
@@ -2268,18 +2162,6 @@ main_loop_epoll (int efd)
|
||||
}
|
||||
}
|
||||
# endif
|
||||
-# ifdef HAVE_NETLINK
|
||||
- else if (revs[cnt].data.fd == nl_status_fd)
|
||||
- {
|
||||
- char buf[4096];
|
||||
- /* Read all the data. We do not interpret it here. */
|
||||
- while (TEMP_FAILURE_RETRY (read (nl_status_fd, buf,
|
||||
- sizeof (buf))) != -1)
|
||||
- ;
|
||||
-
|
||||
- __bump_nl_timestamp ();
|
||||
- }
|
||||
-# endif
|
||||
else
|
||||
{
|
||||
/* Remove the descriptor from the epoll descriptor. */
|
||||
@@ -2303,7 +2185,6 @@ main_loop_epoll (int efd)
|
||||
time_t laststart = now - ACCEPT_TIMEOUT;
|
||||
assert (starttime[sock] == 0);
|
||||
assert (inotify_fd == -1 || starttime[inotify_fd] == 0);
|
||||
- assert (nl_status_fd == -1 || starttime[nl_status_fd] == 0);
|
||||
for (int cnt = highest; cnt > STDERR_FILENO; --cnt)
|
||||
if (starttime[cnt] != 0 && starttime[cnt] < laststart)
|
||||
{
|
||||
diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h
|
||||
index b5cd2d2..caad26a 100644
|
||||
--- a/nscd/nscd-client.h
|
||||
+++ b/nscd/nscd-client.h
|
||||
@@ -260,17 +260,12 @@ struct hashentry
|
||||
|
||||
|
||||
/* Current persistent database version. */
|
||||
-#define DB_VERSION 2
|
||||
+#define DB_VERSION 1
|
||||
|
||||
/* Maximum time allowed between updates of the timestamp. */
|
||||
#define MAPPING_TIMEOUT (5 * 60)
|
||||
|
||||
|
||||
-/* Used indices for the EXTRA_DATA element of 'database_pers_head'.
|
||||
- Each database has its own indices. */
|
||||
-#define NSCD_HST_IDX_CONF_TIMESTAMP 0
|
||||
-
|
||||
-
|
||||
/* Header of persistent database file. */
|
||||
struct database_pers_head
|
||||
{
|
||||
@@ -279,8 +274,6 @@ struct database_pers_head
|
||||
volatile int32_t gc_cycle;
|
||||
volatile int32_t nscd_certainly_running;
|
||||
volatile nscd_time_t timestamp;
|
||||
- /* Room for extensions. */
|
||||
- volatile uint32_t extra_data[4];
|
||||
|
||||
nscd_ssize_t module;
|
||||
nscd_ssize_t data_size;
|
||||
@@ -329,12 +322,6 @@ extern int __nscd_open_socket (const char *key, size_t keylen,
|
||||
request_type type, void *response,
|
||||
size_t responselen) attribute_hidden;
|
||||
|
||||
-/* Try to get a file descriptor for the shared meory segment
|
||||
- containing the database. */
|
||||
-extern struct mapped_database *__nscd_get_mapping (request_type type,
|
||||
- const char *key,
|
||||
- struct mapped_database **mappedp) attribute_hidden;
|
||||
-
|
||||
/* Get reference of mapping. */
|
||||
extern struct mapped_database *__nscd_get_map_ref (request_type type,
|
||||
const char *name,
|
||||
@@ -384,7 +371,4 @@ extern ssize_t writeall (int fd, const void *buf, size_t len)
|
||||
extern ssize_t sendfileall (int tofd, int fromfd, off_t off, size_t len)
|
||||
attribute_hidden;
|
||||
|
||||
-/* Get netlink timestamp counter from mapped area or zero. */
|
||||
-extern uint32_t __nscd_get_nl_timestamp (void);
|
||||
-
|
||||
#endif /* nscd.h */
|
||||
diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c
|
||||
index 6ee142d..70631fa 100644
|
||||
--- a/nscd/nscd_gethst_r.c
|
||||
+++ b/nscd/nscd_gethst_r.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 1998-2005, 2006, 2007, 2008, 2009, 2011
|
||||
+/* Copyright (C) 1998-2005, 2006, 2007, 2008, 2009
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||
@@ -98,27 +98,6 @@ libc_freeres_fn (hst_map_free)
|
||||
}
|
||||
|
||||
|
||||
-uint32_t
|
||||
-__nscd_get_nl_timestamp (void)
|
||||
-{
|
||||
- if (__nss_not_use_nscd_hosts != 0)
|
||||
- return 0;
|
||||
-
|
||||
- struct mapped_database *map = __hst_map_handle.mapped;
|
||||
-
|
||||
- if (map == NULL
|
||||
- || (map != NO_MAPPING
|
||||
- && map->head->nscd_certainly_running == 0
|
||||
- && map->head->timestamp + MAPPING_TIMEOUT < time (NULL)))
|
||||
- map = __nscd_get_mapping (GETFDHST, "hosts", &__hst_map_handle.mapped);
|
||||
-
|
||||
- if (map == NO_MAPPING)
|
||||
- return 0;
|
||||
-
|
||||
- return map->head->extra_data[NSCD_HST_IDX_CONF_TIMESTAMP];
|
||||
-}
|
||||
-
|
||||
-
|
||||
int __nss_have_localdomain attribute_hidden;
|
||||
|
||||
static int
|
||||
diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
|
||||
index 365b599..fe63f9a 100644
|
||||
--- a/nscd/nscd_helper.c
|
||||
+++ b/nscd/nscd_helper.c
|
||||
@@ -277,9 +277,9 @@ __nscd_unmap (struct mapped_database *mapped)
|
||||
|
||||
/* Try to get a file descriptor for the shared meory segment
|
||||
containing the database. */
|
||||
-struct mapped_database *
|
||||
-__nscd_get_mapping (request_type type, const char *key,
|
||||
- struct mapped_database **mappedp)
|
||||
+static struct mapped_database *
|
||||
+get_mapping (request_type type, const char *key,
|
||||
+ struct mapped_database **mappedp)
|
||||
{
|
||||
struct mapped_database *result = NO_MAPPING;
|
||||
#ifdef SCM_RIGHTS
|
||||
@@ -449,8 +449,8 @@ __nscd_get_map_ref (request_type type, const char *name,
|
||||
|| (cur->head->nscd_certainly_running == 0
|
||||
&& cur->head->timestamp + MAPPING_TIMEOUT < time (NULL))
|
||||
|| cur->head->data_size > cur->datasize)
|
||||
- cur = __nscd_get_mapping (type, name,
|
||||
- (struct mapped_database **) &mapptr->mapped);
|
||||
+ cur = get_mapping (type, name,
|
||||
+ (struct mapped_database **) &mapptr->mapped);
|
||||
|
||||
if (__builtin_expect (cur != NO_MAPPING, 1))
|
||||
{
|
||||
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
|
||||
index 1a023f9..4979805 100644
|
||||
--- a/sysdeps/posix/getaddrinfo.c
|
||||
+++ b/sysdeps/posix/getaddrinfo.c
|
||||
@@ -2386,7 +2386,7 @@ getaddrinfo (const char *name, const char *service,
|
||||
|| (hints->ai_family == PF_INET6 && ! seen_ipv6))
|
||||
{
|
||||
/* We cannot possibly return a valid answer. */
|
||||
- __free_in6ai (in6ai);
|
||||
+ free (in6ai);
|
||||
return EAI_NONAME;
|
||||
}
|
||||
}
|
||||
@@ -2400,7 +2400,7 @@ getaddrinfo (const char *name, const char *service,
|
||||
{
|
||||
if (hints->ai_flags & AI_NUMERICSERV)
|
||||
{
|
||||
- __free_in6ai (in6ai);
|
||||
+ free (in6ai);
|
||||
return EAI_NONAME;
|
||||
}
|
||||
|
||||
@@ -2422,7 +2422,7 @@ getaddrinfo (const char *name, const char *service,
|
||||
if (last_i != 0)
|
||||
{
|
||||
freeaddrinfo (p);
|
||||
- __free_in6ai (in6ai);
|
||||
+ free (in6ai);
|
||||
|
||||
return -(last_i & GAIH_EAI);
|
||||
}
|
||||
@@ -2434,7 +2434,7 @@ getaddrinfo (const char *name, const char *service,
|
||||
}
|
||||
else
|
||||
{
|
||||
- __free_in6ai (in6ai);
|
||||
+ free (in6ai);
|
||||
return EAI_FAMILY;
|
||||
}
|
||||
|
||||
@@ -2622,7 +2622,7 @@ getaddrinfo (const char *name, const char *service,
|
||||
p->ai_canonname = canonname;
|
||||
}
|
||||
|
||||
- __free_in6ai (in6ai);
|
||||
+ free (in6ai);
|
||||
|
||||
if (p)
|
||||
{
|
||||
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
|
||||
index e684b16..c907af4 100644
|
||||
--- a/sysdeps/unix/sysv/linux/Makefile
|
||||
+++ b/sysdeps/unix/sysv/linux/Makefile
|
||||
@@ -173,6 +173,6 @@ CFLAGS-mq_receive.c += -fexceptions
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),nscd)
|
||||
-sysdep-CFLAGS += -DHAVE_EPOLL -DHAVE_SENDFILE -DHAVE_INOTIFY -DHAVE_NETLINK
|
||||
+sysdep-CFLAGS += -DHAVE_EPOLL -DHAVE_SENDFILE -DHAVE_INOTIFY
|
||||
CFLAGS-gai.c += -DNEED_NETLINK
|
||||
endif
|
||||
diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
|
||||
index 0738a70..d5ad7ea 100644
|
||||
--- a/sysdeps/unix/sysv/linux/check_pf.c
|
||||
+++ b/sysdeps/unix/sysv/linux/check_pf.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Determine protocol families for which interfaces exist. Linux version.
|
||||
- Copyright (C) 2003, 2006-2008, 2010, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2003, 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -33,9 +33,6 @@
|
||||
|
||||
#include <not-cancel.h>
|
||||
#include <kernel-features.h>
|
||||
-#include <bits/libc-lock.h>
|
||||
-#include <atomic.h>
|
||||
-#include <nscd/nscd-client.h>
|
||||
|
||||
|
||||
#ifndef IFA_F_HOMEADDRESS
|
||||
@@ -46,42 +43,9 @@
|
||||
#endif
|
||||
|
||||
|
||||
-struct cached_data
|
||||
-{
|
||||
- uint32_t timestamp;
|
||||
- uint32_t usecnt;
|
||||
- bool seen_ipv4;
|
||||
- bool seen_ipv6;
|
||||
- size_t in6ailen;
|
||||
- struct in6addrinfo in6ai[0];
|
||||
-};
|
||||
-
|
||||
-static struct cached_data noai6ai_cached =
|
||||
- {
|
||||
- .usecnt = 1, /* Make sure we never try to delete this entry. */
|
||||
- .in6ailen = 0
|
||||
- };
|
||||
-
|
||||
-static struct cached_data *cache;
|
||||
-__libc_lock_define_initialized (static, lock);
|
||||
-
|
||||
-
|
||||
-#ifdef IS_IN_nscd
|
||||
-static uint32_t nl_timestamp;
|
||||
-
|
||||
-uint32_t
|
||||
-__bump_nl_timestamp (void)
|
||||
-{
|
||||
- if (atomic_increment_val (&nl_timestamp) == 0)
|
||||
- atomic_increment (&nl_timestamp);
|
||||
-
|
||||
- return nl_timestamp;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
-
|
||||
-static struct cached_data *
|
||||
-make_request (int fd, pid_t pid)
|
||||
+static int
|
||||
+make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
|
||||
+ struct in6addrinfo **in6ai, size_t *in6ailen)
|
||||
{
|
||||
struct req
|
||||
{
|
||||
@@ -135,6 +99,9 @@ make_request (int fd, pid_t pid)
|
||||
sizeof (nladdr))) < 0)
|
||||
goto out_fail;
|
||||
|
||||
+ *seen_ipv4 = false;
|
||||
+ *seen_ipv6 = false;
|
||||
+
|
||||
bool done = false;
|
||||
struct in6ailist
|
||||
{
|
||||
@@ -142,8 +109,6 @@ make_request (int fd, pid_t pid)
|
||||
struct in6ailist *next;
|
||||
} *in6ailist = NULL;
|
||||
size_t in6ailistlen = 0;
|
||||
- bool seen_ipv4 = false;
|
||||
- bool seen_ipv6 = false;
|
||||
|
||||
do
|
||||
{
|
||||
@@ -207,12 +172,12 @@ make_request (int fd, pid_t pid)
|
||||
{
|
||||
if (*(const in_addr_t *) address
|
||||
!= htonl (INADDR_LOOPBACK))
|
||||
- seen_ipv4 = true;
|
||||
+ *seen_ipv4 = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!IN6_IS_ADDR_LOOPBACK (address))
|
||||
- seen_ipv6 = true;
|
||||
+ *seen_ipv6 = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,47 +211,30 @@ make_request (int fd, pid_t pid)
|
||||
}
|
||||
while (! done);
|
||||
|
||||
- struct cached_data *result;
|
||||
- if (seen_ipv6 && in6ailist != NULL)
|
||||
+ if (*seen_ipv6 && in6ailist != NULL)
|
||||
{
|
||||
- result = malloc (sizeof (*result)
|
||||
- + in6ailistlen * sizeof (struct in6addrinfo));
|
||||
- if (result == NULL)
|
||||
+ *in6ai = malloc (in6ailistlen * sizeof (**in6ai));
|
||||
+ if (*in6ai == NULL)
|
||||
goto out_fail;
|
||||
|
||||
-#ifdef IS_IN_nscd
|
||||
- result->timestamp = nl_timestamp;
|
||||
-#else
|
||||
- result->timestamp = __nscd_get_nl_timestamp ();
|
||||
-#endif
|
||||
- result->usecnt = 2;
|
||||
- result->seen_ipv4 = seen_ipv4;
|
||||
- result->seen_ipv6 = true;
|
||||
- result->in6ailen = in6ailistlen;
|
||||
+ *in6ailen = in6ailistlen;
|
||||
|
||||
do
|
||||
{
|
||||
- result->in6ai[--in6ailistlen] = in6ailist->info;
|
||||
+ (*in6ai)[--in6ailistlen] = in6ailist->info;
|
||||
in6ailist = in6ailist->next;
|
||||
}
|
||||
while (in6ailist != NULL);
|
||||
}
|
||||
- else
|
||||
- {
|
||||
- atomic_add (&noai6ai_cached.usecnt, 2);
|
||||
- noai6ai_cached.seen_ipv4 = seen_ipv4;
|
||||
- noai6ai_cached.seen_ipv6 = seen_ipv6;
|
||||
- result = &noai6ai_cached;
|
||||
- }
|
||||
|
||||
if (use_malloc)
|
||||
free (buf);
|
||||
- return result;
|
||||
+ return 0;
|
||||
|
||||
out_fail:
|
||||
if (use_malloc)
|
||||
free (buf);
|
||||
- return NULL;
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -310,65 +258,28 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
|
||||
|
||||
if (! __no_netlink_support)
|
||||
{
|
||||
- struct cached_data *olddata = NULL;
|
||||
- struct cached_data *data = NULL;
|
||||
+ int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
|
||||
|
||||
- __libc_lock_lock (lock);
|
||||
-
|
||||
-#ifdef IS_IN_nscd
|
||||
-# define cache_valid() nl_timestamp != 0 && cache->timestamp == nl_timestamp
|
||||
-#else
|
||||
-# define cache_valid() \
|
||||
- ({ uint32_t val = __nscd_get_nl_timestamp (); \
|
||||
- val != 0 && cache->timestamp == val; })
|
||||
-#endif
|
||||
- if (cache != NULL && cache_valid ())
|
||||
- {
|
||||
- data = cache;
|
||||
- atomic_increment (&cache->usecnt);
|
||||
- }
|
||||
- else
|
||||
+ if (__builtin_expect (fd >= 0, 1))
|
||||
{
|
||||
- int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
|
||||
+ struct sockaddr_nl nladdr;
|
||||
+ memset (&nladdr, '\0', sizeof (nladdr));
|
||||
+ nladdr.nl_family = AF_NETLINK;
|
||||
|
||||
- if (__builtin_expect (fd >= 0, 1))
|
||||
- {
|
||||
- struct sockaddr_nl nladdr;
|
||||
- memset (&nladdr, '\0', sizeof (nladdr));
|
||||
- nladdr.nl_family = AF_NETLINK;
|
||||
-
|
||||
- socklen_t addr_len = sizeof (nladdr);
|
||||
-
|
||||
- if(__bind (fd, (struct sockaddr *) &nladdr, sizeof (nladdr)) == 0
|
||||
- && __getsockname (fd, (struct sockaddr *) &nladdr,
|
||||
- &addr_len) == 0)
|
||||
- data = make_request (fd, nladdr.nl_pid);
|
||||
-
|
||||
- close_not_cancel_no_status (fd);
|
||||
- }
|
||||
-
|
||||
- if (data != NULL)
|
||||
- {
|
||||
- olddata = cache;
|
||||
- cache = data;
|
||||
- }
|
||||
- }
|
||||
+ socklen_t addr_len = sizeof (nladdr);
|
||||
|
||||
- __libc_lock_unlock (lock);
|
||||
+ bool success
|
||||
+ = (__bind (fd, (struct sockaddr *) &nladdr, sizeof (nladdr)) == 0
|
||||
+ && __getsockname (fd, (struct sockaddr *) &nladdr,
|
||||
+ &addr_len) == 0
|
||||
+ && make_request (fd, nladdr.nl_pid, seen_ipv4, seen_ipv6,
|
||||
+ in6ai, in6ailen) == 0);
|
||||
|
||||
- if (data != NULL)
|
||||
- {
|
||||
- /* It worked. */
|
||||
- *seen_ipv4 = data->seen_ipv4;
|
||||
- *seen_ipv6 = data->seen_ipv6;
|
||||
- *in6ailen = data->in6ailen;
|
||||
- *in6ai = data->in6ai;
|
||||
-
|
||||
- if (olddata != NULL && olddata->usecnt > 0
|
||||
- && atomic_add_zero (&olddata->usecnt, -1))
|
||||
- free (olddata);
|
||||
+ close_not_cancel_no_status (fd);
|
||||
|
||||
- return;
|
||||
+ if (success)
|
||||
+ /* It worked. */
|
||||
+ return;
|
||||
}
|
||||
|
||||
#if __ASSUME_NETLINK_SUPPORT == 0
|
||||
@@ -407,26 +318,3 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
|
||||
(void) freeifaddrs (ifa);
|
||||
#endif
|
||||
}
|
||||
-
|
||||
-
|
||||
-void
|
||||
-__free_in6ai (struct in6addrinfo *ai)
|
||||
-{
|
||||
- if (ai != NULL)
|
||||
- {
|
||||
- struct cached_data *data =
|
||||
- (struct cached_data *) ((char *) ai
|
||||
- - offsetof (struct cached_data, in6ai));
|
||||
-
|
||||
- if (atomic_add_zero (&data->usecnt, -1))
|
||||
- {
|
||||
- __libc_lock_lock (lock);
|
||||
-
|
||||
- if (data->usecnt == 0)
|
||||
- /* Still unused. */
|
||||
- free (data);
|
||||
-
|
||||
- __libc_lock_unlock (lock);
|
||||
- }
|
||||
- }
|
||||
-}
|
158
lib32-glibc/glibc-2.15-rintf-rounding.patch
Normal file
158
lib32-glibc/glibc-2.15-rintf-rounding.patch
Normal file
@ -0,0 +1,158 @@
|
||||
diff --git a/math/libm-test.inc b/math/libm-test.inc
|
||||
index 6243e1e..c8186c8 100644
|
||||
--- a/math/libm-test.inc
|
||||
+++ b/math/libm-test.inc
|
||||
@@ -5037,6 +5037,22 @@ rint_test (void)
|
||||
TEST_f_f (rint, 262142.75, 262143.0);
|
||||
TEST_f_f (rint, 524286.75, 524287.0);
|
||||
TEST_f_f (rint, 524288.75, 524289.0);
|
||||
+ TEST_f_f (rint, 1048576.75, 1048577.0);
|
||||
+ TEST_f_f (rint, 2097152.75, 2097153.0);
|
||||
+ TEST_f_f (rint, -1048576.75, -1048577.0);
|
||||
+ TEST_f_f (rint, -2097152.75, -2097153.0);
|
||||
+#ifndef TEST_FLOAT
|
||||
+ TEST_f_f (rint, 70368744177664.75, 70368744177665.0);
|
||||
+ TEST_f_f (rint, 140737488355328.75, 140737488355329.0);
|
||||
+ TEST_f_f (rint, 281474976710656.75, 281474976710657.0);
|
||||
+ TEST_f_f (rint, 562949953421312.75, 562949953421313.0);
|
||||
+ TEST_f_f (rint, 1125899906842624.75, 1125899906842625.0);
|
||||
+ TEST_f_f (rint, -70368744177664.75, -70368744177665.0);
|
||||
+ TEST_f_f (rint, -140737488355328.75, -140737488355329.0);
|
||||
+ TEST_f_f (rint, -281474976710656.75, -281474976710657.0);
|
||||
+ TEST_f_f (rint, -562949953421312.75, -562949953421313.0);
|
||||
+ TEST_f_f (rint, -1125899906842624.75, -1125899906842625.0);
|
||||
+#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
/* The result can only be represented in long double. */
|
||||
TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L);
|
||||
@@ -5137,6 +5153,22 @@ rint_test_tonearest (void)
|
||||
TEST_f_f (rint, -0.1, -0.0);
|
||||
TEST_f_f (rint, -0.25, -0.0);
|
||||
TEST_f_f (rint, -0.625, -1.0);
|
||||
+ TEST_f_f (rint, 1048576.75, 1048577.0);
|
||||
+ TEST_f_f (rint, 2097152.75, 2097153.0);
|
||||
+ TEST_f_f (rint, -1048576.75, -1048577.0);
|
||||
+ TEST_f_f (rint, -2097152.75, -2097153.0);
|
||||
+#ifndef TEST_FLOAT
|
||||
+ TEST_f_f (rint, 70368744177664.75, 70368744177665.0);
|
||||
+ TEST_f_f (rint, 140737488355328.75, 140737488355329.0);
|
||||
+ TEST_f_f (rint, 281474976710656.75, 281474976710657.0);
|
||||
+ TEST_f_f (rint, 562949953421312.75, 562949953421313.0);
|
||||
+ TEST_f_f (rint, 1125899906842624.75, 1125899906842625.0);
|
||||
+ TEST_f_f (rint, -70368744177664.75, -70368744177665.0);
|
||||
+ TEST_f_f (rint, -140737488355328.75, -140737488355329.0);
|
||||
+ TEST_f_f (rint, -281474976710656.75, -281474976710657.0);
|
||||
+ TEST_f_f (rint, -562949953421312.75, -562949953421313.0);
|
||||
+ TEST_f_f (rint, -1125899906842624.75, -1125899906842625.0);
|
||||
+#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
/* The result can only be represented in long double. */
|
||||
TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L);
|
||||
@@ -5207,6 +5239,22 @@ rint_test_towardzero (void)
|
||||
TEST_f_f (rint, -0.1, -0.0);
|
||||
TEST_f_f (rint, -0.25, -0.0);
|
||||
TEST_f_f (rint, -0.625, -0.0);
|
||||
+ TEST_f_f (rint, 1048576.75, 1048576.0);
|
||||
+ TEST_f_f (rint, 2097152.75, 2097152.0);
|
||||
+ TEST_f_f (rint, -1048576.75, -1048576.0);
|
||||
+ TEST_f_f (rint, -2097152.75, -2097152.0);
|
||||
+#ifndef TEST_FLOAT
|
||||
+ TEST_f_f (rint, 70368744177664.75, 70368744177664.0);
|
||||
+ TEST_f_f (rint, 140737488355328.75, 140737488355328.0);
|
||||
+ TEST_f_f (rint, 281474976710656.75, 281474976710656.0);
|
||||
+ TEST_f_f (rint, 562949953421312.75, 562949953421312.0);
|
||||
+ TEST_f_f (rint, 1125899906842624.75, 1125899906842624.0);
|
||||
+ TEST_f_f (rint, -70368744177664.75, -70368744177664.0);
|
||||
+ TEST_f_f (rint, -140737488355328.75, -140737488355328.0);
|
||||
+ TEST_f_f (rint, -281474976710656.75, -281474976710656.0);
|
||||
+ TEST_f_f (rint, -562949953421312.75, -562949953421312.0);
|
||||
+ TEST_f_f (rint, -1125899906842624.75, -1125899906842624.0);
|
||||
+#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
/* The result can only be represented in long double. */
|
||||
TEST_f_f (rint, 4503599627370495.5L, 4503599627370495.0L);
|
||||
@@ -5277,6 +5325,22 @@ rint_test_downward (void)
|
||||
TEST_f_f (rint, -0.1, -1.0);
|
||||
TEST_f_f (rint, -0.25, -1.0);
|
||||
TEST_f_f (rint, -0.625, -1.0);
|
||||
+ TEST_f_f (rint, 1048576.75, 1048576.0);
|
||||
+ TEST_f_f (rint, 2097152.75, 2097152.0);
|
||||
+ TEST_f_f (rint, -1048576.75, -1048577.0);
|
||||
+ TEST_f_f (rint, -2097152.75, -2097153.0);
|
||||
+#ifndef TEST_FLOAT
|
||||
+ TEST_f_f (rint, 70368744177664.75, 70368744177664.0);
|
||||
+ TEST_f_f (rint, 140737488355328.75, 140737488355328.0);
|
||||
+ TEST_f_f (rint, 281474976710656.75, 281474976710656.0);
|
||||
+ TEST_f_f (rint, 562949953421312.75, 562949953421312.0);
|
||||
+ TEST_f_f (rint, 1125899906842624.75, 1125899906842624.0);
|
||||
+ TEST_f_f (rint, -70368744177664.75, -70368744177665.0);
|
||||
+ TEST_f_f (rint, -140737488355328.75, -140737488355329.0);
|
||||
+ TEST_f_f (rint, -281474976710656.75, -281474976710657.0);
|
||||
+ TEST_f_f (rint, -562949953421312.75, -562949953421313.0);
|
||||
+ TEST_f_f (rint, -1125899906842624.75, -1125899906842625.0);
|
||||
+#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
/* The result can only be represented in long double. */
|
||||
TEST_f_f (rint, 4503599627370495.5L, 4503599627370495.0L);
|
||||
@@ -5347,6 +5411,22 @@ rint_test_upward (void)
|
||||
TEST_f_f (rint, -0.1, -0.0);
|
||||
TEST_f_f (rint, -0.25, -0.0);
|
||||
TEST_f_f (rint, -0.625, -0.0);
|
||||
+ TEST_f_f (rint, 1048576.75, 1048577.0);
|
||||
+ TEST_f_f (rint, 2097152.75, 2097153.0);
|
||||
+ TEST_f_f (rint, -1048576.75, -1048576.0);
|
||||
+ TEST_f_f (rint, -2097152.75, -2097152.0);
|
||||
+#ifndef TEST_FLOAT
|
||||
+ TEST_f_f (rint, 70368744177664.75, 70368744177665.0);
|
||||
+ TEST_f_f (rint, 140737488355328.75, 140737488355329.0);
|
||||
+ TEST_f_f (rint, 281474976710656.75, 281474976710657.0);
|
||||
+ TEST_f_f (rint, 562949953421312.75, 562949953421313.0);
|
||||
+ TEST_f_f (rint, 1125899906842624.75, 1125899906842625.0);
|
||||
+ TEST_f_f (rint, -70368744177664.75, -70368744177664.0);
|
||||
+ TEST_f_f (rint, -140737488355328.75, -140737488355328.0);
|
||||
+ TEST_f_f (rint, -281474976710656.75, -281474976710656.0);
|
||||
+ TEST_f_f (rint, -562949953421312.75, -562949953421312.0);
|
||||
+ TEST_f_f (rint, -1125899906842624.75, -1125899906842624.0);
|
||||
+#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
/* The result can only be represented in long double. */
|
||||
TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L);
|
||||
diff --git a/sysdeps/ieee754/flt-32/s_rintf.c b/sysdeps/ieee754/flt-32/s_rintf.c
|
||||
index 9ea9b6f..9ba6b57 100644
|
||||
--- a/sysdeps/ieee754/flt-32/s_rintf.c
|
||||
+++ b/sysdeps/ieee754/flt-32/s_rintf.c
|
||||
@@ -26,34 +26,22 @@ float
|
||||
__rintf(float x)
|
||||
{
|
||||
int32_t i0,j0,sx;
|
||||
- u_int32_t i,i1;
|
||||
float w,t;
|
||||
GET_FLOAT_WORD(i0,x);
|
||||
sx = (i0>>31)&1;
|
||||
j0 = ((i0>>23)&0xff)-0x7f;
|
||||
if(j0<23) {
|
||||
if(j0<0) {
|
||||
- if((i0&0x7fffffff)==0) return x;
|
||||
- i1 = (i0&0x07fffff);
|
||||
- i0 &= 0xfff00000;
|
||||
- i0 |= ((i1|-i1)>>9)&0x400000;
|
||||
- SET_FLOAT_WORD(x,i0);
|
||||
w = TWO23[sx]+x;
|
||||
t = w-TWO23[sx];
|
||||
GET_FLOAT_WORD(i0,t);
|
||||
SET_FLOAT_WORD(t,(i0&0x7fffffff)|(sx<<31));
|
||||
return t;
|
||||
- } else {
|
||||
- i = (0x007fffff)>>j0;
|
||||
- if((i0&i)==0) return x; /* x is integral */
|
||||
- i>>=1;
|
||||
- if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0);
|
||||
}
|
||||
} else {
|
||||
if(j0==0x80) return x+x; /* inf or NaN */
|
||||
else return x; /* x is integral */
|
||||
}
|
||||
- SET_FLOAT_WORD(x,i0);
|
||||
w = TWO23[sx]+x;
|
||||
return w-TWO23[sx];
|
||||
}
|
19
lib32-glibc/glibc-2.15-scanf.patch
Normal file
19
lib32-glibc/glibc-2.15-scanf.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
|
||||
index 0e71deb..e18a6c3 100644
|
||||
--- a/stdio-common/vfscanf.c
|
||||
+++ b/stdio-common/vfscanf.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 1991-2006, 2007, 2010, 2011 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 1991-2007, 2010, 2011, 2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -274,7 +274,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
|
||||
CHAR_T *old = wp; \
|
||||
size_t newsize = (UCHAR_MAX + 1 > 2 * wpmax \
|
||||
? UCHAR_MAX + 1 : 2 * wpmax); \
|
||||
- if (use_malloc || __libc_use_alloca (newsize)) \
|
||||
+ if (use_malloc || !__libc_use_alloca (newsize)) \
|
||||
{ \
|
||||
wp = realloc (use_malloc ? wp : NULL, newsize); \
|
||||
if (wp == NULL) \
|
48
lib32-glibc/glibc-2.15-strcasecmp-disable-avx.patch
Normal file
48
lib32-glibc/glibc-2.15-strcasecmp-disable-avx.patch
Normal file
@ -0,0 +1,48 @@
|
||||
diff --git a/sysdeps/x86_64/multiarch/strcmp.S b/sysdeps/x86_64/multiarch/strcmp.S
|
||||
index f93c83d..d8aa889 100644
|
||||
--- a/sysdeps/x86_64/multiarch/strcmp.S
|
||||
+++ b/sysdeps/x86_64/multiarch/strcmp.S
|
||||
@@ -105,11 +105,6 @@ ENTRY(__strcasecmp)
|
||||
jne 1f
|
||||
call __init_cpu_features
|
||||
1:
|
||||
-# ifdef HAVE_AVX_SUPPORT
|
||||
- leaq __strcasecmp_avx(%rip), %rax
|
||||
- testl $bit_AVX, __cpu_features+CPUID_OFFSET+index_AVX(%rip)
|
||||
- jnz 2f
|
||||
-# endif
|
||||
leaq __strcasecmp_sse42(%rip), %rax
|
||||
testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
|
||||
jnz 2f
|
||||
@@ -128,11 +123,6 @@ ENTRY(__strncasecmp)
|
||||
jne 1f
|
||||
call __init_cpu_features
|
||||
1:
|
||||
-# ifdef HAVE_AVX_SUPPORT
|
||||
- leaq __strncasecmp_avx(%rip), %rax
|
||||
- testl $bit_AVX, __cpu_features+CPUID_OFFSET+index_AVX(%rip)
|
||||
- jnz 2f
|
||||
-# endif
|
||||
leaq __strncasecmp_sse42(%rip), %rax
|
||||
testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
|
||||
jnz 2f
|
||||
@@ -152,19 +142,6 @@ weak_alias (__strncasecmp, strncasecmp)
|
||||
# include "strcmp-sse42.S"
|
||||
|
||||
|
||||
-# ifdef HAVE_AVX_SUPPORT
|
||||
-# if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
|
||||
-# define LABEL(l) .L##l##_avx
|
||||
-# define GLABEL(l) l##_avx
|
||||
-# define USE_AVX 1
|
||||
-# undef STRCMP_SSE42
|
||||
-# define STRCMP_SSE42 STRCMP_AVX
|
||||
-# define SECTION avx
|
||||
-# include "strcmp-sse42.S"
|
||||
-# endif
|
||||
-# endif
|
||||
-
|
||||
-
|
||||
# undef ENTRY
|
||||
# define ENTRY(name) \
|
||||
.type STRCMP_SSE2, @function; \
|
40
lib32-glibc/glibc-2.15-vdso.patch
Normal file
40
lib32-glibc/glibc-2.15-vdso.patch
Normal file
@ -0,0 +1,40 @@
|
||||
diff --git a/elf/Makefile b/elf/Makefile
|
||||
index 8234ba7..25ffc57 100644
|
||||
--- a/elf/Makefile
|
||||
+++ b/elf/Makefile
|
||||
@@ -1203,3 +1203,14 @@ $(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so
|
||||
$(objpfx)tst-relsort1mod2.so: $(libm)
|
||||
$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
|
||||
$(objpfx)tst-relsort1mod2.so
|
||||
+
|
||||
+tests: $(objpfx)tst-unused-dep.out
|
||||
+
|
||||
+$(objpfx)tst-unused-dep.out: $(objpfx)testobj1.so
|
||||
+ LD_TRACE_LOADED_OBJECTS=1 \
|
||||
+ LD_DEBUG=unused \
|
||||
+ LD_PRELOAD= \
|
||||
+ $(elf-objpfx)${rtld-installed-name} \
|
||||
+ --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
|
||||
+ $< > $@
|
||||
+ cmp $@ /dev/null > /dev/null
|
||||
diff --git a/elf/rtld.c b/elf/rtld.c
|
||||
index 2e4f97f..3e15447 100644
|
||||
--- a/elf/rtld.c
|
||||
+++ b/elf/rtld.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Run time dynamic linker.
|
||||
- Copyright (C) 1995-2010, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -1375,6 +1375,9 @@ of this helper program; chances are you did not intend to run this program.\n\
|
||||
_dl_setup_hash (l);
|
||||
l->l_relocated = 1;
|
||||
|
||||
+ /* The vDSO is always used. */
|
||||
+ l->l_used = 1;
|
||||
+
|
||||
/* Initialize l_local_scope to contain just this map. This allows
|
||||
the use of dl_lookup_symbol_x to resolve symbols within the vdso.
|
||||
So we create a single entry list pointing to l_real as its only
|
180
lib32-glibc/glibc-2.15-vfprintf-nargs.patch
Normal file
180
lib32-glibc/glibc-2.15-vfprintf-nargs.patch
Normal file
@ -0,0 +1,180 @@
|
||||
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
|
||||
index a847b28..080badc 100644
|
||||
--- a/stdio-common/Makefile
|
||||
+++ b/stdio-common/Makefile
|
||||
@@ -59,7 +59,8 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
|
||||
tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
|
||||
tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
|
||||
bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
|
||||
- scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24
|
||||
+ scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \
|
||||
+ bug-vfprintf-nargs
|
||||
|
||||
test-srcs = tst-unbputc tst-printf
|
||||
|
||||
diff --git a/stdio-common/bug-vfprintf-nargs.c b/stdio-common/bug-vfprintf-nargs.c
|
||||
new file mode 100644
|
||||
index 0000000..13c66c0
|
||||
--- /dev/null
|
||||
+++ b/stdio-common/bug-vfprintf-nargs.c
|
||||
@@ -0,0 +1,78 @@
|
||||
+/* Test for vfprintf nargs allocation overflow (BZ #13656).
|
||||
+ Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+ Contributed by Kees Cook <keescook@chromium.org>, 2012.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, write to the Free
|
||||
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
+ 02111-1307 USA. */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <stdint.h>
|
||||
+#include <unistd.h>
|
||||
+#include <inttypes.h>
|
||||
+#include <string.h>
|
||||
+#include <signal.h>
|
||||
+
|
||||
+static int
|
||||
+format_failed (const char *fmt, const char *expected)
|
||||
+{
|
||||
+ char output[80];
|
||||
+
|
||||
+ printf ("%s : ", fmt);
|
||||
+
|
||||
+ memset (output, 0, sizeof output);
|
||||
+ /* Having sprintf itself detect a failure is good. */
|
||||
+ if (sprintf (output, fmt, 1, 2, 3, "test") > 0
|
||||
+ && strcmp (output, expected) != 0)
|
||||
+ {
|
||||
+ printf ("FAIL (output '%s' != expected '%s')\n", output, expected);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ puts ("ok");
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+do_test (void)
|
||||
+{
|
||||
+ int rc = 0;
|
||||
+ char buf[64];
|
||||
+
|
||||
+ /* Regular positionals work. */
|
||||
+ if (format_failed ("%1$d", "1") != 0)
|
||||
+ rc = 1;
|
||||
+
|
||||
+ /* Regular width positionals work. */
|
||||
+ if (format_failed ("%1$*2$d", " 1") != 0)
|
||||
+ rc = 1;
|
||||
+
|
||||
+ /* Positional arguments are constructed via read_int, so nargs can only
|
||||
+ overflow on 32-bit systems. On 64-bit systems, it will attempt to
|
||||
+ allocate a giant amount of memory and possibly crash, which is the
|
||||
+ expected situation. Since the 64-bit behavior is arch-specific, only
|
||||
+ test this on 32-bit systems. */
|
||||
+ if (sizeof (long int) == 4)
|
||||
+ {
|
||||
+ sprintf (buf, "%%1$d %%%" PRIdPTR "$d", UINT32_MAX / sizeof (int));
|
||||
+ if (format_failed (buf, "1 %$d") != 0)
|
||||
+ rc = 1;
|
||||
+ }
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+#define TEST_FUNCTION do_test ()
|
||||
+#include "../test-skeleton.c"
|
||||
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
|
||||
index 863cd5d..c802e46 100644
|
||||
--- a/stdio-common/vfprintf.c
|
||||
+++ b/stdio-common/vfprintf.c
|
||||
@@ -235,6 +235,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
|
||||
0 if unknown. */
|
||||
int readonly_format = 0;
|
||||
|
||||
+ /* For the argument descriptions, which may be allocated on the heap. */
|
||||
+ void *args_malloced = NULL;
|
||||
+
|
||||
/* This table maps a character into a number representing a
|
||||
class. In each step there is a destination label for each
|
||||
class. */
|
||||
@@ -1647,9 +1650,10 @@ do_positional:
|
||||
determine the size of the array needed to store the argument
|
||||
attributes. */
|
||||
size_t nargs = 0;
|
||||
- int *args_type;
|
||||
- union printf_arg *args_value = NULL;
|
||||
+ size_t bytes_per_arg;
|
||||
+ union printf_arg *args_value;
|
||||
int *args_size;
|
||||
+ int *args_type;
|
||||
|
||||
/* Positional parameters refer to arguments directly. This could
|
||||
also determine the maximum number of arguments. Track the
|
||||
@@ -1698,13 +1702,38 @@ do_positional:
|
||||
|
||||
/* Determine the number of arguments the format string consumes. */
|
||||
nargs = MAX (nargs, max_ref_arg);
|
||||
+ /* Calculate total size needed to represent a single argument across
|
||||
+ all three argument-related arrays. */
|
||||
+ bytes_per_arg = sizeof (*args_value) + sizeof (*args_size)
|
||||
+ + sizeof (*args_type);
|
||||
+
|
||||
+ /* Check for potential integer overflow. */
|
||||
+ if (__builtin_expect (nargs > SIZE_MAX / bytes_per_arg, 0))
|
||||
+ {
|
||||
+ __set_errno (ERANGE);
|
||||
+ done = -1;
|
||||
+ goto all_done;
|
||||
+ }
|
||||
|
||||
- /* Allocate memory for the argument descriptions. */
|
||||
- args_type = alloca (nargs * sizeof (int));
|
||||
+ /* Allocate memory for all three argument arrays. */
|
||||
+ if (__libc_use_alloca (nargs * bytes_per_arg))
|
||||
+ args_value = alloca (nargs * bytes_per_arg);
|
||||
+ else
|
||||
+ {
|
||||
+ args_value = args_malloced = malloc (nargs * bytes_per_arg);
|
||||
+ if (args_value == NULL)
|
||||
+ {
|
||||
+ done = -1;
|
||||
+ goto all_done;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Set up the remaining two arrays to each point past the end of the
|
||||
+ prior array, since space for all three has been allocated now. */
|
||||
+ args_size = &args_value[nargs].pa_int;
|
||||
+ args_type = &args_size[nargs];
|
||||
memset (args_type, s->_flags2 & _IO_FLAGS2_FORTIFY ? '\xff' : '\0',
|
||||
- nargs * sizeof (int));
|
||||
- args_value = alloca (nargs * sizeof (union printf_arg));
|
||||
- args_size = alloca (nargs * sizeof (int));
|
||||
+ nargs * sizeof (*args_type));
|
||||
|
||||
/* XXX Could do sanity check here: If any element in ARGS_TYPE is
|
||||
still zero after this loop, format is invalid. For now we
|
||||
@@ -1973,8 +2002,8 @@ do_positional:
|
||||
}
|
||||
|
||||
all_done:
|
||||
- if (__builtin_expect (workstart != NULL, 0))
|
||||
- free (workstart);
|
||||
+ free (args_malloced);
|
||||
+ free (workstart);
|
||||
/* Unlock the stream. */
|
||||
_IO_funlockfile (s);
|
||||
_IO_cleanup_region_end (0);
|
58
lib32-gstreamer0.10-base/PKGBUILD
Normal file
58
lib32-gstreamer0.10-base/PKGBUILD
Normal file
@ -0,0 +1,58 @@
|
||||
#
|
||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# Maintainer: kote <koteccr at gmail dot com>
|
||||
# Arch linux maintainer:
|
||||
# Maintainer: josephgbr <rafael.f.f1@gmail.com>
|
||||
|
||||
_pkgbase=gstreamer0.10-base
|
||||
pkgname=lib32-${_pkgbase}
|
||||
pkgver=0.10.36
|
||||
pkgrel=1
|
||||
pkgdesc="GStreamer Multimedia Framework Base plugin libraries (32 bit)"
|
||||
arch=('x86_64')
|
||||
license=('LGPL')
|
||||
depends=("lib32-gstreamer0.10" 'lib32-orc' 'lib32-libxv' ${_pkgbase})
|
||||
makedepends=('gcc-multilib' 'lib32-alsa-lib' 'cdparanoia' 'lib32-libvisual'
|
||||
'lib32-libvorbis' 'lib32-libtheora' 'lib32-pango' 'lib32-gtk3')
|
||||
options=('!libtool' '!emptydirs')
|
||||
url="http://gstreamer.freedesktop.org/"
|
||||
source=(${url}/src/gst-plugins-base/gst-plugins-base-${pkgver}.tar.xz)
|
||||
sha256sums=('1fe45c3894903001d4d008b0713dab089f53726dcb5842d5b40c2595a984e64a')
|
||||
|
||||
build() {
|
||||
export CC='gcc -m32'
|
||||
export CXX='g++ -m32'
|
||||
export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
|
||||
|
||||
cd "gst-plugins-base-${pkgver}"
|
||||
|
||||
sed -i '/AC_PATH_XTRA/d' configure.ac
|
||||
autoreconf
|
||||
|
||||
sed -i configure \
|
||||
-e 's#HAVE_QT=yes#HAVE_QT=no#g' \
|
||||
-e 's#HAVE_QT_GV=yes#HAVE_QT_GV=no#g'
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--disable-static \
|
||||
--enable-experimental \
|
||||
--disable-gnome_vfs \
|
||||
--with-package-name="GStreamer Base Plugins (Chakra GNU/Linux)" \
|
||||
--with-package-origin="http://www.chakra-project.org/" \
|
||||
--libdir=/usr/lib32 \
|
||||
--enable-introspection=no \
|
||||
--without-libtiger
|
||||
|
||||
make
|
||||
sed -e 's/^SUBDIRS_EXT =.*/SUBDIRS_EXT =/' -i Makefile
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "gst-plugins-base-${pkgver}"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
rm -rf "${pkgdir}"/usr/{bin,include,share}
|
||||
}
|
47
lib32-gstreamer0.10/PKGBUILD
Normal file
47
lib32-gstreamer0.10/PKGBUILD
Normal file
@ -0,0 +1,47 @@
|
||||
#
|
||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# Maintainer: kote <koteccr at gmail dot com>
|
||||
# Arch linux maintainer:
|
||||
# Maintainer : josephgbr <rafael.f.f1 at gmail.com>
|
||||
|
||||
_pkgbase=gstreamer0.10
|
||||
pkgname=lib32-${_pkgbase}
|
||||
pkgver=0.10.36
|
||||
pkgrel=1
|
||||
pkgdesc="GStreamer Multimedia Framework (32 bit)"
|
||||
arch=('x86_64')
|
||||
license=('LGPL')
|
||||
url="http://gstreamer.freedesktop.org/"
|
||||
depends=('lib32-libxml2' 'lib32-glib2' 'gstreamer0.10')
|
||||
makedepends=('intltool' 'gcc-multilib')
|
||||
options=('!libtool')
|
||||
source=(${url}/src/gstreamer/gstreamer-${pkgver}.tar.xz)
|
||||
md5sums=('15389c73e091b1dda915279c388b9cb2')
|
||||
|
||||
build() {
|
||||
export CC='gcc -m32'
|
||||
export CXX='g++ -m32'
|
||||
export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
|
||||
|
||||
cd "${srcdir}/gstreamer-${pkgver}"
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--libdir=/usr/lib32 \
|
||||
--libexecdir=/usr/lib32 \
|
||||
--enable-introspection=no \
|
||||
--disable-{gtk-doc,static} \
|
||||
--with-package-name="GStreamer (Chakra GNU/Linux)" \
|
||||
--with-package-origin="http://www.chakra-project.org/"
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/gstreamer-${pkgver}"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
rm -rf "${pkgdir}/usr"/{bin,include,share}
|
||||
}
|
||||
|
@ -5,22 +5,22 @@
|
||||
|
||||
_pkgbasename=gtk2
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=2.24.5
|
||||
pkgver=2.24.12
|
||||
pkgrel=2
|
||||
pkgdesc="The GTK+ Toolkit (v2) (32-bit)"
|
||||
arch=('x86_64')
|
||||
url="http://www.gtk.org/"
|
||||
install=gtk2.install
|
||||
depends=(lib32-{'atk>=1.30.0','pango>=1.28.0','cairo>=1.10.0','krb5>=1.4','gnutls>=2.8.6','gdk-pixbuf2>=2.22.1'}
|
||||
depends=(lib32-{'atk>=1.30.0','pango>=1.28.0','cairo>=1.10.0','krb5','gnutls>=2.8.6','gdk-pixbuf2>=2.22.0'}
|
||||
lib32-lib{'cups>=1.4.4',xcursor,'xrandr>=1.3','xi>=1.3',xinerama,xcomposite,xdamage}
|
||||
$_pkgbasename)
|
||||
makedepends=('pkgconfig' 'gcc-multilib')
|
||||
options=('!libtool' '!docs')
|
||||
license=('LGPL')
|
||||
source=(http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${pkgver}.tar.bz2
|
||||
source=(http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${pkgver}.tar.xz
|
||||
xid-collision-debug.patch
|
||||
gtk-modules-32.patch)
|
||||
sha256sums=('f355f26003b1b42b97e584bdc475189a423fdd052088ee4bbd7aa0f989815cc8'
|
||||
sha256sums=('c5eba3b9259e4bf7554e9dc9db5d72038aa8b1bdd40fa0364b3705c226d11808'
|
||||
'd758bb93e59df15a4ea7732cf984d1c3c19dff67c94b957575efea132b8fe558'
|
||||
'2effb13404442ae266d4c663347e88cd1ca19e9a83b452da1743bac16af9c7b0')
|
||||
|
||||
|
49
lib32-gtk3/PKGBUILD
Normal file
49
lib32-gtk3/PKGBUILD
Normal file
@ -0,0 +1,49 @@
|
||||
#
|
||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# Maintainer: kote <koteccr at gmail dot com>
|
||||
# Arch linux maintainer:
|
||||
# Maintainer: josephgbr <rafael.f.f1@gmail.com>
|
||||
|
||||
pkgname=lib32-gtk3
|
||||
pkgver=3.4.4
|
||||
pkgrel=2
|
||||
pkgdesc="GObject-based multi-platform GUI toolkit (v3) (32-bit)"
|
||||
arch=('x86_64')
|
||||
license=('LGPL')
|
||||
url="http://www.gtk.org/"
|
||||
depends=('lib32-atk' 'lib32-gdk-pixbuf2' 'lib32-libxcomposite'
|
||||
'lib32-libcups' 'lib32-libxcursor' 'lib32-libxdamage'
|
||||
'lib32-libxi' 'lib32-libxinerama' 'lib32-libxrandr'
|
||||
'lib32-pango' 'lib32-cairo' 'gtk3' 'lib32-keyutils'
|
||||
'lib32-krb5' 'lib32-e2fsprogs')
|
||||
makedepends=('gcc-multilib' )
|
||||
options=('!libtool' '!docs')
|
||||
install=gtk3.install
|
||||
source=("http://ftp.gnome.org/pub/gnome/sources/gtk+/3.4/gtk+-${pkgver}.tar.xz")
|
||||
sha256sums=('f154e460075034da4c0ce89c320025dcd459da2a1fdf32d92a09522eaca242c7')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
||||
|
||||
cd "gtk+-${pkgver}"
|
||||
CXX=/bin/false ./configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--enable-gtk2-dependency \
|
||||
--disable-schemas-compile \
|
||||
--enable-introspection=no \
|
||||
--libdir=/usr/lib32
|
||||
#https://bugzilla.gnome.org/show_bug.cgi?id=655517
|
||||
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "gtk+-${pkgver}"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
mv "${pkgdir}"/usr/bin/gtk-query-immodules-3.0{,-32}
|
||||
rm "${pkgdir}"/usr/bin/gtk3-{demo-application,widget-factory}
|
||||
rm -rf "${pkgdir}"/usr/{include,share,bin/gtk3-demo} "${pkgdir}/etc"
|
||||
}
|
19
lib32-gtk3/gtk3.install
Normal file
19
lib32-gtk3/gtk3.install
Normal file
@ -0,0 +1,19 @@
|
||||
post_install() {
|
||||
GTK_PATH=/usr/lib32/gtk-3.0 /usr/bin/gtk-query-immodules-3.0-32 --update-cache
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
|
||||
pre_remove() {
|
||||
rm -f /usr/lib32/gtk-3.0/3.0.0/immodules.cache
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- cf/krb-readline.m4 2005-06-16 18:28:32.000000000 +0200
|
||||
+++ cf/krb-readline.m4 2005-06-27 23:17:06.000000000 +0200
|
||||
@@ -6,7 +6,6 @@
|
||||
dnl el_init
|
||||
|
||||
AC_DEFUN([KRB_READLINE],[
|
||||
-AC_FIND_FUNC_NO_LIBS(el_init, edit, [], [], [$LIB_tgetent])
|
||||
if test "$ac_cv_func_el_init" = yes ; then
|
||||
AC_CACHE_CHECK(for four argument el_init, ac_cv_func_el_init_four,[
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
|
@ -1,12 +0,0 @@
|
||||
--- lib/editline/Makefile.am 2005-06-16 18:28:44.000000000 +0200
|
||||
+++ lib/editline/Makefile.am 2005-06-27 23:21:02.000000000 +0200
|
||||
@@ -41,6 +41,9 @@
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
+$(libeditline_la_OBJECTS): %.lo: %.c
|
||||
+ $(LTCOMPILE) -fPIC -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
+
|
||||
snprintf.c:
|
||||
$(LN_S) $(srcdir)/../roken/snprintf.c .
|
||||
strdup.c:
|
@ -1,22 +0,0 @@
|
||||
--- appl/kx/rxtelnet.in 2005-06-16 18:29:10.000000000 +0200
|
||||
+++ appl/kx/rxtelnet.in 2005-06-27 23:21:34.000000000 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
# $Id: rxtelnet.in,v 1.31 2004/03/07 17:22:06 lha Exp $
|
||||
#
|
||||
usage="Usage: $0 [-l username] [-k] [-fF] [-t args_to_telnet] [-x args_to_xterm] [-K args_to_kx] [-w term_emulator] [-b telnet_binary] [-n] [-v] [-h | --help] [--version] host [port]"
|
||||
-binary=telnet
|
||||
+binary=ktelnet
|
||||
term=
|
||||
kx_args=-P
|
||||
while true
|
||||
--- appl/kx/rxterm.in 2005-06-16 18:29:10.000000000 +0200
|
||||
+++ appl/kx/rxterm.in 2005-06-27 23:21:55.000000000 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
# $Id: rxterm.in,v 1.23 2002/03/18 17:37:34 joda Exp $
|
||||
#
|
||||
usage="Usage: $0 [-l username] [-k] [-f] [-r rsh_args] [-x xterm_args] [-K kx_args] [-w term_emulator] [-b rsh_binary][-v] [-h | --help] [--version] host"
|
||||
-binary=rsh
|
||||
+binary=krsh
|
||||
term=xterm
|
||||
while true
|
||||
do
|
@ -1,20 +0,0 @@
|
||||
--- appl/su/Makefile.am 2005-06-16 18:27:46.000000000 +0200
|
||||
+++ appl/su/Makefile.am 2005-06-27 23:25:21.000000000 +0200
|
||||
@@ -7,6 +7,7 @@
|
||||
bin_PROGRAMS = su
|
||||
bin_SUIDS = su
|
||||
su_SOURCES = su.c supaths.h
|
||||
+su_LDFLAGS = -Wl,-z,now
|
||||
man_MANS = su.1
|
||||
|
||||
LDADD = $(LIB_kafs) \
|
||||
--- appl/otp/Makefile.am 2005-06-16 18:28:46.000000000 +0200
|
||||
+++ appl/otp/Makefile.am 2005-06-27 23:25:40.000000000 +0200
|
||||
@@ -8,6 +8,7 @@
|
||||
bin_SUIDS = otp
|
||||
otp_SOURCES = otp.c otp_locl.h
|
||||
otpprint_SOURCES = otpprint.c otp_locl.h
|
||||
+otp_LDFLAGS = -Wl,-z,now
|
||||
|
||||
man_MANS = otp.1 otpprint.1
|
||||
|
@ -1,124 +0,0 @@
|
||||
Binary files heimdal-0.7-old/cf/.find-func-no-libs2.m4.swp and heimdal-0.7/cf/.find-func-no-libs2.m4.swp differ
|
||||
Index: heimdal/cf/db.m4
|
||||
===================================================================
|
||||
--- heimdal.orig/cf/db.m4
|
||||
+++ heimdal/cf/db.m4
|
||||
@@ -18,24 +18,13 @@ db_type=unknown
|
||||
|
||||
if test "$enable_berkeley_db" != no; then
|
||||
|
||||
- AC_CHECK_HEADERS([ \
|
||||
- db4/db.h \
|
||||
- db3/db.h \
|
||||
- db.h \
|
||||
- db_185.h \
|
||||
- ])
|
||||
+ AC_CHECK_HEADERS([db.h])
|
||||
|
||||
dnl db_create is used by db3 and db4
|
||||
|
||||
- AC_FIND_FUNC_NO_LIBS(db_create, db4 db3 db, [
|
||||
+ AC_FIND_FUNC_NO_LIBS(db_create, db, [
|
||||
#include <stdio.h>
|
||||
- #ifdef HAVE_DB4_DB_H
|
||||
- #include <db4/db.h>
|
||||
- #elif defined(HAVE_DB3_DB_H)
|
||||
- #include <db3/db.h>
|
||||
- #else
|
||||
#include <db.h>
|
||||
- #endif
|
||||
],[NULL, NULL, 0])
|
||||
|
||||
if test "$ac_cv_func_db_create" = "yes"; then
|
||||
@@ -50,17 +39,9 @@ dnl db_create is used by db3 and db4
|
||||
|
||||
dnl dbopen is used by db1/db2
|
||||
|
||||
- AC_FIND_FUNC_NO_LIBS(dbopen, db2 db, [
|
||||
+ AC_FIND_FUNC_NO_LIBS(dbopen, db, [
|
||||
#include <stdio.h>
|
||||
- #if defined(HAVE_DB2_DB_H)
|
||||
- #include <db2/db.h>
|
||||
- #elif defined(HAVE_DB_185_H)
|
||||
- #include <db_185.h>
|
||||
- #elif defined(HAVE_DB_H)
|
||||
#include <db.h>
|
||||
- #else
|
||||
- #error no db.h
|
||||
- #endif
|
||||
],[NULL, 0, 0, 0, NULL])
|
||||
|
||||
if test "$ac_cv_func_dbopen" = "yes"; then
|
||||
Index: heimdal/lib/hdb/db.c
|
||||
===================================================================
|
||||
--- heimdal.orig/lib/hdb/db.c
|
||||
+++ heimdal/lib/hdb/db.c
|
||||
@@ -37,11 +37,7 @@ RCSID("$Id: db.c 20215 2007-02-09 21:59:
|
||||
|
||||
#if HAVE_DB1
|
||||
|
||||
-#if defined(HAVE_DB_185_H)
|
||||
-#include <db_185.h>
|
||||
-#elif defined(HAVE_DB_H)
|
||||
#include <db.h>
|
||||
-#endif
|
||||
|
||||
static krb5_error_code
|
||||
DB_close(krb5_context context, HDB *db)
|
||||
Index: heimdal/lib/hdb/db3.c
|
||||
===================================================================
|
||||
--- heimdal.orig/lib/hdb/db3.c
|
||||
+++ heimdal/lib/hdb/db3.c
|
||||
@@ -37,13 +37,7 @@ RCSID("$Id: db3.c 21610 2007-07-17 07:10
|
||||
|
||||
#if HAVE_DB3
|
||||
|
||||
-#ifdef HAVE_DB4_DB_H
|
||||
-#include <db4/db.h>
|
||||
-#elif defined(HAVE_DB3_DB_H)
|
||||
-#include <db3/db.h>
|
||||
-#else
|
||||
#include <db.h>
|
||||
-#endif
|
||||
|
||||
static krb5_error_code
|
||||
DB_close(krb5_context context, HDB *db)
|
||||
Index: heimdal/lib/roken/getcap.c
|
||||
===================================================================
|
||||
--- heimdal.orig/lib/roken/getcap.c
|
||||
+++ heimdal/lib/roken/getcap.c
|
||||
@@ -38,11 +38,13 @@
|
||||
#include "roken.h"
|
||||
RCSID("$Id: getcap.c 16561 2006-01-13 14:25:32Z lha $");
|
||||
|
||||
+#if defined(HAVE_DBOPEN) && defined(HAVE_DB_H)
|
||||
+#define USE_DB
|
||||
+#endif
|
||||
+
|
||||
#include <sys/types.h>
|
||||
#include <ctype.h>
|
||||
-#if defined(HAVE_DB_185_H)
|
||||
-#include <db_185.h>
|
||||
-#elif defined(HAVE_DB_H)
|
||||
+#ifdef USE_DB
|
||||
#include <db.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
Index: heimdal/lib/roken/ndbm_wrap.c
|
||||
===================================================================
|
||||
--- heimdal.orig/lib/roken/ndbm_wrap.c
|
||||
+++ heimdal/lib/roken/ndbm_wrap.c
|
||||
@@ -37,13 +37,7 @@ RCSID("$Id: ndbm_wrap.c 21634 2007-07-17
|
||||
#endif
|
||||
|
||||
#include "ndbm_wrap.h"
|
||||
-#if defined(HAVE_DB4_DB_H)
|
||||
-#include <db4/db.h>
|
||||
-#elif defined(HAVE_DB3_DB_H)
|
||||
-#include <db3/db.h>
|
||||
-#else
|
||||
#include <db.h>
|
||||
-#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
@ -1,11 +0,0 @@
|
||||
--- heimdal-0.7.1/cf/pthreads.m4.old 2005-09-09 12:12:28.000000000 +0000
|
||||
+++ heimdal-0.7.1/cf/pthreads.m4 2005-09-17 22:23:23.000000000 +0000
|
||||
@@ -32,7 +32,7 @@
|
||||
2.*)
|
||||
native_pthread_support=yes
|
||||
PTHREADS_CFLAGS=-pthread
|
||||
- PTHREADS_LIBS=-pthread
|
||||
+ PTHREADS_LIBS=-lpthread
|
||||
;;
|
||||
esac
|
||||
;;
|
@ -1,50 +0,0 @@
|
||||
--- appl/rcp/rcp.c.old 2006-05-03 13:31:59.398493625 +0200
|
||||
+++ appl/rcp/rcp.c 2006-05-03 13:32:04.494485981 +0200
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "rcp_locl.h"
|
||||
#include <getarg.h>
|
||||
|
||||
-#define RSH_PROGRAM "rsh"
|
||||
+#define RSH_PROGRAM "krsh"
|
||||
|
||||
struct passwd *pwd;
|
||||
uid_t userid;
|
||||
--- appl/rcp/rcp_locl.h.old 2006-05-03 02:30:31.602025409 +0200
|
||||
+++ appl/rcp/rcp_locl.h 2006-05-03 02:30:35.886018983 +0200
|
||||
@@ -64,4 +64,4 @@
|
||||
#define _PATH_CP "/bin/cp"
|
||||
#endif
|
||||
#undef _PATH_RSH
|
||||
-#define _PATH_RSH BINDIR "/rsh"
|
||||
+#define _PATH_RSH BINDIR "/krsh"
|
||||
--- appl/telnet/telnetd/telnetd.h.old 2006-05-03 02:23:14.582680939 +0200
|
||||
+++ appl/telnet/telnetd/telnetd.h 2006-05-03 02:23:23.746667193 +0200
|
||||
@@ -192,7 +192,7 @@
|
||||
#endif
|
||||
|
||||
#undef _PATH_LOGIN
|
||||
-#define _PATH_LOGIN BINDIR "/login"
|
||||
+#define _PATH_LOGIN BINDIR "/klogin"
|
||||
|
||||
/* fallbacks */
|
||||
|
||||
--- appl/login/shadow.c.old 2006-05-05 06:31:29.517138115 +0200
|
||||
+++ appl/login/shadow.c 2006-05-05 06:32:26.433052741 +0200
|
||||
@@ -38,7 +38,7 @@
|
||||
#ifdef HAVE_SHADOW_H
|
||||
|
||||
#ifndef _PATH_CHPASS
|
||||
-#define _PATH_CHPASS "/usr/bin/passwd"
|
||||
+#define _PATH_CHPASS "/usr/bin/kpasswd"
|
||||
#endif
|
||||
|
||||
static int
|
||||
@@ -52,7 +52,7 @@
|
||||
printf("fork /bin/passwd");
|
||||
exit(1);
|
||||
case 0:
|
||||
- execlp(_PATH_CHPASS, "passwd", who->pw_name, (char *) 0);
|
||||
+ execlp(_PATH_CHPASS, "kpasswd", who->pw_name, (char *) 0);
|
||||
exit(1);
|
||||
default:
|
||||
waitpid(pid, &status, 0);
|
@ -1,69 +0,0 @@
|
||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
|
||||
_pkgbasename=heimdal
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=1.3.3
|
||||
pkgrel=2
|
||||
pkgdesc="Implementation of Kerberos V5 libraries (32-bit)"
|
||||
arch=('x86_64')
|
||||
url="http://www.h5l.org/"
|
||||
license=('custom')
|
||||
depends=('lib32-e2fsprogs' 'lib32-openssl' 'lib32-db' lib32-sqlite3 $_pkgbasename)
|
||||
makedepends=('gcc-multilib')
|
||||
options=('!libtool' '!emptydirs')
|
||||
source=(http://www.h5l.org/dist/src/${_pkgbasename}-${pkgver}.tar.gz
|
||||
001_all_heimdal-no_libedit.patch
|
||||
002_all_heimal-fPIC.patch
|
||||
003_all_heimdal-rxapps.patch
|
||||
005_all_heimdal-suid_fix.patch
|
||||
012_all_heimdal-berkdb.patch
|
||||
013_all_heimdal-pthread-lib.patch
|
||||
014_all_heimdal-path.patch)
|
||||
md5sums=('963c09f1b14c41660be70b55fae9f163'
|
||||
'98e28f11f906c967aac22d6184102c9e'
|
||||
'6d5571bdedba2e2423b90bccdbac2c0a'
|
||||
'2feec3924ee5230b54175b4d4000c872'
|
||||
'45aeb207f360f9f4e9e0fabc8bfeecbc'
|
||||
'56f5d10d0ec40f2fda82ef144ffac1e0'
|
||||
'1b8665b771c4eb6b56ea8582c96e56e3'
|
||||
'8208ae8c0b6ff5ab4f64af1693e9e396')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/heimdal-${pkgver}
|
||||
patch -Np0 -i ${srcdir}/001_all_heimdal-no_libedit.patch
|
||||
patch -Np0 -i ${srcdir}/002_all_heimal-fPIC.patch
|
||||
patch -Np0 -i ${srcdir}/003_all_heimdal-rxapps.patch
|
||||
patch -Np0 -i ${srcdir}/005_all_heimdal-suid_fix.patch
|
||||
patch -Np1 -i ${srcdir}/012_all_heimdal-berkdb.patch
|
||||
patch -Np1 -i ${srcdir}/013_all_heimdal-pthread-lib.patch
|
||||
patch -Np0 -i ${srcdir}/014_all_heimdal-path.patch
|
||||
|
||||
export CC="gcc -m32"
|
||||
export CXX="g++ -m32"
|
||||
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
||||
|
||||
libtoolize --force
|
||||
aclocal -I cf
|
||||
autoconf
|
||||
automake
|
||||
|
||||
./configure --prefix=/usr --enable-shared=yes --without-x \
|
||||
--libdir=/usr/lib32 \
|
||||
--with-openssl-lib=/usr/lib32 \
|
||||
--with-readline-lib=/usr/lib32 \
|
||||
--with-readline-include=/usr/include/readline \
|
||||
--with-sqlite3-lib=/usr/lib32 \
|
||||
--with-sqlite3-include=/usr/include
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_pkgbasename}-${pkgver}"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
rm -rf "${pkgdir}"/usr/{etc,bin,sbin,include,share,libexec}
|
||||
mkdir -p "$pkgdir/usr/share/licenses"
|
||||
ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
@ -11,7 +11,7 @@ pkgrel=1
|
||||
pkgdesc="A low-latency audio server (32-bit)"
|
||||
arch=('x86_64')
|
||||
license=('GPL' 'LGPL')
|
||||
depends=('lib32-glibc' $_pkgbasename)
|
||||
depends=('lib32-glibc' $_pkgbasename=$pkgver)
|
||||
makedepends=(gcc-multilib)
|
||||
url="http://jackaudio.org/"
|
||||
options=('!libtool')
|
||||
|
@ -1,16 +1,20 @@
|
||||
# Maintainer: Radu Andries <admiral0@chakra-project.org>
|
||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
|
||||
_pkgbasename=keyutils
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=1.4
|
||||
pkgrel=2
|
||||
pkgver=1.5.5
|
||||
pkgrel=1
|
||||
pkgdesc="Linux Key Management Utilities (32-bit)"
|
||||
arch=(x86_64)
|
||||
url="http://www.kernel.org"
|
||||
license=('GPL2' 'LGPL2.1')
|
||||
depends=(lib32-glibc $_pkgbasename)
|
||||
depends=(lib32-glibc $_pkgbasename=$pkgver)
|
||||
makedepends=(gcc-multilib)
|
||||
source=(http://people.redhat.com/~dhowells/$_pkgbasename/$_pkgbasename-$pkgver.tar.bz2)
|
||||
md5sums=('e168c1bdaf5aa93c2cbf8a5e7f8ef27b')
|
||||
md5sums=('d759680b2f23c99af95938f5026f25fb')
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$_pkgbasename-$pkgver"
|
||||
@ -28,10 +32,4 @@ package() {
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
rm -rf "${pkgdir}"/{usr/{include,share,bin,sbin},etc,{s,}bin}
|
||||
|
||||
# Fix symlink
|
||||
cd "${pkgdir}/usr/lib32/"
|
||||
rm libkeyutils.so
|
||||
ln -s libkeyutils.so.1 libkeyutils.so
|
||||
}
|
||||
|
||||
|
40
lib32-kmod/PKGBUILD
Normal file
40
lib32-kmod/PKGBUILD
Normal file
@ -0,0 +1,40 @@
|
||||
# Maintainer: Neophytos Kolokotronis <tetris4@gmail.com>
|
||||
# Contributor: Jesse Jaara <gmail.com: jesse.jaara>
|
||||
|
||||
pkgname=lib32-kmod
|
||||
pkgver=11
|
||||
pkgrel=1
|
||||
pkgdesc="Linux kernel module handling"
|
||||
arch=('x86_64')
|
||||
url="http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary"
|
||||
license=('GPL2')
|
||||
depends=('lib32-zlib' 'kmod')
|
||||
makedepends=('gcc-multilib')
|
||||
options=('!libtool')
|
||||
source=("ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/kmod-$pkgver.tar.xz")
|
||||
md5sums=('607e33b0144625c2e5221e5a7df49c7a')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
||||
|
||||
cd "${srcdir}/kmod-${pkgver}"
|
||||
|
||||
./configure \
|
||||
--libdir=/usr/lib32 \
|
||||
--sysconfdir=/etc \
|
||||
--disable-tools \
|
||||
--with-zlib \
|
||||
--with-rootprefix=/usr
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/kmod-${pkgver}"
|
||||
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
# nuke manpages and headers
|
||||
rm -rf "${pkgdir}"/usr/{share,include,bin}
|
||||
}
|
@ -1,26 +1,38 @@
|
||||
# Maintainer: Radu Andries <admiral0@chakra-project.org>
|
||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
|
||||
_pkgbasename=krb5
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=1.9.1
|
||||
pkgver=1.10.3
|
||||
pkgrel=1
|
||||
pkgdesc="The Kerberos network authentication system (32-bit)"
|
||||
arch=('x86_64')
|
||||
url="http://web.mit.edu/kerberos/"
|
||||
license=('custom')
|
||||
depends=('lib32-e2fsprogs' 'lib32-libldap' lib32-keyutils $_pkgbasename)
|
||||
depends=('lib32-e2fsprogs' 'lib32-libldap' lib32-keyutils $_pkgbasename=$pkgver)
|
||||
makedepends=('perl' gcc-multilib)
|
||||
provides=('lib32-heimdal')
|
||||
replaces=('lib32-heimdal')
|
||||
conflicts=('lib32-heimdal')
|
||||
source=(http://web.mit.edu/kerberos/dist/${_pkgbasename}/1.9/${_pkgbasename}-${pkgver}-signed.tar)
|
||||
md5sums=('b9f237015fbb83f75d17941588b12b7d')
|
||||
source=("http://web.mit.edu/kerberos/dist/${_pkgbasename}/1.10/${_pkgbasename}-${pkgver}-signed.tar"
|
||||
'krb5-1.10.1-gcc47.patch')
|
||||
sha1sums=('04ab9837e5d1958158bcb30bd6480201089a0cbb'
|
||||
'36ac2f3a4541f2afbc4625a8ce7fb7c7936a76a7')
|
||||
|
||||
options=('!emptydirs')
|
||||
|
||||
build() {
|
||||
tar zxvf ${_pkgbasename}-${pkgver}.tar.gz
|
||||
cd "${srcdir}/${_pkgbasename}-${pkgver}/src"
|
||||
|
||||
# With gcc47 : deltat.c:1694:12: error: 'yylval' may be used uninitialized
|
||||
# in this function [-Werror=maybe-uninitialized]
|
||||
# As this is generated code, just ignore the complaint.
|
||||
patch -Np2 -i ../../krb5-1.10.1-gcc47.patch
|
||||
rm lib/krb5/krb/deltat.c
|
||||
|
||||
export CC="gcc -m32"
|
||||
export CXX="g++ -m32"
|
||||
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
||||
@ -28,8 +40,9 @@ build() {
|
||||
export CFLAGS+=" -fPIC -fno-strict-aliasing -fstack-protector-all"
|
||||
export CPPFLAGS+=" -I/usr/include/et"
|
||||
./configure --prefix=/usr \
|
||||
--sysconfdir=/etc/krb5 \
|
||||
--mandir=/usr/share/man \
|
||||
--localstatedir=/var/lib \
|
||||
--localstatedir=/var/lia \
|
||||
--libdir=/usr/lib32 \
|
||||
--enable-shared \
|
||||
--with-system-et \
|
||||
@ -56,4 +69,3 @@ package() {
|
||||
mkdir -p "$pkgdir/usr/share/licenses"
|
||||
ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
|
11
lib32-krb5/krb5-1.10.1-gcc47.patch
Normal file
11
lib32-krb5/krb5-1.10.1-gcc47.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -Naur krb5-1.10.1.ori/src/lib/krb5/krb/x-deltat.y krb5-1.10.1/src/lib/krb5/krb/x-deltat.y
|
||||
--- krb5-1.10.1.ori/src/lib/krb5/krb/x-deltat.y 2011-09-06 07:34:32.000000000 -0400
|
||||
+++ krb5-1.10.1/src/lib/krb5/krb/x-deltat.y 2012-03-24 13:15:11.543551318 -0400
|
||||
@@ -44,6 +44,7 @@
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
@ -10,7 +10,7 @@ pkgrel=2
|
||||
pkgdesc="Lightweight color management development library/engine (32-bit)"
|
||||
arch=(x86_64)
|
||||
license=('custom')
|
||||
depends=('lib32-libtiff>=3.9.4' $_pkgbasename)
|
||||
depends=('lib32-libtiff>=3.9.4' $_pkgbasename=$pkgver)
|
||||
makedepends=(gcc-multilib)
|
||||
url="http://www.littlecms.com"
|
||||
options=('!libtool')
|
||||
|
@ -12,7 +12,7 @@ arch=(x86_64)
|
||||
url="http://0pointer.de/lennart/projects/libasyncns"
|
||||
license=('LGPL')
|
||||
options=('!libtool')
|
||||
depends=('lib32-glibc' $_pkgbasename)
|
||||
depends=('lib32-glibc' $_pkgbasename=$pkgver)
|
||||
makedepends=('gcc-multilib')
|
||||
source=(http://0pointer.de/lennart/projects/libasyncns/${_pkgbasename}-${pkgver}.tar.gz)
|
||||
md5sums=('1f553d6ce1ad255bc83b3d8e9384f515')
|
||||
|
@ -5,16 +5,17 @@
|
||||
|
||||
_pkgbasename=libcap
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=2.21
|
||||
pkgver=2.22
|
||||
pkgrel=1
|
||||
pkgdesc="POSIX 1003.1e capabilities (32-bit)"
|
||||
arch=(x86_64)
|
||||
url="http://www.kernel.org/pub/linux/libs/security/linux-privs/"
|
||||
license=('GPL')
|
||||
depends=('lib32-attr' $_pkgbasename)
|
||||
depends=('lib32-attr' $_pkgbasename=$pkgver)
|
||||
makedepends=('gcc-multilib')
|
||||
source=(http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${_pkgbasename}-${pkgver}.tar.gz)
|
||||
md5sums=('61966ef40f2dee8731b69db895e4548d')
|
||||
#source=(http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${_pkgbasename}-${pkgver}.tar.gz)
|
||||
source=(ftp://ftp.archlinux.org/other/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.gz)
|
||||
md5sums=('b4896816b626bea445f0b3849bdd4077')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/${_pkgbasename}-${pkgver}
|
||||
|
@ -5,17 +5,16 @@
|
||||
|
||||
_pkgbasename=libcups
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=1.5.0
|
||||
pkgver=1.6.1
|
||||
pkgrel=1
|
||||
pkgdesc="The CUPS Printing System - client libraries (32-bit)"
|
||||
arch=('x86_64')
|
||||
license=('GPL')
|
||||
url="http://www.cups.org/"
|
||||
depends=(lib32-glibc $_pkgbasename)
|
||||
makedepends=(gcc-multilib cups)
|
||||
depends=(lib32-glibc $_pkgbasename=$pkgver)
|
||||
makedepends=(gcc-multilib cups lib32-libusb)
|
||||
source=(http://ftp.easysw.com/pub/cups/${pkgver}/cups-${pkgver}-source.tar.bz2)
|
||||
md5sums=('e54ed09ede2340fc3014913333520fe4')
|
||||
|
||||
md5sums=('87ade07e3d1efd03c9c3add949cf9c00')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
@ -23,7 +22,7 @@ build() {
|
||||
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
||||
|
||||
cd ${srcdir}/cups-${pkgver}
|
||||
|
||||
|
||||
aclocal -I config-scripts
|
||||
autoconf -I config-scripts
|
||||
|
||||
@ -38,6 +37,7 @@ build() {
|
||||
--disable-gnutls \
|
||||
--enable-threads \
|
||||
--with-optim="$CFLAGS" \
|
||||
--disable-avahi \
|
||||
--libdir=/usr/lib32
|
||||
make
|
||||
}
|
||||
@ -46,3 +46,4 @@ package() {
|
||||
cd ${srcdir}/cups-${pkgver}
|
||||
make BUILDROOT=${pkgdir} install-libs
|
||||
}
|
||||
|
||||
|
@ -5,19 +5,20 @@
|
||||
|
||||
_pkgbasename=libdrm
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=2.4.27
|
||||
pkgver=2.4.37
|
||||
pkgrel=1
|
||||
pkgdesc="Userspace interface to kernel DRM services (32-bit)"
|
||||
arch=(x86_64)
|
||||
license=('custom')
|
||||
depends=('lib32-libpciaccess' 'lib32-cairo' $_pkgbasename)
|
||||
depends=('lib32-libpciaccess' 'lib32-glibc' 'lib32-cairo' $_pkgbasename=$pkgver)
|
||||
makedepends=(gcc-multilib)
|
||||
options=('!libtool')
|
||||
url="http://dri.freedesktop.org/"
|
||||
source=(http://dri.freedesktop.org/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.bz2
|
||||
no-pthread-stubs.patch)
|
||||
sha1sums=('f5b40d30a7f2bfa369ab9b3bd9a0aa844a7f1e16'
|
||||
'ea97a698fa545b8b560c64015cc45efa7fe7417b')
|
||||
|
||||
sha1sums=('fa8463e390eee9b589dc369abc4cbe3e4ef16d16'
|
||||
'd7b0e03185a4edd322925440286c9e71e6fcef30')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_pkgbasename}-${pkgver}"
|
||||
@ -27,16 +28,14 @@ build() {
|
||||
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
||||
|
||||
patch -Np1 -i "${srcdir}/no-pthread-stubs.patch"
|
||||
|
||||
|
||||
autoreconf --force --install
|
||||
./configure --prefix=/usr \
|
||||
--libdir=/usr/lib32 \
|
||||
--enable-udev \
|
||||
--enable-intel \
|
||||
--enable-radeon \
|
||||
--enable-vmwgfx-experimental-api \
|
||||
--enable-nouveau-experimental-api
|
||||
|
||||
./configure --prefix=/usr --libdir=/usr/lib32 \
|
||||
--enable-udev \
|
||||
--enable-intel \
|
||||
--enable-radeon \
|
||||
--enable-vmwgfx-experimental-api \
|
||||
--enable-nouveau-experimental-api
|
||||
make
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -ru libdrm-2.4.0/configure.ac libdrm-2.4.0-nostubs/configure.ac
|
||||
--- libdrm-2.4.0/configure.ac 2008-10-09 21:57:09.000000000 +0200
|
||||
+++ libdrm-2.4.0-nostubs/configure.ac 2008-10-21 10:48:24.000000000 +0200
|
||||
diff -Nur libdrm-2.4.34.orig/configure.ac libdrm-2.4.34/configure.ac
|
||||
--- libdrm-2.4.34.orig/configure.ac 2012-05-12 14:54:06.375335490 +0000
|
||||
+++ libdrm-2.4.34/configure.ac 2012-05-12 14:54:32.075142065 +0000
|
||||
@@ -47,10 +47,6 @@
|
||||
LT_INIT([disable-static])
|
||||
|
||||
@ -9,32 +9,53 @@ diff -ru libdrm-2.4.0/configure.ac libdrm-2.4.0-nostubs/configure.ac
|
||||
-AC_SUBST(PTHREADSTUBS_CFLAGS)
|
||||
-AC_SUBST(PTHREADSTUBS_LIBS)
|
||||
-
|
||||
PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
|
||||
AC_SUBST(PCIACCESS_CFLAGS)
|
||||
AC_SUBST(PCIACCESS_LIBS)
|
||||
--- libdrm-2.4.16/intel/Makefile.am 2009-11-20 23:54:36.000000000 +0000
|
||||
+++ libdrm-2.4.16/intel/Makefile.am.new 2009-12-07 08:11:32.235748069 +0000
|
||||
@@ -26,14 +26,13 @@
|
||||
pkgconfigdir=${libdir}/pkgconfig
|
||||
AC_SUBST(pkgconfigdir)
|
||||
AC_ARG_ENABLE([udev],
|
||||
diff -Nur libdrm-2.4.34.orig/intel/Makefile.am libdrm-2.4.34/intel/Makefile.am
|
||||
--- libdrm-2.4.34.orig/intel/Makefile.am 2012-05-12 14:54:06.372001955 +0000
|
||||
+++ libdrm-2.4.34/intel/Makefile.am 2012-05-12 14:55:24.164745055 +0000
|
||||
@@ -26,7 +26,6 @@
|
||||
$(WARN_CFLAGS) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/intel \
|
||||
- $(PTHREADSTUBS_CFLAGS) \
|
||||
$(PCIACCESS_CFLAGS) \
|
||||
$(VALGRIND_CFLAGS) \
|
||||
-I$(top_srcdir)/include/drm
|
||||
|
||||
libdrm_intel_la_LTLIBRARIES = libdrm_intel.la
|
||||
@@ -35,7 +34,6 @@
|
||||
libdrm_intel_ladir = $(libdir)
|
||||
libdrm_intel_la_LDFLAGS = -version-number 1:0:0 -no-undefined
|
||||
-libdrm_intel_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ @PCIACCESS_LIBS@ @CLOCK_LIB@
|
||||
+libdrm_intel_la_LIBADD = ../libdrm.la @PCIACCESS_LIBS@ @CLOCK_LIB@
|
||||
|
||||
libdrm_intel_la_SOURCES = \
|
||||
intel_bufmgr.c \
|
||||
--- libdrm-2.4.16/radeon/Makefile.am 2009-11-20 23:54:36.000000000 +0000
|
||||
+++ libdrm-2.4.16/radeon/Makefile.am.new 2009-12-07 08:12:31.889075388 +0000
|
||||
libdrm_intel_la_LIBADD = ../libdrm.la \
|
||||
- @PTHREADSTUBS_LIBS@ \
|
||||
@PCIACCESS_LIBS@ \
|
||||
@CLOCK_LIB@
|
||||
|
||||
diff -Nur libdrm-2.4.34.orig/nouveau/Makefile.am libdrm-2.4.34/nouveau/Makefile.am
|
||||
--- libdrm-2.4.34.orig/nouveau/Makefile.am 2012-05-12 14:54:06.331998148 +0000
|
||||
+++ libdrm-2.4.34/nouveau/Makefile.am 2012-05-12 14:56:00.941132085 +0000
|
||||
@@ -2,14 +2,13 @@
|
||||
$(WARN_CFLAGS) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/nouveau \
|
||||
- $(PTHREADSTUBS_CFLAGS) \
|
||||
-I$(top_srcdir)/include/drm \
|
||||
-DDEBUG
|
||||
|
||||
libdrm_nouveau_la_LTLIBRARIES = libdrm_nouveau.la
|
||||
libdrm_nouveau_ladir = $(libdir)
|
||||
libdrm_nouveau_la_LDFLAGS = -version-number 2:0:0 -no-undefined
|
||||
-libdrm_nouveau_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
|
||||
+libdrm_nouveau_la_LIBADD = ../libdrm.la
|
||||
|
||||
libdrm_nouveau_la_SOURCES = nouveau.c \
|
||||
pushbuf.c \
|
||||
diff -Nur libdrm-2.4.34.orig/radeon/Makefile.am libdrm-2.4.34/radeon/Makefile.am
|
||||
--- libdrm-2.4.34.orig/radeon/Makefile.am 2012-05-12 14:54:06.365334765 +0000
|
||||
+++ libdrm-2.4.34/radeon/Makefile.am 2012-05-12 14:55:48.084557437 +0000
|
||||
@@ -26,13 +26,12 @@
|
||||
$(WARN_CFLAGS) \
|
||||
-I$(top_srcdir) \
|
||||
$(WARN_CFLAGS) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/radeon \
|
||||
- $(PTHREADSTUBS_CFLAGS) \
|
||||
-I$(top_srcdir)/include/drm
|
||||
@ -47,20 +68,3 @@ diff -ru libdrm-2.4.0/configure.ac libdrm-2.4.0-nostubs/configure.ac
|
||||
|
||||
libdrm_radeon_la_SOURCES = \
|
||||
radeon_bo_gem.c \
|
||||
--- libdrm-2.4.16/nouveau/Makefile.am 2009-11-20 23:54:36.000000000 +0000
|
||||
+++ libdrm-2.4.16/nouveau/Makefile.am.new 2009-12-07 08:13:01.489072320 +0000
|
||||
@@ -2,13 +2,12 @@
|
||||
$(WARN_CFLAGS) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/nouveau \
|
||||
- $(PTHREADSTUBS_CFLAGS) \
|
||||
-I$(top_srcdir)/include/drm
|
||||
|
||||
libdrm_nouveau_la_LTLIBRARIES = libdrm_nouveau.la
|
||||
libdrm_nouveau_ladir = $(libdir)
|
||||
libdrm_nouveau_la_LDFLAGS = -version-number 1:0:0 -no-undefined
|
||||
-libdrm_nouveau_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
|
||||
+libdrm_nouveau_la_LIBADD = ../libdrm.la
|
||||
|
||||
libdrm_nouveau_la_SOURCES = \
|
||||
nouveau_device.c \
|
||||
|
@ -4,8 +4,8 @@
|
||||
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
|
||||
pkgname=lib32-libffi
|
||||
pkgver=3.0.9
|
||||
pkgrel=1
|
||||
pkgver=3.0.10
|
||||
pkgrel=2
|
||||
pkgdesc="A portable, high level programming interface to various calling conventions (32 bits version)."
|
||||
arch=('x86_64')
|
||||
license=('MIT')
|
||||
@ -13,7 +13,7 @@ url="http://sourceware.org/libffi"
|
||||
depends=('lib32-glibc')
|
||||
options=('!libtool')
|
||||
source=(ftp://sourceware.org/pub/libffi/libffi-${pkgver}.tar.gz)
|
||||
md5sums=('1f300a7a7f975d4046f51c3022fa5ff1')
|
||||
md5sums=('79390673f5d07a8fb342bc09b5055b6f')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/libffi-${pkgver}"
|
||||
|
@ -11,7 +11,7 @@ pkgdesc="A general purpose crypto library based on the code used (32-bit)"
|
||||
arch=(x86_64)
|
||||
url="http://www.gnupg.org"
|
||||
license=('LGPL')
|
||||
depends=('lib32-libgpg-error>=1.7' $_pkgbasename)
|
||||
depends=('lib32-libgpg-error>=1.7' $_pkgbasename=$pkgver)
|
||||
makedepends=(gcc-multilib libtool-multilib)
|
||||
options=(!libtool)
|
||||
source=(ftp://ftp.gnupg.org/gcrypt/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.bz2)
|
||||
|
@ -6,7 +6,7 @@
|
||||
_pkgbasename=libglade
|
||||
pkgname=lib32-libglade
|
||||
pkgver=2.6.4
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="Allows you to load glade interface files in a program at runtime (32-bit)"
|
||||
arch=('x86_64')
|
||||
license=('LGPL')
|
||||
|
@ -11,7 +11,7 @@ pkgdesc="Support library for libgcrypt (32-bit)"
|
||||
arch=(x86_64)
|
||||
url="http://www.gnupg.org"
|
||||
license=('LGPL')
|
||||
depends=('lib32-glibc' $_pkgbasename)
|
||||
depends=('lib32-glibc' $_pkgbasename=$pkgver)
|
||||
makedepends=(gcc-multilib)
|
||||
options=(!libtool)
|
||||
source=(ftp://ftp.gnupg.org/gcrypt/libgpg-error/${_pkgbasename}-${pkgver}.tar.bz2)
|
||||
|
@ -5,17 +5,17 @@
|
||||
|
||||
_pkgbasename=libice
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=1.0.7
|
||||
pkgrel=2
|
||||
pkgver=1.0.8
|
||||
pkgrel=1
|
||||
pkgdesc="X11 Inter-Client Exchange library (32-bit)"
|
||||
arch=(x86_64)
|
||||
url="http://xorg.freedesktop.org/"
|
||||
depends=('lib32-glibc' 'xproto>=7.0.18' $_pkgbasename)
|
||||
makedepends=('pkgconfig' 'xtrans>=1.2.5' 'gcc-multilib')
|
||||
depends=('lib32-glibc' 'xproto' $_pkgbasename=$pkgver)
|
||||
makedepends=('pkgconfig' 'xtrans' 'gcc-multilib')
|
||||
options=('!libtool')
|
||||
source=(${url}/releases/individual/lib/libICE-${pkgver}.tar.bz2)
|
||||
license=('custom')
|
||||
sha1sums=('c7d0f4c5b0e999385445b8be1bc89aec4e5de71d')
|
||||
sha1sums=('ddb14df8bbc43df7322978f5f9f802936e2a7324')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/libICE-${pkgver}"
|
||||
@ -35,5 +35,5 @@ package() {
|
||||
rm -rf "${pkgdir}"/usr/{include,share}
|
||||
|
||||
mkdir -p "$pkgdir/usr/share/licenses"
|
||||
ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
|
||||
ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
@ -5,20 +5,20 @@
|
||||
|
||||
_pkgbasename=libjpeg-turbo
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=1.1.1
|
||||
pkgver=1.2.1
|
||||
pkgrel=1
|
||||
pkgdesc="libjpeg derivative with accelerated baseline JPEG compression and decompression (32-bit)"
|
||||
arch=('x86_64')
|
||||
url="http://libjpeg-turbo.virtualgl.org/"
|
||||
license=('GPL' 'custom')
|
||||
depends=('lib32-glibc' $_pkgbasename)
|
||||
depends=('lib32-glibc' $_pkgbasename=$pkgver)
|
||||
makedepends=('nasm' gcc-multilib)
|
||||
provides=('lib32-libjpeg=8.0.2')
|
||||
conflicts=('lib32-libjpeg')
|
||||
replaces=('lib32-libjpeg')
|
||||
options=('!libtool')
|
||||
source=(http://sourceforge.net/projects/$_pkgbasename/files/$pkgver/$_pkgbasename-$pkgver.tar.gz)
|
||||
md5sums=('03b9c1406c7bfdc204313c2917ce6962')
|
||||
md5sums=('f61e60ff01381ece4d2fe65eeb52669e')
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$_pkgbasename-$pkgver"
|
||||
|
@ -5,19 +5,19 @@
|
||||
|
||||
_pkgbasename=libldap
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=2.4.24
|
||||
pkgver=2.4.33
|
||||
pkgrel=1
|
||||
pkgdesc="Lightweight Directory Access Protocol (LDAP) client libraries (32-bit)"
|
||||
arch=('x86_64')
|
||||
license=('custom')
|
||||
url="http://www.openldap.org/"
|
||||
depends=('lib32-openssl' $_pkgbasename)
|
||||
depends=('lib32-openssl' $_pkgbasename=$pkgver)
|
||||
makedepends=(gcc-multilib)
|
||||
options=('!libtool')
|
||||
source=("ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-${pkgver}.tgz"
|
||||
'ntlm.patch')
|
||||
md5sums=('116fe1e23a7b67686d5e62274367e6c0'
|
||||
'dfa9eb6f2fd9d0a3dab0e1860923489e')
|
||||
md5sums=('5adae44897647c15ce5abbff313bc85a'
|
||||
'b75109064236048da33c7bbd5b48196f')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
@ -31,12 +31,12 @@ build() {
|
||||
./configure --prefix=/usr \
|
||||
--libexecdir=/usr/sbin \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--mandir=/usr/share/man \
|
||||
--localstatedir=/var/lib/openldap \
|
||||
--enable-crypt --enable-dynamic \
|
||||
--with-threads --disable-wrappers \
|
||||
--disable-spasswd --without-cyrus-sasl \
|
||||
--disable-bdb --disable-hdb --libdir=/usr/lib32
|
||||
--disable-spasswd --without-cyrus-sasl \
|
||||
--disable-bdb --disable-hdb --libdir=/usr/lib32
|
||||
|
||||
cd include
|
||||
make
|
||||
|
@ -194,7 +194,7 @@ Index: trunk/libraries/libldap/Makefile.in
|
||||
tls2.c tls_o.c tls_g.c tls_m.c \
|
||||
- turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c \
|
||||
+ turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c ntlm.c \
|
||||
assertion.c deref.c
|
||||
assertion.c deref.c ldif.c fetch.c
|
||||
|
||||
OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \
|
||||
@@ -40,7 +40,7 @@
|
||||
@ -203,7 +203,7 @@ Index: trunk/libraries/libldap/Makefile.in
|
||||
tls2.lo tls_o.lo tls_g.lo tls_m.lo \
|
||||
- turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo \
|
||||
+ turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo ntlm.lo \
|
||||
assertion.lo deref.lo
|
||||
assertion.lo deref.lo ldif.lo fetch.lo
|
||||
|
||||
LDAP_INCDIR= ../../include
|
||||
Index: trunk/libraries/libldap_r/Makefile.in
|
||||
@ -216,7 +216,7 @@ Index: trunk/libraries/libldap_r/Makefile.in
|
||||
tls2.c tls_o.c tls_g.c tls_m.c \
|
||||
- turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c \
|
||||
+ turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c ntlm.c \
|
||||
assertion.c deref.c
|
||||
assertion.c deref.c ldif.c fetch.c
|
||||
SRCS = threads.c rdwr.c rmutex.c tpool.c rq.c \
|
||||
thr_posix.c thr_cthreads.c thr_thr.c thr_lwp.c thr_nt.c \
|
||||
@@ -47,7 +47,7 @@
|
||||
@ -225,6 +225,6 @@ Index: trunk/libraries/libldap_r/Makefile.in
|
||||
tls2.lo tls_o.lo tls_g.lo tls_m.lo \
|
||||
- turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo \
|
||||
+ turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo ntlm.lo \
|
||||
assertion.lo deref.lo
|
||||
assertion.lo deref.lo ldif.lo fetch.lo
|
||||
|
||||
LDAP_INCDIR= ../../include
|
||||
LDAP_INCDIR= ../../include
|
||||
|
@ -11,7 +11,7 @@ pkgdesc="A collection of routines used to create and manipulate MNG format graph
|
||||
arch=('x86_64')
|
||||
url="http://www.libmng.com/"
|
||||
license=('custom')
|
||||
depends=('lib32-zlib' 'lib32-libjpeg>=8' $_pkgbasename)
|
||||
depends=('lib32-zlib' 'lib32-libjpeg>=8' $_pkgbasename=$pkgver)
|
||||
makedepends=(gcc-multilib)
|
||||
options=(!libtool)
|
||||
source=(http://downloads.sourceforge.net/sourceforge/$_pkgbasename/$_pkgbasename-$pkgver.tar.gz)
|
||||
|
@ -11,7 +11,7 @@ pkgdesc="Ogg bitstream and framing library (32-bit)"
|
||||
arch=('x86_64')
|
||||
url="http://www.xiph.org/ogg/"
|
||||
license=('BSD')
|
||||
depends=('lib32-glibc' $_pkgbasename)
|
||||
depends=('lib32-glibc' $_pkgbasename=$pkgver)
|
||||
makedepends=(gcc-multilib)
|
||||
options=('!libtool')
|
||||
source=(http://downloads.xiph.org/releases/ogg/$_pkgbasename-$pkgver.tar.gz)
|
||||
|
@ -5,9 +5,9 @@
|
||||
|
||||
_pkgbasename=libpciaccess
|
||||
pkgname=lib32-${_pkgbasename}
|
||||
pkgver=0.12.1
|
||||
pkgver=0.13.1
|
||||
pkgrel=1
|
||||
pkgdesc="X11 PCI access library (32-bit"
|
||||
pkgdesc="X11 PCI access library (32-bit)"
|
||||
arch=(i686 x86_64)
|
||||
license=('custom')
|
||||
url="http://xorg.freedesktop.org/"
|
||||
@ -15,7 +15,7 @@ depends=('lib32-glibc' ${_pkgbasename})
|
||||
makedepends=('gcc-multilib' 'pkgconfig' 'xorg-util-macros')
|
||||
options=('!libtool')
|
||||
source=(${url}/releases/individual/lib/${_pkgbasename}-${pkgver}.tar.bz2)
|
||||
sha1sums=('4933bda545df37395e57ff6b4bd61e17a5431770')
|
||||
sha1sums=('ae4dcf27a1b52c6a1fd90b21165fbaecae34e8ac')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_pkgbasename}-${pkgver}"
|
||||
@ -34,4 +34,4 @@ build() {
|
||||
rm -rf "${pkgdir}"/usr/include
|
||||
mkdir -p "$pkgdir/usr/share/licenses"
|
||||
ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
}
|
@ -5,20 +5,20 @@
|
||||
|
||||
_pkgbasename=libpng
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=1.4.4
|
||||
_apngver=1.4.4
|
||||
pkgrel=2
|
||||
pkgver=1.5.13
|
||||
_apngver=1.5.13
|
||||
pkgrel=1
|
||||
pkgdesc="A collection of routines used to create PNG format graphics files (32-bit)"
|
||||
arch=('x86_64')
|
||||
url="http://www.libpng.org/pub/png/libpng.html"
|
||||
license=('custom')
|
||||
depends=('lib32-zlib' $_pkgbasename)
|
||||
depends=('lib32-zlib' $_pkgbasename=$pkgver 'sh')
|
||||
makedepends=(gcc-multilib)
|
||||
options=('!libtool')
|
||||
source=("http://downloads.sourceforge.net/sourceforge/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.xz"
|
||||
"http://downloads.sourceforge.net/sourceforge/libpng-apng/libpng-${_apngver}-apng.patch.gz")
|
||||
md5sums=('0342d1cedb9b9a80294dd1b1e2ec9ae9'
|
||||
'd5cd185e7da764a10ff9046d42449259')
|
||||
md5sums=('0b607a685da977f1bfc96e1c47055183'
|
||||
'23c8765aa6ca188c0575386d5ea8fe70')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
@ -31,11 +31,6 @@ build() {
|
||||
# see http://sourceforge.net/projects/libpng-apng/
|
||||
patch -p1 -i "${srcdir}/libpng-${_apngver}-apng.patch"
|
||||
|
||||
# libtoolize --force --copy
|
||||
# aclocal
|
||||
# autoconf
|
||||
# automake --add-missing
|
||||
|
||||
./configure --prefix=/usr --libdir=/usr/lib32
|
||||
make
|
||||
}
|
||||
|
@ -1,54 +0,0 @@
|
||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
|
||||
_pkgbasename=libpulse
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgdesc="A featureful, general-purpose sound server (32-bit client libraries)"
|
||||
pkgver=1.0
|
||||
pkgrel=1
|
||||
arch=(x86_64)
|
||||
url="http://pulseaudio.org/"
|
||||
license=(GPL LGPL)
|
||||
depends=(lib32-{dbus-core,xcb-util,json-c}
|
||||
lib32-lib{asyncns,cap,xtst,sm,sndfile,samplerate}
|
||||
$_pkgbasename)
|
||||
makedepends=(pkgconfig gcc-multilib lib32-libtool intltool lib32-glib2 lib32-speex)
|
||||
optdepends=('lib32-alsa-plugins: ALSA support')
|
||||
provides=("lib32-pulseaudio=$pkgver")
|
||||
conflicts=(lib32-pulseaudio)
|
||||
replaces=(lib32-pulseaudio)
|
||||
options=(!emptydirs !libtool !makeflags)
|
||||
source=("http://freedesktop.org/software/pulseaudio/releases/pulseaudio-$pkgver.tar.xz")
|
||||
md5sums=('538e0b55ab9ba2987a88047ae332f5f4')
|
||||
|
||||
_libs="libpulsecommon-$pkgver.la libpulse.la libpulse-simple.la libpulse-mainloop-glib.la libpulsedsp.la"
|
||||
|
||||
build() {
|
||||
cd "$srcdir/pulseaudio-$pkgver"
|
||||
|
||||
# Don't break circular dependency between libpulse and libpulsecommon
|
||||
LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
|
||||
|
||||
|
||||
export CC="gcc -m32"
|
||||
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--libdir=/usr/lib32 \
|
||||
--libexecdir=/usr/lib32 \
|
||||
--localstatedir=/var \
|
||||
--disable-hal \
|
||||
--disable-rpath \
|
||||
--disable-default-build-tests
|
||||
|
||||
make -C src $_libs
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/pulseaudio-$pkgver"
|
||||
make -C src lib_LTLIBRARIES="$_libs" DESTDIR="$pkgdir" install-libLTLIBRARIES
|
||||
make DESTDIR="$pkgdir" install-pkgconfigDATA
|
||||
}
|
@ -11,7 +11,7 @@ pkgdesc="Secret Rabbit Code - aka Sample Rate Converter for audio (32-bit)"
|
||||
arch=('x86_64')
|
||||
url="http://www.mega-nerd.com/SRC/index.html"
|
||||
license=('GPL')
|
||||
depends=('lib32-libsndfile' $_pkgbasename)
|
||||
depends=('lib32-libsndfile' $_pkgbasename=$pkgver)
|
||||
makedepedns=('gcc-multilib')
|
||||
options=('!libtool')
|
||||
source=(http://www.mega-nerd.com/SRC/libsamplerate-${pkgver}.tar.gz)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user