Commit Graph

116 Commits

Author SHA1 Message Date
yes,i Do 05f75de586 Add support for loongarch64. 2022-09-20 14:05:14 +00:00
Kyle Brenneman c7cdf0cc43 Increment the version number to 1.5.0.
Increment the minor version, since we added some features that other
things might depend on.
2022-08-22 07:02:53 -06:00
Kyle Brenneman 8f3c5b17a2 Increment version number to 1.4.0.
Increment the minor version this time, since we've extended the EGL
vendor library interface.
2021-12-17 08:49:38 -07:00
Kyle Brenneman fa9ef3971f Replace USE_X11 macro with ENABLE_EGL_X11.
If x11 support is enabled, then the meson and configure scripts will set
a macro named ENABLE_EGL_X11 instead of USE_X11.

USE_X11 will also select the Xlib typedef of EGLNativeDisplayType in
eglplatform.h, and libglvnd does not need or want those.

Enabling or disabling X11 support for EGL only affects platform
detection in eglGetDisplay. The rest of libEGL is supposed to treat
EGLNativeDisplayType as an opaque void* pointer.
2021-10-27 12:27:47 -06:00
Alex Xu (Hello71) 280843d7f7 Auto-enable TLSDESC support
TLSDESC speeds up access to global-dynamic TLS. TLS asm stubs do not
support TLSDESC, but all accesses are to initial-exec symbols anyways,
so it is not necessary to handle that separately.
2021-09-13 17:24:13 -04:00
Alex Xu (Hello71) e87d51f006 Use initial-exec TLS for glibc and FreeBSD only
It is not portable to use initial-exec TLS in dlopened libraries. glibc
and FreeBSD allocate extra memory for extra initial-exec variables
specifically for libGL, but other libcs including musl do not.

Since TLS entry asm assumes IE TLS, use TSD asm in other cases. Update
autoconf to match meson logic: enable ELF TLS if it is supported,
regardless of which type of asm is being used.
2021-09-13 17:24:13 -04:00
Matt Turner dc084876b4 Bump the version number to 1.3.4. 2021-08-24 12:53:07 -07:00
Matt Turner 0f0d49f0f3 Bump the version number to 1.3.3. 2021-04-30 15:09:52 -04:00
Kyle Brenneman c1c60ac80a GLdispatch: Add a build option to disable entrypoint patching.
Added a --disable-entrypoint-tracking configure option and an
'entrypoint-patching' meson option to disable libGLdispatch's entrypoint
patching at build time.

If entrypoint patching is disabled, then it #ifdef's out the mprotect call, and
acts as if mprotect had failed, which causes libGLdispatch to skip trying to
perform any patching.

Fixes https://gitlab.freedesktop.org/glvnd/libglvnd/-/issues/217
2021-04-21 16:22:39 -06:00
Kyle Brenneman 8af272f7c4 configure: Consolodate some duplicate code.
Combine the x86/x86-64 and stub type selection branches, since the same code
works for either of them.
2020-08-06 11:58:26 -06:00
Kyle Brenneman 3a03fdaed7 configure: Remove an unused $gldispatch_use_tls check
In configure.ac, there's a block that should have been moved to later in the
file, but got copied instead. Remove the leftover duplicate.
2020-08-06 11:58:26 -06:00
Matt Turner da0edd9728 Bump the version number to 1.3.2. 2020-06-25 15:17:25 -07:00
Matt Turner 55a9dd3160 Remove -Werror from default CFLAGS
The set of warnings emitted are dependent on compiler version,
optimization level, CPU architecture, dependency versions, etc. It's not
tractable for a code base to be warning free under all circumstances,
and it's widely agreed that -Werror should not be enabled by default.

Given that it's trivial for developers to enable -Werror for autotools
by settings CFLAGS=-Werror and for meson with -Dwerror=true we should
not enable -Werror by default and require builders to disable it.

See https://devmanual.gentoo.org/ebuild-writing/common-mistakes/index.html#-werror-compiler-flag-not-removed

Reviewed-by: Eric Anholt <eric@anholt.net>
2020-06-25 11:59:51 -07:00
Matt Turner 2a1dd5e494 autotools: Add a --enable-werror option 2020-06-25 11:58:58 -07:00
Matt Turner 1c32de0707 Bump the version number to 1.3.1. 2020-02-21 13:28:47 -08:00
q66 c31a7c06eb vnd-glapi: allow asm to be used on ELFv2 ppc64 big endian
These entry points are actually not little endian specific,
but they are specific to ELFv2 ABI. ELFv2 ABI can be used
on either little or big endian, and there are distributions
doing so (e.g. Void Linux, Adélie Linux) as well as other
OSes transitioning (FreeBSD).

These have been confirmed to work on a Power Mac G5 running
Void Linux.
2019-12-09 18:49:41 +01:00
Matt Turner 05e762ba74 Bump the version number to 1.3.0. 2019-12-05 16:44:43 -05:00
Matt Turner 0f39337dad Drop unnecessary assembly macros
These were presumably copied from Mesa where they enable assembly code
that is not part of the dispatch layer. They are unused in libglvnd.
2019-12-05 16:16:00 -05:00
Dylan Baker 3a7aed009c tests: Add symbol check tests
These use the symbol-check.py script from mesa, and should help to
ensure that glvnd doesn't start exposing/hiding new symbols. It's also
useful to double check that meson and autotools are doing the same
thing.
2019-12-04 10:02:00 -08:00
Kyle Brenneman 9ba775ea21 configure: Define EGL_NO_X11 unconditionally.
Change the configure script to define the EGL_NO_X11 macro unconditionally, so
that the EGL headers don't try to include the Xlib headers.

Regardless of whether --disable-x11 is used, libglvnd doesn't need X11-specific
typedefs for EGLNativeDisplayType et. al.
2019-11-22 16:39:46 -07:00
Kyle Brenneman fc2ab74c84 Add a USE_DISPATCH_ASM macro to config.h.
Define a new USE_DISPATCH_ASM macro in config.h if assembly dispatch stubs are
enabled. Update the GLX entrypoint generation to use that macro instead of
checking all of the USE_*_ASM macros.

This is less likely to break if we add assembly support for another
architecture. In addition, it'll make it easier to skip any unit tests
that depend on being able to generate new dispatch stubs.
2019-11-14 08:34:46 -07:00
Laurent Carlier 3a1fb32c3b Add a configure option to disable glesv1 or glesv2
Because mesa can be built without glesv1 so it breaks autodetection.

Fixes: https://bugs.archlinux.org/task/64032 ('mesa-demos doesn't build, unable to find GLES/gl.h')
2019-10-08 16:34:16 +00:00
Kyle Brenneman 062a42ea55 Bump the version number to 1.2.0. 2019-09-25 09:48:46 -06:00
Kyle Brenneman 8dc483cafe
Merge pull request #185 from kbrenneman/recognize-arm8vl
configure: Recognize the host_cpu value "armv8l"
2019-09-25 09:39:28 -06:00
Kyle Brenneman 8c4b386d5e configure: Allow specifying the page size.
The configure script now checks the environment variable GLDISPATCH_PAGE_SIZE.
If it's set, then it overrides the GLDISPATCH_PAGE_SIZE macro used in
libGLdispatch to align the assembly dispatch stubs.

This is mainly useful on ppc64le and aarch64 builds, where the page size can
vary.
2019-09-17 16:16:17 -06:00
Kyle Brenneman c6e6b831d6 configure: Recognize the host_cpu value "armv8l".
If $host_cpu is "armv8l", then that means the 32-bit compatibility mode on an
aarch64 system. Treat that the same as armv7.
2019-09-12 14:11:59 -06:00
Kyle Brenneman a5a74957d8 Make X11 support optional.
Add a new configure option, --disable-x11. That option will disable GLX, and
will #ifdef out the X11 platform detection in EGL, but also remove the
dependency on the X11 libraries and headers.

In addition, only check for the xext and glproto packages if GLX is enabled,
since that's the only component that needs them.
2019-09-12 10:02:37 -06:00
Kyle Brenneman 6b8d76bf4e Add a configure option for whether to install the GL headers.
Add a --disable-headers option, which tells it not to install the
GL/GLES/GLX/EGL header files.
2019-09-04 14:15:00 -06:00
Kyle Brenneman 0dfaea2bcb Add pkg-config files for EGL, GL, GLES, and GLX.
This preserves the names from Mesa's gl, glesv1_cm, glesv2, and egl pkgconfig
data, and for compatibility with that, gl.pc gives you libGL.

Also added glx.pc and opengl.pc for libglvnd's libGLX and libOpenGL libraries.
If newer applications want to explicitly depend on libGLX and the appropriate
rendering API they can ask for the new pkgconfig names.

Note that the version numbers in each file are the API versions that each
library exposes, not the libglvnd package version.
2019-09-03 09:22:52 -06:00
Kyle Brenneman 58c8c4a402 Check if dirent.d_type is available in the configure script.
Add a check in the configure script to check if the dirent struct has a d_type
member, since that's not available on all systems.
2019-04-26 11:10:14 -06:00
Kyle Brenneman bc9990b7be Bump the version number to 1.1.1. 2019-03-13 08:58:44 -06:00
Kyle Brenneman 55fad54ac7 Make Python optional when building from the make dist tarball.
When you run "make dist", the resulting tarball includes all of the generated
files. When building from that, we don't need to generate anything.
2018-08-17 07:17:56 -06:00
Mathieu Bridon 90f973f74d build: Find Python the Autotools way
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
2018-08-16 13:57:27 +02:00
Kyle Brenneman 59dbb141a6 Bump the version number to 1.1.0. 2018-07-24 11:35:26 -06:00
Kyle Brenneman c413eae4f9 configure: Recognize both "x86_64" and "amd64" for host_cpu.
On FreeBSD, $host_cpu is set to "amd64" instead of "x86_64", so update the
configure script to recognize either string.
2018-03-26 14:41:03 -06:00
Kyle Brenneman 0177ade402 configure: Check if linking against libdl is necessary.
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.
2018-03-26 14:41:01 -06:00
Kyle Brenneman 005fd3a0c4 Set package version to 1.0.0.
Now that both the EGL and GLX interfaces are defined and stable, set the
package version to 1.0.0.
2017-11-02 10:58:38 -06:00
Kyle Brenneman 7751d668e5 configure: Remove AC_PROG_CXX.
Libglvnd doesn't use C++ anywhere, so it doesn't need the C++ compiler.
2017-06-13 12:02:11 -06:00
Kyle Brenneman e77d29a67c Makefile and structural changes for ppc64le support.
Added the files and makefile changes needed for adding support for ppc64le
dispatch stubs.

The actual assembly code still needs to be written, along with any other
arch-specific requirements for self-modifying code.

The new entry_ppc64le_*.c files are mostly based on the x86-64 files.

It still needs:
- Assembly code for OpenGL dispatch stubs in entry_ppc64le_tls.c,
  entry_ppc64le_tsd.c, or both.
- Assembly code for GLX dispatch stubs in glvnd_genentry.c.
- Assembly code for the entrypoint patching tests in patchentrypoints.c.
2017-04-24 11:49:02 -06:00
Kyle Brenneman 4ba5345742 Merge pull request #113 from nwnk/armv7hl
Fixes for armv7.

Fix build failures for the ARMv7 stubs that show up on some compiler versions.
2017-02-09 10:46:23 -07:00
Kyle Brenneman 7067ba11c5 configure: Change the description for --disable-gles. 2016-12-22 13:03:40 -07:00
Rob Clark 75946d7135 Treat armv7hl as armv7l 2016-12-14 11:06:05 -05:00
Rob Clark b465dc65f6 Print out $host_cpu when undetected, for easier debugging 2016-12-14 10:53:30 -05:00
Kyle Brenneman ca0de36630 Add configure options for the EGL, GLX, and GLES libraries.
Added three new configure options to disable building the EGL, GLX, GLES
libraries.

In the tests makefile, move the list of test scripts to separate unconditional
variables, and add those to EXTRA_DIST. Just conditionally adding variables to
TESTS isn't enough to include the test scripts in the dist package.
2016-12-13 15:45:26 -07:00
Kyle Brenneman f9117614be GLdispatch: Fix the x86 TLS stubs.
Fix the generated code for the x86 TLS dispatch stubs.

Update the x86 TLS stubs to use the same common code as the rest of the x86 and
x86-64 entrypoints.

Fixes https://github.com/NVIDIA/libglvnd/issues/18
2016-12-01 12:18:47 -07:00
Kyle Brenneman 522c601799 Add support for aarch64.
Add assembly code and stub generation for TSD stubs on aarch64.
2016-11-15 08:36:51 -07:00
Kyle Brenneman 6bc8902de8 tests: Rename GLX_dummy directory.
Rename the GLX_dummy directory to just "dummy", since the code in it will be
used for non-GLX tests.
2016-10-17 11:12:21 -06:00
Kyle Brenneman 14f6283166 Increment the package version to 0.2.
Increment the minor version number so that other packages can check if the EGL
interface is available.
2016-09-09 18:00:59 -06:00
Kyle Brenneman 0292f76a1f Merge pull request #92 from kbrenneman/add-libegl
Add an interface for EGL.
2016-09-09 17:06:10 -06:00
Kyle Brenneman ae89ac2619 EGL: Change the vendor config search paths.
Changed the default vendor config paths to be based on the directory options
for configure. libEGL will now look under the sysconfigdir and datadir paths,
in a "glvnd/egl_vendor.d" subdirectory.

Added the "datadir" variable to the pkg-config file, so that other packages can
find the expected location of the JSON files.
2016-08-31 12:01:00 -06:00