summaryrefslogtreecommitdiffstats
path: root/graphics-libs/mesa/BUILD
blob: 4206e6ca90b6a66e380811b71a71dd5781e10e32 (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
# XXX The use of the initial-exec TLS model requires non-standard arrangements
#     by the loader, only implemented by glibc, and causes dlopen of libGL to
#     fail under several circumstances.  By using the gnu2 TLS dialect, the
#     global-dynamic model becomes as efficient as initial-exec in most
#     circumstances, and works with reduced performance where initial-exec
#     prevents loading altogether.  This is accompanied by a patch removing the
#     use of initial-exec and the related asm stubs.
CFLAGS+=" -mtls-dialect=gnu2" &&
case "$HOST" in
*-gnu) ;;
*)
  local unportable=(intel intel-ui)
  message "${PROBLEM_COLOR}WARNING:$DEFAULT_COLOR" \
    "Disabling non-portable tools: ${unportable[*]}"
  MESA_TOOLS=" ${MESA_TOOLS} "
  for i in "${unportable[@]}"; do
    MESA_TOOLS="${MESA_TOOLS// $i / }"
  done
  MESA_TOOLS="${MESA_TOOLS# }"
  MESA_TOOLS="${MESA_TOOLS% }"
  ;;
esac &&

if is_depends_enabled "${SPELL}" libva &&
 ! list_find "${MESA_VA_CODECS}" "none"; then
  OPTS+=" video-codecs=${MESA_VA_CODECS// /,}"
fi &&

local vulkan=${MESA_VULKAN//none} &&
local gallium=${MESA_GALLIUM//none} &&
local dri=${MESA_DRI//none} &&

OPTS+=" gallium-drivers=${gallium// /,} \
     vulkan-drivers=${vulkan// /,} \
          platforms=${MESA_EGL// /,} \
                glx=${MESA_GLX// /,} \
              tools=${MESA_TOOLS// /,} \
     $MESA_GLES1 $MESA_GLES2" &&

default_build