summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-09-20 12:37:04 -0700
committerEric Anholt <[email protected]>2013-09-23 12:45:22 -0700
commit11e494a572ce81a57c05fbe4214dd36b1c8ac4cf (patch)
tree25f35087c0d870944982adc57401d67663a7948c /configure.ac
parent10ef949424809d51c627008bb2feab5a067f8e08 (diff)
mesa: Use -Bsymbolic in the linker to locally resolve Mesa-internal symbols.
Normally, LD_PRELOAD will take precedence over your own symbols, which you want for things like malloc() in libc. But we don't have any local symbols we would want overridden (like hash_table_insert(), for example!), so tell the linker to resolve them internally. This also avoids calls through the PLT. Saves almost 100k on libdricore's size, and gets us a bunch of the performance back that we had with non-dricore. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d280e389a62..4c99603ccee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1032,10 +1032,13 @@ if test "x$enable_dri" = xyes; then
# put all the necessary libs together
DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $PTHREAD_LIBS $DLOPEN_LIBS"
GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
+
+ DRI_DRIVER_LDFLAGS="-module -avoid-version -shared -Wl,-Bsymbolic"
fi
AM_CONDITIONAL(NEED_LIBDRICORE, test -n "$DRI_DIRS")
AC_SUBST([EXPAT_INCLUDES])
AC_SUBST([DRI_LIB_DEPS])
+AC_SUBST([DRI_DRIVER_LDFLAGS])
AC_SUBST([GALLIUM_DRI_LIB_DEPS])
case $DRI_DIRS in