An added advantage to this is that it makes it really easy to build with
Python 3, the same way other Autotools projects support it:
$ export PYTHON=/usr/bin/python3
$ ./configure
Remove FindProcIndex, __eglSetDispatchIndex, and
__eglDispatchFindDispatchFunction from egldispatchstubs.c.
The dispatch indices are allocated and assigned during initialization, so none
of those functions are ever called.
Don't point nonst_HEADERS or EXTRA_DIST at entire directories. That causes
"make dist" to include files that it shouldn't, such as configured makefiles
and .pyc files.
Also added a few generated header files to noinst_HEADERS.
The -export-symbols option in libtool creates a version script on Linux, but
on FreeBSD it instead uses the -retain-symbols-file option, which doesn't do
anything with the dynamic symbol table.
Instead, manually pass the --version-script option to the linker.
Various fixes so that libglvnd can build and run on FreeBSD.
The only change to C code is to deal with a difference in the parameters for
mincore(2).
Most of the rest is to to remove the dependency on GNU make and bash.
The third parameter to mincore(2) can be a pointer to char or unsigned char,
depending on what system it's building on. To build in either case, just cast
that argument to a (void *).
Add an AC_CHECK_FUNC call to check whether dlopen is available without any
additional libraries. Some systems provide dlopen as part of libc, in which
case we can't (and don't need to) link against libdl.so.
Generating a symbol list for the entrypoint libraries used to be necessary when
we generated the same set of dispatch stubs in each library.
Since then, we only generate the stubs that each library is going to export, so
we don't need a separate export list anymore.
Don't generate g_glapi_mapi_gl_tmp.h in the libGL makefile. That's not needed
anymore, because all of the GLDispatch stuff is built separately under
src/GLdispatch/vnd-glapi.
Likewise, remove the STATIC_DISPATCH_ONLY define from the compiler flags.
When dlsym is handed an address in a shared object that doesn't match a symbol
in that shared object (such as a C++ vtable) it returns success but sets
dli_sname to null.
Handle this case rather than crashing.
Older versions of glxproto.h contained a typo where "Attribs" was misspelled.
The typo was fixed in the xorgproto version of glxproto.h, breaking the API.
Fixes#149.
If libglvnd is installed onto a system that already has non-libglvnd versions
of any of the OpenGL libraries installed, then ldconfig can get confused about
which files to create symlinks to. At worst, you could end up with a mix of the
libglvnd libraries and leftover non-libglvnd libraries.
To avoid that, bump the version numbers in these filenames:
- libGL.so.1.0.0 -> libGL.so.1.7.0
- libGLESv1_CM.so.1.0.0 -> libGLESv1_CM.so.1.2.0
- libGLESv2.so.2.0.0 -> libGLESv2.so.2.1.0
- libEGL.so.1.0.0 -> libEGL.so.1.1.0
Fixes https://github.com/NVIDIA/libglvnd/issues/147
In u_execmem.c, use entry_stub_size and MAPI_TABLE_NUM_DYNAMIC to determine how
much executable memory to allocate, instead of just hard-coding 256KB.
The stubs on some architectures are larger than 64 bytes, so 256KB isn't always
going to be large enough, and it's wasteful on architectures with stubs that
are smaller than 64 bytes.
Remove the #ifdefs and the Win32 and malloc-based code from u_execmem.c. It's
not needed or used anymore, and even if it was, the allocation code is in
src/utils/utils_misc.c now.
In testglxmakecurrent, remove the paths to test using glXCreateNewContext and
glXCreateContextAttribsARB.
The testglxcreatecontext test now tests the various context creation functions,
so we don't need to shoehorn them into testglxmakecurrent.
Add a new test, testglxcreatecontext to test the various functions for creating
GLX contexts.
It tests the core GLX functions, the GLX_ARB_create_context and
GLX_EXT_no_config_context extensions, and using a vendor-provided extension
function.
The new test is much simpler than trying to use testglxmakecurrent to test both
context creation and MakeCurrent, especially for trying to test multiple
context creation functions.
Added a glXCreateContextVendorDUMMY extension function to GLX_dummy to test
using a vendor-provided extension function to create a context. We can't use
glXCreateContextAttribsARB for that now, because it has a dispatch stub in
libGLX itself.
glXCreateContextVendorDUMMY takes the same arguments as
glXCreateContextAttribsARB, so it can also serve as an example for implementing
a dispatch stub for glXCreateContextAttribsARB in a real vendor library.
Added a dispatch handler for glXCreateContextAttribsARB. It'll look for a
GLX_SCREEN attribute first if the caller provides one, and then the GLXFBConfig
handle if the caller doesn't.
These aren't used by the build system, so there's no reason to include them in
the repository.
Leave the LICENSE file, to indicate the license as it appeared in the snapshot
from https://github.com/DaveGamble/cJSON/
This option is not recognized by clang, so it produces an error when configured
with
CC=clang ./configure
error: unknown warning option '-Wno-misleading-indentation'; did you mean '-Wno-missing-declarations'? [-Werror,-Wunknown-warning-option]
This flag is only needed for cJSON.c. Deobfuscate that file just enough to
eliminate the misleading indentation warnings, then remove the warning flag from
Makefile.am.
This produces a warning when built with clang:
../../home/aaron/git/libglvnd/src/util/glvnd_genentry.c:46:26: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
#if defined(__GNUC__) && USE_ASM
^
../../home/aaron/git/libglvnd/src/util/glvnd_genentry.c:40:18: note: expanded from macro 'USE_ASM'
#define USE_ASM (defined(USE_X86_ASM) || \
Instead, use the defined(...) conditions to conditionally define USE_ASM to 1 or
0 explicitly.