xlib: Remove the linkage hack in lib.c by use meson link_whole option

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Ack-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19258>
This commit is contained in:
Yonggang Luo 2022-10-23 23:00:09 +08:00 committed by Marge Bot
parent 1cf6b4f205
commit 882400b1f4
2 changed files with 2 additions and 15 deletions

View file

@ -48,8 +48,9 @@ libgl = shared_library(
gnu_symbol_visibility : 'hidden',
link_args : [ld_args_bsymbolic, ld_args_gc_sections, gallium_xlib_ld_args],
link_depends : gallium_xlib_link_depends,
link_whole : [libxlib, libglapi_static],
link_with : [
libgalliumvl_stub, libxlib, libws_xlib, libglapi_static,
libgalliumvl_stub, libws_xlib,
libgallium, libmesa, gallium_xlib_link_with,
],
dependencies : [dep_x11, dep_thread, dep_clock, dep_unwind, driver_swrast, driver_virgl, driver_asahi],

View file

@ -89,17 +89,3 @@ static void _init( void )
*/
xmesa_set_driver( &xlib_driver );
}
/***********************************************************************
*
* Butt-ugly hack to convince the linker not to throw away public GL
* symbols (they are all referenced from getprocaddress, I guess).
*/
extern void (*linker_foo(const unsigned char *procName))();
extern void (*glXGetProcAddress(const unsigned char *procName))();
extern void (*linker_foo(const unsigned char *procName))()
{
return glXGetProcAddress(procName);
}