Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/community/gcc8/PKGBUILD
blob: b4093ee926c40f1b047e7840b1612af48e3d8bf3 (plain)
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
eval "$(
  declare -f prepare | \
    sed '
      \,/s/lib64/lib/, d
    '
  declare -f build | \
    sed '
      /configure/ s,--with-bugurl=https://bugs\.archlinux\.org/,--with-bugurl=https://bugs.archlinux32.org/,
      /configure/ s/;$/ --build=$CHOST;/
    '
  declare -f package_gcc8-libs | \
    sed '
      s@libsanitizer/{a,l,ub,t}san@libsanitizer/{a,l,ub}san@
    '
  declare -f package_gcc8 | \
    sed '
      s@make.*tsan.*install@#\0@
    '
)"

# i486-specific

# disable doxygen documentation
makedepends=(${makedepends[@]//doxygen/})
makedepends_i686+=('doxygen')

if [ "${CARCH}" = "i486" ]; then
  eval "$(
    declare -f build | \
      sed '
        /make.*doc-man-doxygen/d
      '
  )"
fi

if [ "${CARCH}" = "i486" ]; then
  # building toolchain (gcc): again, lobtool problems
  # /usr/lib/gcc/i486-pc-linux-gnu/7.3.0/ld: cannot find -lquadmath
  # collect2: error: ld returned 1 exit status
  # libtool: install: error: relink `libgfortran.la' with the above command before installing it
  # make: Leaving directory '/build/gcc/src/gcc-build/i486-pc-linux-gnu/libgfortran'
  # => wrong link order: libgfortran requires libquadmath
  eval "$(
    declare -f package_gcc8-libs | \
      sed '
        /for lib in / s/libgfortran/libquadmath libgfortran/
      '
  )"

  # disable CET (Control Flow instructions endbr32/enbr64)
  eval "$(
    declare -f build | \
      sed '
        s/--enable-cet=auto/--disable-cet/
      '
  )"

fi

makedepends_pentium4=("${makedepends_i686[@]}")