aboutsummaryrefslogtreecommitdiffstats
path: root/gcc/PKGBUILD-GCC
blob: cf4904c0e4381d59d81fe43a07d59ee27226a879 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#Maintainer: Zee Eichel  <zee@dracos-linux.org>

pkgname=gcc
pkgver=8.2.0
pkgrel=1
pkgdesc="The GNU Compiler Collection."
arch=(x86_64)
url="http://gcc.gnu.org"
license=('GPL')
depends=('gc')
provides=("${pkgname}")
conflicts=("${pkgname}")
source=("https://ftp.gnu.org/gnu/gcc/gcc-8.2.0/gcc-8.2.0.tar.xz")
sha256sums=('196c3c04ba2613f893283977e6011b2345d1cd1af9abeac58e916b1aab3e0080')

prepare() {
cd "$pkgname-$pkgver"

case $(uname -m) in
x86_64)
  sed -e '/m64=/s/lib64/lib/' \
      -i.orig gcc/config/i386/t-linux64
;;
esac

}

build() {
  cd "$pkgname-$pkgver"

mkdir build                                          &&
cd    build                                          &&

../configure                                         \
    --prefix=/usr                                    \
    --disable-multilib                               \
    --disable-libmpx                                 \
    --with-system-zlib                               \
    --enable-__cxa_atexit                            \
    --enable-cet=auto                                \
    --enable-checking=release                        \
    --enable-clocale=gnu                             \
    --enable-default-pie                             \
    --enable-default-ssp                             \
    --enable-gnu-unique-object                       \
    --enable-install-libiberty                       \
    --enable-linker-build-id                         \
    --enable-objc-gc                                 \
    --enable-plugin                                  \
    --enable-shared                                  \
    --enable-threads=posix                           \
    --with-linker-hash-style=gnu                     \
    --disable-libmpx                                 \
    --with-pkgversion="dracOs ${pkgver/+/ }"         \
    --enable-languages=c,c++,fortran,go,objc,obj-c++ &&
make -j11
}

package() {

cd "$pkgname-$pkgver"
cd build

make -j1 -k install DESTDIR="$pkgdir/"

mkdir -pv $pkgdir/usr/share/gdb/auto-load/usr/lib              &&
mv -v $pkgdir/usr/lib/*gdb.py $pkgdir/usr/share/gdb/auto-load/usr/lib &&

    chown -v -R root:root \
    $pkgdir/usr/lib/gcc/*linux-gnu/8.2.0/include{,-fixed}
    install -dm 755 $pkgdir/lib
    ln -v -sf ../usr/bin/cpp $pkgdir/lib          &&
    ln -v -sf gcc $pkgdir/usr/bin/cc              &&
    install -v -dm755 $pkgdir/usr/lib/bfd-plugins &&
    ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/8.2.0/liblto_plugin.so $pkgdir/usr/lib/bfd-plugins/
}