Guest User

PKGBUILD gcc 4.4.7 with GCC5 compiler fix

a guest
Mar 2nd, 2016
315
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer: Alexander Rødseth <rodseth@gmail.com>
  2. # Contributor: Vlad-Mihai Sima <vladmihaisima@yahoo.com>
  3. # Contributor: Carson Reynolds <carson@k2.t.u-tokyo.ac.jp>
  4. # Contributor: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
  5. # Contributor: Wolf Ramovsky <wolf.ramovsky@gmail.com>
  6. # Contributor: kristianlm2 <kristanlein@gmail.com>
  7. # Contributor: progtologist <arissynod@gmail.com>
  8. # Contributor: pelluch <pablo.lluch@gmail.com>
  9. # Contributor: Hans-Nikolai Viessmann <hv15@hw.ac.uk>
  10.  
  11. pkgname=gcc44
  12. pkgver=4.4.7
  13. pkgrel=7
  14. pkgdesc='The GNU Compiler Collection (4.4.x)'
  15. arch=('x86_64' 'i686')
  16. url='http://gcc.gnu.org/'
  17. license=('GPL' 'LGPL' 'custom')
  18. depends=('binutils' 'mpfr' 'cloog' 'zlib' 'elfutils')
  19. makedepends=('setconf')
  20. options=('!libtool' '!buildflags' 'staticlibs')
  21. source=("http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2"
  22.         'gcc-hash-style-both.patch'
  23.         'gcc_pure64.patch'
  24.         'siginfo_t_fix.patch'
  25.         'fix_gcc5_compile.patch')
  26. sha256sums=('5ff75116b8f763fa0fb5621af80fc6fb3ea0f1b1a57520874982f03f26cd607f'
  27.             'a600550d3d2b2fb8ee6a547c68c3a08a2af7579290b340c35ee5598c9bb305a5'
  28.             '2d369cf93c6e15c3559c3560bce581e0ae5f1f34dc86bca013ac67ef1c1a9ff9'
  29.             '4df866dcfd528835393d2b6897651158faf6d84852158fbf2e4ffc113ec7d201'
  30.             '7b96a7d53750edf51dfa897e1ed972d0c905b570dd57411b432e402a919884f8')
  31.  
  32. prepare() {
  33.   cd "gcc-$pkgver"
  34.  
  35.   # Do not install libiberty
  36.   sed -i -e 's:install_to_$(INSTALL_DEST) ::' libiberty/Makefile.in
  37.   # Do not run fixincludes
  38.   sed -i -e 's:\./fixinc\.sh:-c true:' gcc/Makefile.in
  39.  
  40.   patch -Np0 -i "$srcdir/gcc-hash-style-both.patch"
  41.   patch -Np1 -i "$srcdir/siginfo_t_fix.patch"
  42.   patch -Np2 -i "$srcdir/fix_gcc5_compile.patch"
  43.   if [[ "$CARCH" == "x86_64" ]]; then
  44.     patch -Np1 -i "$srcdir/gcc_pure64.patch"
  45.   fi
  46.   echo "$pkgver" > gcc/BASE-VER
  47.  
  48.   setconf gcc/configure BUILD_INFO ''
  49. }
  50.  
  51. build() {
  52.   cd "gcc-$pkgver"
  53.  
  54.   rm -rf build
  55.   mkdir build
  56.   cd build
  57.  
  58.   ../configure \
  59.     --prefix=/usr \
  60.     --mandir=/usr/share/man \
  61.     --infodir=/usr/share/info \
  62.     --libdir=/usr/lib \
  63.     --libexecdir=/usr/lib \
  64.     --program-suffix=-4.4 \
  65.     --enable-shared \
  66.     --enable-languages=c,c++,fortran,objc,obj-c++ \
  67.     --enable-__cxa_atexit \
  68.     --disable-libstdcxx-pch \
  69.     --disable-multilib \
  70.     --enable-libgomp \
  71.     --disable-libmudflap \
  72.     --disable-libssp \
  73.     --enable-clocale=gnu \
  74.     --with-tune=generic \
  75.     --with-cloog \
  76.     --with-ppl \
  77.     --with-system-zlib
  78.   make
  79. }
  80.  
  81. package() {
  82.   cd "gcc-$pkgver/build"
  83.  
  84.   make DESTDIR="$pkgdir" install
  85.   rm -rf "$pkgdir/usr/share/man/man7"
  86.   rm -rf "$pkgdir/usr/share/locale"
  87.   mv "$pkgdir"/usr/lib/lib* \
  88.      "$pkgdir/usr/lib/gcc/$CHOST/$pkgver/"
  89.   # Install Runtime Library Exception
  90.   install -Dm644 ../COPYING.RUNTIME \
  91.     "$pkgdir/usr/share/licenses/$pkgname/RUNTIME.LIBRARY.EXCEPTION" \
  92.   # Create links for gcc-4.4 build environment (useful for CUDA)
  93.   mkdir -p "$pkgdir/opt/gcc-4.4"
  94.   ln -s /usr/bin/gcc-4.4 "$pkgdir/opt/gcc-4.4/gcc"
  95.   ln -s /usr/bin/g++-4.4 "$pkgdir/opt/gcc-4.4/g++"
  96.   # Avoid file conflicts when enabling libgomp
  97.   rm -rf "$pkgdir/usr/share/info"
  98. }
  99.  
  100. # vim:set ts=2 sw=2 et:
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×