summaryrefslogtreecommitdiff
path: root/core/gcc/PKGBUILD
blob: ac9bfb99e960ef0107323084090f4606f7b25c64 (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
makedepends=(
  $(
    printf '%s\n' "${makedepends[@]}" | \
      grep -v '^lib32-glibc\($\|[<>=]\)'
  )
)
pkgname=(
  $(
    printf '%s\n' "${pkgname[@]}" | \
      grep -vFx 'lib32-gcc-libs'
  )
)
# unset 'package_lib32-gcc-libs'
eval "$(
  declare -f prepare | \
    sed '
      \,/s/lib64/lib/, d
    '
  declare -f build | \
    sed '
      s/--enable-multilib/--disable-multilib/
    '
  declare -f package_gcc-libs | \
    sed '
      s/\$pkgname-multilib//
      s@libsanitizer/{a,l,ub,t}san@libsanitizer/{a,l,ub}san@
      \@/usr/lib32/@ d
    '
  declare -f package_gcc | \
    sed '
      s/"lib32-gcc-libs[^"]*"//g
      s/$pkgname-multilib//
      \,make -C $CHOST/32/,d
      s/{,32}//
      \, rm .*/lib32/,d
    '
)"
eval "$(
  for name in "${pkgname[@]}"; do
    declare -f package_${name} | \
      sed '
        s/$pkgname-multilib//
      '
  done
)"