Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/community/go/PKGBUILD
blob: e11f0cf152d3c859a97c1e86ffa7928e9414f926 (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
eval "$(
  declare -f build | \
    sed '
      /install\( .*\)\? -race /d
    '
  declare -f package_go-pie package | \
    sed '
      s,\(/linux_\)amd64\([_/]\),\1386\2,g
    '
)"

eval "$(
  declare -f build check _package \
    | sed '
      s/\(export GOARCH=\)amd64/\1386 /
    '
)"

# 1.16 dropped non-SSE2 floating point operations, so we must
# use software floating points (see https://github.com/golang/go/issues/40255)
if [ "$CARCH" = 'i686' -o "$CARCH" = 'i486' ]; then
  eval "$(
    declare -f build \
      | sed '
        2 a export GO386='softfloat'
      '
    declare -f check \
      | sed '
        2 a export GO386='softfloat'
      '
  )"
fi

# https://go-review.googlesource.com/c/go/+/257963
source+=('go-x87.patch')
sha256sums+=('8b124eaa7521bd0e3760b514829b1ecce3d3cd169f99c3629ff50b7769303802')
eval "$(
  {
    declare -f prepare || \
    printf 'prepare() { cd "$pkgname" \n}\n'
  } \
  | sed '
    $i patch -Np1 -i ../go-x87.patch
  '
)"