Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Maintainer: Roman Lapin <lampus.lapin@@gmail.com>
- pkgname='or32-elf-gcc-base-git'
- pkgver=20120209
- pkgrel=2
- pkgdesc="The GNU Compiler Collection for OpenRISC target"
- arch=('i686' 'x86_64')
- license=('GPL' 'LGPL')
- url="http://openrisc.southpole.se/cgit.cgi/jonas/gcc/"
- depends=('or32-elf-binutils' 'libmpc' 'libelf')
- makedepends=('git')
- conflicts=('or32-elf-gcc-base')
- provides=('or32-elf-gcc-base')
- options=(!libtool !emptydirs zipman docs !strip)
- _gitroot=git://openrisc.net/jonas/gcc
- _gitname=gcc
- source=()
- md5sums=()
- build() {
- cd $srcdir
- msg "Connecting to git server...."
- if [ -d $srcdir/$_git haveitname ] ; then
- cd $_gitname && git pull origin
- msg "The local files are updated."
- else
- git clone $_gitroot
- fi
- msg "GIT checkout done or server timeout"
- cd ${srcdir}/${_gitname}
- export CFLAGS="-O2 -pipe"
- export CXXFLAGS="-O2 -pipe"
- [ $NOEXTRACT -eq 1 ] || rm -rf build
- git checkout or1k-4.5.1
- mkdir -p build
- cd build
- [ $NOEXTRACT -eq 1 ] || ../configure --prefix=/usr \
- --target=or32-elf \
- --host=$CHOST \
- --build=$CHOST \
- --disable-shared \
- --disable-nls \
- --enable-languages=c,c++ \
- --disable-multilib \
- --with-local-prefix=/usr/lib/or32-elf \
- --with-as=/usr/bin/or32-elf-as \
- --with-ld=/usr/bin/or32-elf-ld \
- --disable-libssp \
- --with-newlib \
- --with-sysroot=/usr/$CHOST/or32-elf
- make all-gcc all-target-libgcc all-target-libstdc++-v3 all-target-newlib all-target-libgloss
- }
- package() {
- cd ${srcdir}/${_gitname}/build
- export CFLAGS="-O2 -pipe"
- export CXXFLAGS="-O2 -pipe"
- make DESTDIR=$pkgdir install-gcc install-target-libgcc install-target-libstdc++-v3 \
- install-target-newlib install-target-libgloss
- rm -f $pkgdir/usr/share/man/man7/fsf-funding.7*
- rm -f $pkgdir/usr/share/man/man7/gfdl.7*
- rm -f $pkgdir/usr/share/man/man7/gpl.7*
- rm -rf $pkgdir/usr/share/info
- cp -r $pkgdir/usr/libexec/* $pkgdir/usr/lib/
- rm -rf $pkgdir/usr/libexec
- # strip it manually
- strip $pkgdir/usr/bin/* 2>/dev/null || true
- find $pkgdir/usr/lib -type f -exec or32-elf-strip {} \; 2>/dev/null || true
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement