summaryrefslogtreecommitdiff
path: root/core/glibc/PKGBUILD
blob: d8798b497b62f0b724d4ef660bf7919ab7ee1140 (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
61
62
63
64
65
66
# remove lib32-* stuff

pkgname=(${pkgname[@]/lib32-*/})
unset -f 'package_lib32-glibc'

eval "$(
  declare -f build | \
    sed '
      2 a export CFLAGS="$CFLAGS -mno-tls-direct-seg-refs"
      s,https://bugs.archlinux.org/,https://bugs.archlinux32.org/,
      \,cd .*/lib32-glibc-build,{
        s/.*/}/
        q
      }
      s@--enable-multi-arch@--disable-multi-arch@
    '
  declare -f package_glibc | \
    sed '
      s,usr/lib/libmvec-\*\.so,,
      s/\S*,mvec\S*//
      s,STRIP_BINARIES ,\0usr/bin/lddlibc4 ,
      s,STRIP_STATIC ,\0usr/lib/libm.a ,
    '
)"

# 486-specific

# no gd for memory profiles
makedepends=(${makedepends[@]//gd/})
makedepends_i686+=('gd')

if [ "${CARCH}" = "i486" ]; then

  # disable testing for now, we run out of memory
  eval "$(
    declare -f check | \
      sed '
        /make check/d
      '
  )"

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

fi

# pentium4 specific

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

# make Java segfaults go away
if [ "${CARCH}" = "pentium4" ]; then
  eval "$(
    declare -f build | \
      sed '
	/.*glibc.*configure.*/ i \
	  CFLAGS=\"${CFLAGS} -mfpmath=sse -msse2 -mstackrealign\" \
	  CXXFLAGS=\"${CXXFLAGS} -mfpmath=sse -msse2 -mstackrealign\"
      '
  )"
fi