Build TurboJPEG/OSS with a version script to prevent any non-global symbols from being accessible (this is to protect against potential namespace conflicts when preloading it into an application via VirtualGL.)
This commit is contained in:
@@ -16,7 +16,14 @@ libjpeg_la_SOURCES = $(HDRS) jcapimin.c jcapistd.c jccoefct.c jccolor.c \
|
||||
jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c \
|
||||
jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c
|
||||
|
||||
libturbojpeg_la_SOURCES = $(libjpeg_la_SOURCES) turbojpegl.c turbojpeg.h
|
||||
libturbojpeg_la_SOURCES = $(libjpeg_la_SOURCES) turbojpegl.c turbojpeg.h \
|
||||
turbojpeg-mapfile
|
||||
|
||||
if VERSION_SCRIPT
|
||||
|
||||
libturbojpeg_la_LDFLAGS += -Wl,--version-script,$(srcdir)/turbojpeg-mapfile
|
||||
|
||||
endif
|
||||
|
||||
if WITH_SIMD
|
||||
|
||||
|
||||
11
configure.ac
11
configure.ac
@@ -26,6 +26,17 @@ AC_PROG_INSTALL
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_LN_S
|
||||
|
||||
AC_MSG_CHECKING([whether the linker supports version scripts])
|
||||
LDVER=`$LD --help < /dev/null 2>/dev/null | grep version-script`
|
||||
if test "$LDVER"; then
|
||||
VERSION_SCRIPT=yes
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
VERSION_SCRIPT=no
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AM_CONDITIONAL(VERSION_SCRIPT, test "x$VERSION_SCRIPT" = "xyes")
|
||||
|
||||
if test "x${GCC}" = "xyes"; then
|
||||
if test "x${SAVED_CFLAGS}" = "x"; then
|
||||
CFLAGS=-O3
|
||||
|
||||
13
turbojpeg-mapfile
Executable file
13
turbojpeg-mapfile
Executable file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
global:
|
||||
tjInitCompress;
|
||||
tjCompress;
|
||||
TJBUFSIZE;
|
||||
tjInitDecompress;
|
||||
tjDecompressHeader;
|
||||
tjDecompress;
|
||||
tjDestroy;
|
||||
tjGetErrorStr;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
Reference in New Issue
Block a user