Added toolchain components (gcc 4.5.1/glibc 2.12.1)

This commit is contained in:
Kevin Mihelich 2011-01-05 00:28:13 -07:00
parent 11913b0aea
commit b678c1c7fd
23 changed files with 917 additions and 144 deletions

70
core/binutils/PKGBUILD Normal file
View file

@ -0,0 +1,70 @@
# $Id: PKGBUILD 72655 2010-03-19 03:19:22Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
pkgname=binutils
pkgver=2.20.1
pkgrel=1
_date=20100318
pkgdesc="A set of programs to assemble and manipulate binary and object files"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/binutils/"
license=('GPL')
groups=('base')
depends=('glibc>=2.11.1-2' 'zlib')
options=('!libtool' '!distcc' '!ccache')
install=binutils.install
source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}_${_date}.tar.bz2)
md5sums=('c153213a20a5075bd98d7f12fbd38a51')
mksource() {
mkdir ${pkgname}-${_date}
cd ${pkgname}-${_date}
export _TAG=binutils-2_20-branch
export 'CVSROOT=:pserver:anoncvs@sourceware.org:/cvs/src'
cvs -z9 co -r $_TAG binutils || return 1
cd src && tar -cvjf ../../binutils-${pkgver}_${_date}.tar.bz2 *
}
build() {
cd ${srcdir}
mkdir build && cd build
CC="gcc -L`pwd`/bfd/.libs/"
if [ "${CARCH}" = "x86_64" ]; then
../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-64-bit-bfd --disable-multilib
else
../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --host=arm-unknown-linux-gnueabi --build=arm-unknown-linux-gnueabi
fi
# fix man files install path
sed -i -e "s:mandir \= \/usr\/share:mandir \= ${pkgdir}\/usr\/share:" ${srcdir}/build/Makefile || return 1
# fix info files install path
sed -i -e "s:infodir \= \/usr\/share:infodir \= ${pkgdir}\/usr\/share:" ${srcdir}/build/Makefile || return 1
# This checks the host environment and makes sure all the necessary tools are available to compile Binutils.
make configure-host || return 1
make tooldir=${pkgdir}/usr || return 1
make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install
install -m644 ${srcdir}/include/libiberty.h ${pkgdir}/usr/include
if [ "${CARCH}" = "x86_64" ]; then
# 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
make CFLAGS="$CFLAGS -fPIC" -C bfd
install -m644 bfd/libbfd.a ${pkgdir}/usr/lib
fi
rm -f ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}*
# Remove these symlinks, with binutils prereleases they are not ABI stable.
# Programs should compile static to the .a file.
rm -f ${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
}

View file

@ -0,0 +1 @@
/data/repo/binutils-2.20.1-1-arm.pkg.tar.xz

View file

@ -0,0 +1,17 @@
infodir=/usr/share/info
filelist=(as.info bfd.info binutils.info configure.info gprof.info ld.info standards.info)
post_upgrade() {
[ -x usr/bin/install-info ] || return 0
for file in ${filelist[@]}; do
install-info $infodir/$file.gz $infodir/dir 2> /dev/null
done
}
pre_remove() {
[ -x usr/bin/install-info ] || return 0
for file in ${filelist[@]}; do
install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
done
}

32
core/cloog-ppl/PKGBUILD Normal file
View file

@ -0,0 +1,32 @@
# $Id: PKGBUILD 87235 2010-08-11 12:10:19Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: ezzetabi <ezzetabi at gawab dot com>
pkgname=cloog-ppl
pkgver=0.15.9
pkgrel=2
pkgdesc="Library that generates loops for scanning polyhedra"
arch=('i686' 'x86_64')
url="http://www.cloog.org/"
license=('GPL')
depends=('ppl>=0.11')
options=('!libtool')
source=(ftp://gcc.gnu.org/pub/gcc/infrastructure/${pkgname}-${pkgver}.tar.gz)
md5sums=('806e001d1b1a6b130069ff6274900af5')
build() {
cd $srcdir/$pkgname-$pkgver
# "Add" ppl-0.11 compatibility
sed -i "/ppl_minor_version=/s#10#11#" configure
./configure --prefix=/usr --infodir=/usr/share/info \
--with-bits=gmp --with-ppl=/usr
make
make check
}
package() {
cd $srcdir/$pkgname-$pkgver
make DESTDIR=$pkgdir/ install
}

View file

@ -1,31 +1,40 @@
# Maintainer: Mike Staszel <mikestaszel@plugboxlinux.org>
# Contributor: Jonny Gerold <fsk141@archplug.org>
# $Id: PKGBUILD 87242 2010-08-11 12:46:24Z allan $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer: Allan McRae <allan@archlinux.org>
# toolchain build order: kernel-headers->glibc->binutils->gcc->binutils->glibc
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# NOTE: libtool requires rebuilt with each new gcc version
pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc')
pkgver=4.4.3
pkgrel=5
_libstdcppmanver=4.4.0
pkgver=4.5.1
pkgrel=1
#_snapshot=4.5-20100610
_libstdcppmanver=20100719 # Note: check source directory name when updating this
pkgdesc="The GNU Compiler Collection"
arch=('arm')
license=('GPL' 'LGPL' 'custom')
url="http://gcc.gnu.org"
makedepends=('binutils>=2.20' 'mpfr>=3.0.0' 'cloog-ppl>=0.15.3')
makedepends=('binutils>=2.20.1' 'libmpc>=0.8.2-2' 'cloog-ppl>=0.15.9-2' 'elfutils')
options=('!libtool' '!emptydirs')
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++,fortran,objc}-${pkgver}.tar.bz2
ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-man.${_libstdcppmanver}.tar.bz2
#ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-{core,g++,fortran,objc}-${_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=('054b66f315b3d04ad06544ce26e72365'
'cd179ec4f05ee17ce76464da25a2674c'
'0f8fa5e9edbcf156a061312cae0715ee'
'34711c4de46eaf79aa018206dbec4389'
'3b94fe4a3cd49819bf57ecc407851b9b'
md5sums=('dc8959e31b01a65ce10d269614815054'
'b294953ff0bb2f20c7acb2bf005d832a'
'7567c2f8df8a8bf61b48fe414b88de65'
'3c11b7037896e967eddf8178af2ddd98'
'226ae0c6364cfe2c1f7ac88d06088d5a'
'4030ee1c08dd1e843c0225b772360e76'
'6fd395bacbd7b6e47c7b74854b478363')
if [ -n "${_snapshot}" ]; then
_basedir="${srcdir}/gcc-${_snapshot}"
else
_basedir="${srcdir}/gcc-${pkgver}"
fi
build() {
if ! locale -a | grep ^de_DE > /dev/null; then
@ -34,55 +43,54 @@ build() {
fi
cd ${_basedir}
# "Add" ppl-0.11 compatibility
sed -i "/ppl_minor_version=/s#10#11#" configure
# Do not install libiberty
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
# Do not run fixincludes
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch || return 1
if [ "${CARCH}" = "x86_64" ]; then
patch -Np1 -i ../gcc_pure64.patch
fi
patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch
echo ${pkgver} > gcc/BASE-VER
mkdir build && cd build
../configure --prefix=/usr \
--build=$CHOST \
--target=$CHOST \
--enable-shared \
--enable-languages=c,c++,fortran,objc,obj-c++ \
--enable-threads=posix \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--enable-__cxa_atexit \
--disable-multilib \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--enable-clocale=gnu \
--disable-libstdcxx-pch \
make || return 1
mkdir build && cd build
../configure --prefix=/usr --enable-languages=c,c++,fortran,objc,obj-c++ \
--host=arm-unknown-linux-gnueabi --build=arm-unknown-linux-gnueabi \
--enable-shared --enable-threads=posix --enable-__cxa_atexit \
--enable-clocale=gnu --enable-gnu-unique-object \
--enable-lto --enable-plugin \
--disable-multilib --disable-libstdcxx-pch \
--with-system-zlib --with-ppl --with-cloog \
--libdir=/usr/lib --libexecdir=/usr/lib \
--mandir=/usr/share/man --infodir=/usr/share/info
make
}
package_gcc-libs()
{
pkgdesc="Runtime libraries shipped by GCC for C and C++ languages"
groups=('base')
depends=('glibc>=2.10.1-5')
depends=('glibc>=2.11.1-2')
install=gcc-libs.install
cd ${_basedir}/build
make -j2 -C $CHOST/libgcc DESTDIR=${pkgdir} install-shared
make -j1 -C $CHOST/libgcc DESTDIR=${pkgdir} install-shared
for lib in libmudflap libgomp libssp libstdc++-v3/src; do
make -j2 -C $CHOST/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
make -j1 -C $CHOST/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
done
make -j2 -C $CHOST/libstdc++-v3/po DESTDIR=${pkgdir} install
make -j2 -C $CHOST/libgomp DESTDIR=${pkgdir} install-info
make -j1 -C $CHOST/libstdc++-v3/po DESTDIR=${pkgdir} install
make -j1 -C $CHOST/libgomp DESTDIR=${pkgdir} install-info
make -j2 DESTDIR=${pkgdir} install-target-libgfortran
make -j1 DESTDIR=${pkgdir} install-target-libgfortran
make -j2 DESTDIR=${pkgdir} install-target-libobjc
make -j1 DESTDIR=${pkgdir} install-target-libobjc
# I thought I said to only install the lib...
rm -rf ${pkgdir}/usr/lib/gcc/
@ -96,23 +104,21 @@ package_gcc-libs()
package_gcc()
{
depends=('binutils>=2.20' 'mpfr>=3.0.0' 'cloog-ppl>=0.15.3')
depends=('binutils>=2.20.1' 'libmpc>=0.8.1-2' 'cloog-ppl>=0.15.9-2' 'elfutils')
groups=('base-devel')
install=gcc.install
cd ${_basedir}/build
# much, much easier to install the lot and clean-up the mess
make -j2 DESTDIR=${pkgdir} install || return 1
rm -rf $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{adainclude,adalib,finclude}
mkdir -p $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{adainclude,adalib,finclude}
rm -rf $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/include/objc
mkdir -p $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/include/objc
rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{cc1obj{,plus},f951,libgfortranbegin.a}
rm $pkgdir/usr/lib/{*.so*,lib{gfortran,objc}.a}
rm $pkgdir/usr/share/info/{gfortran,libgomp}.info
rm $pkgdir/usr/share/locale/{de,fr}/LC_MESSAGES/libstdc++.mo
rm $pkgdir/usr/share/man/man1/gfortran.1
make -j1 DESTDIR=${pkgdir} install
rm -f $pkgdir/usr/bin/*gfortran
rm -f $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{finclude,include/objc}/*
rm -f $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{cc1obj{,plus},f951,libgfortranbegin.a}
rm -f $pkgdir/usr/lib/{*.so*,lib{gfortran,objc}.a}
rm -f $pkgdir/usr/share/info/{gfortran,libgomp}.info
rm -f $pkgdir/usr/share/locale/{de,fr}/LC_MESSAGES/libstdc++.mo
rm -f $pkgdir/usr/share/man/man1/gfortran.1
# many packages require these symlinks
install -dm755 ${pkgdir}/lib
@ -120,9 +126,38 @@ package_gcc()
ln -sf gcc ${pkgdir}/usr/bin/cc
ln -sf g++ ${pkgdir}/usr/bin/c++
# POSIX conformance launcher scripts for c89 and c99
cat > $pkgdir/usr/bin/c89 <<"EOF"
#!/bin/sh
fl="-std=c89"
for opt; do
case "$opt" in
-ansi|-std=c89|-std=iso9899:1990) fl="";;
-std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2
exit 1;;
esac
done
exec gcc $fl ${1+"$@"}
EOF
cat > $pkgdir/usr/bin/c99 <<"EOF"
#!/bin/sh
fl="-std=c99"
for opt; do
case "$opt" in
-std=c99|-std=iso9899:1999) fl="";;
-std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2
exit 1;;
esac
done
exec gcc $fl ${1+"$@"}
EOF
chmod 755 $pkgdir/usr/bin/c{8,9}9
# install the libstdc++ man pages
install -dm755 ${pkgdir}/usr/share/man/man3
install -m644 ${srcdir}/libstdc++-man-${_libstdcppmanver}/man3/* \
install -m644 ${srcdir}/libstdc++-api-${_libstdcppmanver}.man/man3/* \
${pkgdir}/usr/share/man/man3/
# deal with conflicts...
rm -f ${pkgdir}/usr/share/man/man3/{ctime,queue,random,regex,string}.3
@ -135,13 +170,13 @@ package_gcc()
package_gcc-fortran()
{
pkgdesc="Fortran front-end for GCC"
depends=("gcc=$pkgver")
depends=("gcc=$pkgver-$pkgrel")
install=gcc-fortran.install
cd ${_basedir}/build
make -j2 DESTDIR=$pkgdir install-target-libgfortran
make -j2 -C $CHOST/libgomp DESTDIR=$pkgdir install-nodist_fincludeHEADERS
make -j2 -C gcc DESTDIR=$pkgdir fortran.install-{common,man,info}
make -j1 DESTDIR=$pkgdir install-target-libgfortran
make -j1 -C $CHOST/libgomp DESTDIR=$pkgdir install-nodist_fincludeHEADERS
make -j1 -C gcc DESTDIR=$pkgdir fortran.install-{common,man,info}
install -Dm755 gcc/f951 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/f951
# remove libraries included in gcc-libs
@ -155,10 +190,10 @@ package_gcc-fortran()
package_gcc-objc()
{
pkgdesc="Objective-C front-end for GCC"
depends=("gcc=$pkgver")
depends=("gcc=$pkgver-$pkgrel")
cd ${_basedir}/build
make -j2 DESTDIR=$pkgdir install-target-libobjc
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/

22
core/gcc/gcc-ada.install Normal file
View file

@ -0,0 +1,22 @@
infodir=/usr/share/info
filelist=(gnat-style.info gnat_rm.info gnat_ugn.info)
post_install() {
[ -x usr/bin/install-info ] || return 0
for file in ${filelist[@]}; do
install-info $infodir/$file.gz $infodir/dir 2> /dev/null
done
}
post_upgrade() {
post_install $1
}
pre_remove() {
[ -x usr/bin/install-info ] || return 0
for file in ${filelist[@]}; do
install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
done
}
# vim:set ts=2 sw=2 et:

View file

@ -1,15 +1,11 @@
infodir=/usr/share/info
file="libgomp.info"
post_install() {
post_upgrade() {
[ -x usr/bin/install-info ] || return 0
install-info $infodir/$file.gz $infodir/dir 2> /dev/null
}
post_upgrade() {
post_install $1
}
pre_remove() {
[ -x usr/bin/install-info ] || return 0
install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null

View file

@ -1,100 +1,176 @@
# Maintainer: Mike Staszel <mikestaszel@plugboxlinux.org>
# $Id: PKGBUILD 97014 2010-10-26 01:24:43Z allan $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer: Allan McRae <allan@archlinux.org>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# NOTE: valgrind requires rebuilt with each new glibc version
pkgname=glibc
pkgver=2.11
pkgrel=9
pkgver=2.12.1
pkgrel=4
_glibcdate=20101025
pkgdesc="GNU C Library"
arch=('arm')
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/libc"
license=('GPL' 'LGPL')
groups=('base')
depends=('kernel26-headers>=2.6.36' 'tzdata')
depends=('linux-api-headers>=2.6.34' 'tzdata')
makedepends=('gcc>=4.4')
replaces=('glibc-xen')
backup=(etc/locale.gen
etc/nscd.conf)
options=('!strip')
install=glibc.install
source=(http://ftp.gnu.org/gnu/glibc/$pkgname-$pkgver.tar.gz
http://ftp.gnu.org/gnu/glibc/$pkgname-ports-$pkgver.tar.gz
glibc-2.10-dont-build-timezone.patch
source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.tar.xz
http://ftp.gnu.org/gnu/glibc/${pkgname}-ports-${pkgver}.tar.gz
glibc-2.10-dont-build-timezone.patch
glibc-2.10-bz4781.patch
glibc-__i686.patch
glibc-2.12.1-make-3.82-compatibility.patch
glibc-2.12.1-static-shared-getpagesize.patch
glibc-2.12.1-but-I-am-an-i686.patch
glibc-2.12.1-fix-IPTOS_CLASS-definition.patch
glibc-2.12.1-never-expand-origin-when-privileged.patch
glibc-2.12.1-require-suid-on-audit.patch
nscd
locale.gen.txt
locale-gen)
md5sums=('55d50abb2d7c366bde6fb5e35e681f9b'
'7100d8ba81c52e90e7fb4795d2f736c9'
'4dadb9203b69a3210d53514bb46f41c3'
md5sums=('b12192eff7306f2a6e919641b847e7cf'
'd3311554368849da08dc16f6c535f097'
'4dadb9203b69a3210d53514bb46f41c3'
'0c5540efc51c0b93996c51b57a8540ae'
'40cd342e21f71f5e49e32622b25acc52'
'1deecaa78c0909f7175732da2af796b5'
'a3ac6f318d680347bb6e2805d42b73b2'
'de17165e3fa721c4e056dacfc9ee1e52'
'fdc0908c9971fcf9b32e1185954b6eeb'
'e154dbe21d4e24968ab257ffd9c106f2'
'bbc99319ad78fe9eb1ac217efc770ac6'
'b587ee3a70c9b3713099295609afde49'
'1dfde0f12c99c7ec4d4054caf8ee5373'
'07ac979b6ab5eeb778d55f041529d623'
'476e9113489f93b348b21e144b6a8fcf')
mksource() {
git clone git://sourceware.org/git/glibc.git
pushd glibc
git checkout -b glibc-2.12-arch origin/release/2.12/master
popd
tar -cvJf glibc-${pkgver}_${_glibcdate}.tar.xz glibc/*
}
build() {
ln -s $srcdir/glibc-2.11 $srcdir/glibc
cd ${srcdir}/glibc
ln -s $srcdir/glibc-ports-2.11 $srcdir/glibc
# From here on out, it's the same PKGBUILD as vanilla
# With the ./configure armv5te exception
cd ${srcdir}/glibc
ln -s ${srcdir}/${pkgname}-ports-${pkgver} ./ports
# timezone data is in separate package (tzdata)
patch -Np1 -i ${srcdir}/glibc-2.10-dont-build-timezone.patch || return 1
# timezone data is in separate package (tzdata)
patch -Np1 -i ${srcdir}/glibc-2.10-dont-build-timezone.patch
install -dm755 ${pkgdir}/etc
touch ${pkgdir}/etc/ld.so.conf
mkdir glibc-build
cd glibc-build
echo "slibdir=/lib" >> configparms
../configure --prefix=/usr \
--host=arm-unknown-linux-gnueabi \
--build=arm-unknown-linux-gnueabi \
--enable-add-ons \
--enable-kernel=2.6.22 \
--enable-bind-now \
--disable-profile \
--disable-debug \
--disable-gd \
--libexecdir=/usr/lib \
--libdir=/usr/lib \
--with-tls \
--with-__thread \
--with-headers=/usr/include \
--without-cvs \
--without-gd \
--without-fp \
--without-selinux
make || return 1
# 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/git/?p=glibc.git;a=patch;h=32cf4069
patch -Np1 -i ${srcdir}/glibc-2.12.1-make-3.82-compatibility.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
# fedora "fix" for excess linker optimization on i686
# proper fix will be in binutils-2.21
patch -Np1 -i ${srcdir}/glibc-2.12.1-but-I-am-an-i686.patch
# http://www.exploit-db.com/exploits/15274/
# http://sourceware.org/git/?p=glibc.git;a=patch;h=2232b90f (only fedora branch...)
patch -Np1 -i ${srcdir}/glibc-2.12.1-never-expand-origin-when-privileged.patch
# http://www.exploit-db.com/exploits/15304/
# http://sourceware.org/git/?p=glibc.git;a=patch;h=8e9f92e9
patch -Np1 -i ${srcdir}/glibc-2.12.1-require-suid-on-audit.patch
# http://sources.redhat.com/git/?p=glibc.git;a=patch;h=15bac72b
patch -Np1 -i ${srcdir}/glibc-2.12.1-fix-IPTOS_CLASS-definition.patch
install -dm755 ${pkgdir}/etc
touch ${pkgdir}/etc/ld.so.conf
mkdir glibc-build
cd glibc-build
if [[ ${CARCH} = "i686" ]]; then
# Hack to fix NPTL issues with Xen, only required on 32bit platforms
export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs"
fi
echo "slibdir=/lib" >> configparms
../configure --prefix=/usr \
--host=arm-unknown-linux-gnueabi --build=arm-unknown-linux-gnueabi \
--enable-add-ons=nptl,libidn,ports --without-cvs \
--enable-kernel=2.6.36 --disable-profile \
--with-headers=/usr/include --libexecdir=/usr/lib \
--enable-bind-now --with-tls --with-__thread \
--libdir=/usr/lib --without-gd --disable-multi-arch
make
}
package() {
cd ${srcdir}/glibc/glibc-build
make install_root=${pkgdir} install || return 1
# provided by linux-api-headers
rm ${pkgdir}/usr/include/scsi/scsi.h
rm ${pkgdir}/etc/ld.so.cache ${pkgdir}/etc/ld.so.conf
install -dm755 ${pkgdir}/etc/rc.d
install -dm755 ${pkgdir}/usr/sbin
install -dm755 ${pkgdir}/usr/lib/locale
install -m644 ${srcdir}/glibc/nscd/nscd.conf ${pkgdir}/etc/nscd.conf
install -m755 ${srcdir}/nscd ${pkgdir}/etc/rc.d/nscd
install -m755 ${srcdir}/locale-gen ${pkgdir}/usr/sbin
sed -i -e 's/^\tserver-user/#\tserver-user/' ${pkgdir}/etc/nscd.conf || return 1
# create /etc/locale.gen
install -m644 ${srcdir}/locale.gen.txt ${pkgdir}/etc/locale.gen
sed -i "s|/| |g" ${srcdir}/glibc/localedata/SUPPORTED
sed -i 's|\\| |g' ${srcdir}/glibc/localedata/SUPPORTED
sed -i "s|SUPPORTED-LOCALES=||" ${srcdir}/glibc/localedata/SUPPORTED
cat ${srcdir}/glibc/localedata/SUPPORTED >> ${pkgdir}/etc/locale.gen
sed -i "s|^|#|g" ${pkgdir}/etc/locale.gen
cd ${srcdir}/glibc/glibc-build
make install_root=${pkgdir} install
# provided by kernel-headers
rm ${pkgdir}/usr/include/scsi/scsi.h
rm ${pkgdir}/etc/ld.so.conf
install -dm755 ${pkgdir}/etc/rc.d
install -dm755 ${pkgdir}/usr/sbin
install -dm755 ${pkgdir}/usr/lib/locale
install -m644 ${srcdir}/glibc/nscd/nscd.conf ${pkgdir}/etc/nscd.conf
install -m755 ${srcdir}/nscd ${pkgdir}/etc/rc.d/nscd
install -m755 ${srcdir}/locale-gen ${pkgdir}/usr/sbin
sed -i -e 's/^\tserver-user/#\tserver-user/' ${pkgdir}/etc/nscd.conf
# create /etc/locale.gen
install -m644 ${srcdir}/locale.gen.txt ${pkgdir}/etc/locale.gen
sed -i "s|/| |g" ${srcdir}/glibc/localedata/SUPPORTED
sed -i 's|\\| |g' ${srcdir}/glibc/localedata/SUPPORTED
sed -i "s|SUPPORTED-LOCALES=||" ${srcdir}/glibc/localedata/SUPPORTED
cat ${srcdir}/glibc/localedata/SUPPORTED >> ${pkgdir}/etc/locale.gen
sed -i "s|^|#|g" ${pkgdir}/etc/locale.gen
if [[ ${CARCH} = "x86_64" ]]; then
# fix for the linker
sed -i '/RTLDLIST/s%lib64%lib%' ${pkgdir}/usr/bin/ldd
#Comply with multilib binaries, they look for the linker in /lib64
mkdir ${pkgdir}/lib64
cd ${pkgdir}/lib64
ln -v -s ../lib/ld* .
fi
# 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 sbin/{ldconfig,sln} \
usr/bin/{gencat,getconf,getent,iconv,locale} \
usr/bin/{localedef,pcprofiledump,rpcgen,sprof} \
usr/lib/getconf/* \
usr/sbin/{iconvconfig,nscd,rpcinfo}
[[ $CARCH = "i686" ]] && strip $STRIP_BINARIES usr/bin/lddlibc4
strip $STRIP_STATIC usr/lib/*.a \
lib/{{ld,libpthread}-${pkgver},libthread_db-1.0}.so
strip $STRIP_SHARED lib/{libanl,libBrokenLocale,libc,libcidn,libcrypt}-${pkgver}.so \
lib/libnss_{compat,dns,files,hesiod,nis,nisplus}-${pkgver}.so \
lib/{libdl,libm,libnsl,libresolv,librt,libutil}-${pkgver}.so \
lib/{libmemusage,libpcprofile,libSegFault}.so \
usr/lib/{pt_chown,gconv/*.so}
}

View file

@ -0,0 +1,42 @@
diff -Naur glibc-old/sysdeps/unix/sysv/linux/i386/clone.S glibc/sysdeps/unix/sysv/linux/i386/clone.S
--- glibc-old/sysdeps/unix/sysv/linux/i386/clone.S 2009-05-09 13:35:30.000000000 +1000
+++ glibc/sysdeps/unix/sysv/linux/i386/clone.S 2009-05-23 13:27:46.000000000 +1000
@@ -120,9 +120,6 @@
ret
L(thread_start):
- cfi_startproc;
- /* Clearing frame pointer is insufficient, use CFI. */
- cfi_undefined (eip);
/* Note: %esi is zero. */
movl %esi,%ebp /* terminate the stack frame */
#ifdef RESET_PID
@@ -155,7 +152,6 @@
jmp L(haspid)
.previous
#endif
- cfi_endproc;
cfi_startproc
PSEUDO_END (BP_SYM (__clone))
diff -Naur glibc-old/sysdeps/unix/sysv/linux/x86_64/clone.S glibc/sysdeps/unix/sysv/linux/x86_64/clone.S
--- glibc-old/sysdeps/unix/sysv/linux/x86_64/clone.S 2009-05-09 13:35:30.000000000 +1000
+++ glibc/sysdeps/unix/sysv/linux/x86_64/clone.S 2009-05-23 13:27:46.000000000 +1000
@@ -89,9 +89,6 @@
ret
L(thread_start):
- cfi_startproc;
- /* Clearing frame pointer is insufficient, use CFI. */
- cfi_undefined (rip);
/* Clear the frame pointer. The ABI suggests this be done, to mark
the outermost frame obviously. */
xorl %ebp, %ebp
@@ -116,7 +113,6 @@
/* Call exit with return value from function call. */
movq %rax, %rdi
call HIDDEN_JUMPTARGET (_exit)
- cfi_endproc;
cfi_startproc;
PSEUDO_END (BP_SYM (__clone))

0
core/glibc/glibc-2.10-dont-build-timezone.patch Executable file → Normal file
View file

View file

@ -0,0 +1,22 @@
--- glibc-2.12-62-gb08c89d/sysdeps/i386/i686/Makefile
+++ glibc-2.12.90-6/sysdeps/i386/i686/Makefile
@@ -9,19 +9,3 @@ stack-align-test-flags += -msse
ifeq ($(subdir),string)
sysdep_routines += cacheinfo
endif
-
-ifeq (yes,$(config-asflags-i686))
-CFLAGS-.o += -Wa,-mtune=i686
-CFLAGS-.os += -Wa,-mtune=i686
-CFLAGS-.op += -Wa,-mtune=i686
-CFLAGS-.og += -Wa,-mtune=i686
-CFLAGS-.ob += -Wa,-mtune=i686
-CFLAGS-.oS += -Wa,-mtune=i686
-
-ASFLAGS-.o += -Wa,-mtune=i686
-ASFLAGS-.os += -Wa,-mtune=i686
-ASFLAGS-.op += -Wa,-mtune=i686
-ASFLAGS-.og += -Wa,-mtune=i686
-ASFLAGS-.ob += -Wa,-mtune=i686
-ASFLAGS-.oS += -Wa,-mtune=i686
-endif

View file

@ -0,0 +1,34 @@
From 15bac72bac03faeb3b725b1d208c62160f0c3ad7 Mon Sep 17 00:00:00 2001
From: Ulrich Drepper <drepper@redhat.com>
Date: Wed, 11 Aug 2010 07:44:03 -0700
Subject: [PATCH] Fix IPTOS_CLASS definition.
---
ChangeLog | 4 ++++
NEWS | 4 ++--
sysdeps/generic/netinet/ip.h | 5 ++---
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/sysdeps/generic/netinet/ip.h b/sysdeps/generic/netinet/ip.h
index a837b98..4955fee 100644
--- a/sysdeps/generic/netinet/ip.h
+++ b/sysdeps/generic/netinet/ip.h
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991,92,93,95,96,97,98,99,2000,2009 Free Software
- Foundation, Inc.
+/* Copyright (C) 1991-1993,1995-2000,2009,2010 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
@@ -194,7 +193,7 @@ struct ip_timestamp
*/
#define IPTOS_CLASS_MASK 0xe0
-#define IPTOS_CLASS(class) ((tos) & IPTOS_CLASS_MASK)
+#define IPTOS_CLASS(class) ((class) & IPTOS_CLASS_MASK)
#define IPTOS_CLASS_CS0 0x00
#define IPTOS_CLASS_CS1 0x20
#define IPTOS_CLASS_CS2 0x40
--
1.7.2

View file

@ -0,0 +1,29 @@
From 32cf40699346d37fabfa887bbd95e95004799ae1 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Mon, 6 Sep 2010 14:55:59 +0200
Subject: [PATCH 1/1] Don't mix pattern rules with normal rules
---
ChangeLog | 4 ++++
manual/Makefile | 5 ++++-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/manual/Makefile b/manual/Makefile
index c5866eb..b1f5fa7 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -232,7 +232,10 @@ ifdef objpfx
.PHONY: stubs
stubs: $(objpfx)stubs
endif
-$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
+$(objpfx)stubs ../po/manual.pot:
+ $(make-target-directory)
+ touch $@
+$(objpfx)stamp%:
$(make-target-directory)
touch $@
--
1.7.2

View file

@ -0,0 +1,85 @@
From 2232b90f0bd3a41b4d63cac98a5b60abbfaccd46 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Mon, 18 Oct 2010 11:46:00 +0200
Subject: [PATCH] Never expand $ORIGIN in privileged programs
---
ChangeLog | 6 ++++++
elf/dl-load.c | 30 +++++++++++++-----------------
2 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 0adddf5..1cc6f25 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -169,8 +169,7 @@ local_strdup (const char *s)
static size_t
-is_dst (const char *start, const char *name, const char *str,
- int is_path, int secure)
+is_dst (const char *start, const char *name, const char *str, int is_path)
{
size_t len;
bool is_curly = false;
@@ -199,11 +198,6 @@ is_dst (const char *start, const char *name, const char *str,
&& (!is_path || name[len] != ':'))
return 0;
- if (__builtin_expect (secure, 0)
- && ((name[len] != '\0' && (!is_path || name[len] != ':'))
- || (name != start + 1 && (!is_path || name[-2] != ':'))))
- return 0;
-
return len;
}
@@ -218,13 +212,12 @@ _dl_dst_count (const char *name, int is_path)
{
size_t len;
- /* $ORIGIN is not expanded for SUID/GUID programs (except if it
- is $ORIGIN alone) and it must always appear first in path. */
+ /* $ORIGIN is not expanded for SUID/GUID programs. */
++name;
- if ((len = is_dst (start, name, "ORIGIN", is_path,
- INTUSE(__libc_enable_secure))) != 0
- || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0
- || (len = is_dst (start, name, "LIB", is_path, 0)) != 0)
+ if (((len = is_dst (start, name, "ORIGIN", is_path)) != 0
+ && !INTUSE(__libc_enable_secure))
+ || (len = is_dst (start, name, "PLATFORM", is_path)) != 0
+ || (len = is_dst (start, name, "LIB", is_path)) != 0)
++cnt;
name = strchr (name + len, '$');
@@ -256,9 +249,12 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
size_t len;
++name;
- if ((len = is_dst (start, name, "ORIGIN", is_path,
- INTUSE(__libc_enable_secure))) != 0)
+ if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0)
{
+ /* Ignore this path element in SUID/SGID programs. */
+ if (INTUSE(__libc_enable_secure))
+ repl = (const char *) -1;
+ else
#ifndef SHARED
if (l == NULL)
repl = _dl_get_origin ();
@@ -266,9 +262,9 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
#endif
repl = l->l_origin;
}
- else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)
+ else if ((len = is_dst (start, name, "PLATFORM", is_path)) != 0)
repl = GLRO(dl_platform);
- else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0)
+ else if ((len = is_dst (start, name, "LIB", is_path)) != 0)
repl = DL_DST_LIB;
if (repl != NULL && repl != (const char *) -1)
--
1.7.2

View file

@ -0,0 +1,218 @@
From 8e9f92e9d5d7737afdacf79b76d98c4c42980508 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Sun, 24 Oct 2010 21:43:15 -0400
Subject: [PATCH 1/1] Require suid bit on audit objects in privileged programs
---
ChangeLog | 15 +++++++++++++++
elf/dl-deps.c | 2 +-
elf/dl-load.c | 20 +++++++++++---------
elf/dl-open.c | 2 +-
elf/rtld.c | 16 +++++++---------
include/dlfcn.h | 1 +
sysdeps/generic/ldsodefs.h | 6 ++----
7 files changed, 38 insertions(+), 24 deletions(-)
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index a58de5c..a51fb6e 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -62,7 +62,7 @@ openaux (void *a)
{
struct openaux_args *args = (struct openaux_args *) a;
- args->aux = _dl_map_object (args->map, args->name, 0,
+ args->aux = _dl_map_object (args->map, args->name,
(args->map->l_type == lt_executable
? lt_library : args->map->l_type),
args->trace_mode, args->open_mode,
diff --git a/elf/dl-load.c b/elf/dl-load.c
index a7162eb..aa8738f 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1812,7 +1812,7 @@ open_verify (const char *name, struct filebuf *fbp, struct link_map *loader,
if MAY_FREE_DIRS is true. */
static int
-open_path (const char *name, size_t namelen, int preloaded,
+open_path (const char *name, size_t namelen, int secure,
struct r_search_path_struct *sps, char **realname,
struct filebuf *fbp, struct link_map *loader, int whatcode,
bool *found_other_class)
@@ -1894,7 +1894,7 @@ open_path (const char *name, size_t namelen, int preloaded,
/* Remember whether we found any existing directory. */
here_any |= this_dir->status[cnt] != nonexisting;
- if (fd != -1 && __builtin_expect (preloaded, 0)
+ if (fd != -1 && __builtin_expect (secure, 0)
&& INTUSE(__libc_enable_secure))
{
/* This is an extra security effort to make sure nobody can
@@ -1963,7 +1963,7 @@ open_path (const char *name, size_t namelen, int preloaded,
struct link_map *
internal_function
-_dl_map_object (struct link_map *loader, const char *name, int preloaded,
+_dl_map_object (struct link_map *loader, const char *name,
int type, int trace_mode, int mode, Lmid_t nsid)
{
int fd;
@@ -2067,7 +2067,8 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
for (l = loader; l; l = l->l_loader)
if (cache_rpath (l, &l->l_rpath_dirs, DT_RPATH, "RPATH"))
{
- fd = open_path (name, namelen, preloaded, &l->l_rpath_dirs,
+ fd = open_path (name, namelen, mode & __RTLD_SECURE,
+ &l->l_rpath_dirs,
&realname, &fb, loader, LA_SER_RUNPATH,
&found_other_class);
if (fd != -1)
@@ -2082,14 +2083,15 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
&& main_map != NULL && main_map->l_type != lt_loaded
&& cache_rpath (main_map, &main_map->l_rpath_dirs, DT_RPATH,
"RPATH"))
- fd = open_path (name, namelen, preloaded, &main_map->l_rpath_dirs,
+ fd = open_path (name, namelen, mode & __RTLD_SECURE,
+ &main_map->l_rpath_dirs,
&realname, &fb, loader ?: main_map, LA_SER_RUNPATH,
&found_other_class);
}
/* Try the LD_LIBRARY_PATH environment variable. */
if (fd == -1 && env_path_list.dirs != (void *) -1)
- fd = open_path (name, namelen, preloaded, &env_path_list,
+ fd = open_path (name, namelen, mode & __RTLD_SECURE, &env_path_list,
&realname, &fb,
loader ?: GL(dl_ns)[LM_ID_BASE]._ns_loaded,
LA_SER_LIBPATH, &found_other_class);
@@ -2098,12 +2100,12 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
if (fd == -1 && loader != NULL
&& cache_rpath (loader, &loader->l_runpath_dirs,
DT_RUNPATH, "RUNPATH"))
- fd = open_path (name, namelen, preloaded,
+ fd = open_path (name, namelen, mode & __RTLD_SECURE,
&loader->l_runpath_dirs, &realname, &fb, loader,
LA_SER_RUNPATH, &found_other_class);
if (fd == -1
- && (__builtin_expect (! preloaded, 1)
+ && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
|| ! INTUSE(__libc_enable_secure)))
{
/* Check the list of libraries in the file /etc/ld.so.cache,
@@ -2169,7 +2171,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
&& ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
|| __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
&& rtld_search_dirs.dirs != (void *) -1)
- fd = open_path (name, namelen, preloaded, &rtld_search_dirs,
+ fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
&realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
/* Add another newline when we are tracing the library loading. */
diff --git a/elf/dl-open.c b/elf/dl-open.c
index c394b3f..cf8e8cc 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -223,7 +223,7 @@ dl_open_worker (void *a)
/* Load the named object. */
struct link_map *new;
- args->map = new = _dl_map_object (call_map, file, 0, lt_loaded, 0,
+ args->map = new = _dl_map_object (call_map, file, lt_loaded, 0,
mode | __RTLD_CALLMAP, args->nsid);
/* If the pointer returned is NULL this means the RTLD_NOLOAD flag is
diff --git a/elf/rtld.c b/elf/rtld.c
index 5ecc4fe..06b534a 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -589,7 +589,6 @@ struct map_args
/* Argument to map_doit. */
char *str;
struct link_map *loader;
- int is_preloaded;
int mode;
/* Return value of map_doit. */
struct link_map *map;
@@ -627,16 +626,17 @@ static void
map_doit (void *a)
{
struct map_args *args = (struct map_args *) a;
- args->map = _dl_map_object (args->loader, args->str,
- args->is_preloaded, lt_library, 0, args->mode,
- LM_ID_BASE);
+ args->map = _dl_map_object (args->loader, args->str, lt_library, 0,
+ args->mode, LM_ID_BASE);
}
static void
dlmopen_doit (void *a)
{
struct dlmopen_args *args = (struct dlmopen_args *) a;
- args->map = _dl_open (args->fname, RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT,
+ args->map = _dl_open (args->fname,
+ (RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT
+ | __RTLD_SECURE),
dl_main, LM_ID_NEWLM, _dl_argc, INTUSE(_dl_argv),
__environ);
}
@@ -806,8 +806,7 @@ do_preload (char *fname, struct link_map *main_map, const char *where)
args.str = fname;
args.loader = main_map;
- args.is_preloaded = 1;
- args.mode = 0;
+ args.mode = __RTLD_SECURE;
unsigned int old_nloaded = GL(dl_ns)[LM_ID_BASE]._ns_nloaded;
@@ -1054,7 +1053,6 @@ of this helper program; chances are you did not intend to run this program.\n\
args.str = rtld_progname;
args.loader = NULL;
- args.is_preloaded = 0;
args.mode = __RTLD_OPENEXEC;
(void) _dl_catch_error (&objname, &err_str, &malloced, map_doit,
&args);
@@ -1066,7 +1064,7 @@ of this helper program; chances are you did not intend to run this program.\n\
else
{
HP_TIMING_NOW (start);
- _dl_map_object (NULL, rtld_progname, 0, lt_library, 0,
+ _dl_map_object (NULL, rtld_progname, lt_library, 0,
__RTLD_OPENEXEC, LM_ID_BASE);
HP_TIMING_NOW (stop);
diff --git a/include/dlfcn.h b/include/dlfcn.h
index a67426d..af92483 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -9,6 +9,7 @@
#define __RTLD_OPENEXEC 0x20000000
#define __RTLD_CALLMAP 0x10000000
#define __RTLD_AUDIT 0x08000000
+#define __RTLD_SECURE 0x04000000 /* Apply additional security checks. */
#define __LM_ID_CALLER -2
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index fcc943b..fa4b6b2 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -824,11 +824,9 @@ extern void _dl_receive_error (receiver_fct fct, void (*operate) (void *),
/* Open the shared object NAME and map in its segments.
LOADER's DT_RPATH is used in searching for NAME.
- If the object is already opened, returns its existing map.
- For preloaded shared objects PRELOADED is set to a non-zero
- value to allow additional security checks. */
+ If the object is already opened, returns its existing map. */
extern struct link_map *_dl_map_object (struct link_map *loader,
- const char *name, int preloaded,
+ const char *name,
int type, int trace_mode, int mode,
Lmid_t nsid)
internal_function attribute_hidden;
--
1.7.2

View file

@ -0,0 +1,11 @@
--- 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

View file

@ -0,0 +1,13 @@
diff -Naur glibc-old//sysdeps/i386/Makefile glibc//sysdeps/i386/Makefile
--- glibc-old//sysdeps/i386/Makefile 2010-03-18 11:52:30.000000000 +1000
+++ glibc//sysdeps/i386/Makefile 2010-04-16 15:05:50.000000000 +1000
@@ -1,6 +1,7 @@
# The mpn functions need a #define for asm syntax flavor.
-# Every i386 port in use uses gas syntax (I think).
-asm-CPPFLAGS += -DGAS_SYNTAX
+# Every i386 port in use uses gas syntax (I think). Don't replace
+# __i686 in __i686.get_pc_thunk.bx.
+asm-CPPFLAGS += -DGAS_SYNTAX -U __i686
# The i386 `long double' is a distinct type we support.
long-double-fcts = yes

View file

@ -1,5 +1,21 @@
infodir=/usr/share/info
filelist=(libc.info libc.info-1 libc.info-2 libc.info-3 libc.info-4 libc.info-5 libc.info-6 libc.info-7
libc.info-8 libc.info-9 libc.info-10 libc.info-11)
post_upgrade() {
ldconfig -r .
init u
locale-gen
sbin/ldconfig -r .
[ -x sbin/init ] && sbin/init u
usr/sbin/locale-gen
[ -x usr/bin/install-info ] || return 0
for file in ${filelist[@]}; do
usr/bin/install-info $infodir/$file.gz $infodir/dir 2> /dev/null
done
}
pre_remove() {
[ -x usr/bin/install-info ] || return 0
for file in ${filelist[@]}; do
usr/bin/install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
done
}

0
core/glibc/locale-gen Normal file → Executable file
View file

View file

@ -10,8 +10,8 @@
# and <charset> is one of the character sets listed in /usr/share/i18n/charmaps
#
# Examples:
en_US ISO-8859-1
en_US.UTF-8 UTF-8
# en_US ISO-8859-1
# en_US.UTF-8 UTF-8
# de_DE ISO-8859-1
# de_DE@euro ISO-8859-15
#

0
core/glibc/nscd Normal file → Executable file
View file

27
core/ppl/PKGBUILD Normal file
View file

@ -0,0 +1,27 @@
# $Id: PKGBUILD 87232 2010-08-11 12:07:18Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: ezzetabi <ezzetabi at gawab dot com>
pkgname=ppl
pkgver=0.11
pkgrel=1
pkgdesc="A modern library for convex polyhedra and other numerical abstractions."
arch=('i686' 'x86_64')
url="http://www.cs.unipr.it/ppl"
license=('GPL3')
depends=('gmp>=5.0')
options=('!docs' '!libtool')
#source=(http://www.cs.unipr.it/ppl/Download/ftp/releases/$pkgver/ppl-$pkgver.tar.gz)
#md5sums=('ba527ec0ffc830ce16fad8a4195a337e')
build() {
cd $srcdir/ppl-$pkgver
#./configure --prefix=/usr --enable-interfaces="c,cxx"
make
# make check
}
package() {
cd $srcdir/ppl-$pkgver
make DESTDIR=$pkgdir install
}

27
core/ppl/PKGBUILD.orig Normal file
View file

@ -0,0 +1,27 @@
# $Id: PKGBUILD 87232 2010-08-11 12:07:18Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: ezzetabi <ezzetabi at gawab dot com>
pkgname=ppl
pkgver=0.11
pkgrel=1
pkgdesc="A modern library for convex polyhedra and other numerical abstractions."
arch=('i686' 'x86_64')
url="http://www.cs.unipr.it/ppl"
license=('GPL3')
depends=('gmp>=5.0')
options=('!docs' '!libtool')
source=(http://www.cs.unipr.it/ppl/Download/ftp/releases/$pkgver/ppl-$pkgver.tar.gz)
md5sums=('ba527ec0ffc830ce16fad8a4195a337e')
build() {
cd $srcdir/ppl-$pkgver
./configure --prefix=/usr --enable-interfaces="c,cxx"
make
make check
}
package() {
cd $srcdir/ppl-$pkgver
make DESTDIR=$pkgdir install
}