Re: xsrc/50386 (xterm on m68k broken due to libX11)
Rin Okuyama <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.m68k |
|---|---|
| Message-ID | <[email protected]> |
The cause of the problem is that libX11 poisons namespace of libc, by shading the original stubs for thread operations by broken ones with inappropriate prototype. You can find more details in an outstanding analysis given by mlelstv@: http://mail-index.netbsd.org/port-m68k/2015/11/09/msg000647.html The broken stubs are provided in xsrc/external/mit/libX11/dist/src/UIThrStubs.c. As we already have our own stubs in libc below src/lib/libc/thread-stub, I think we no longer need them in libX11. Looking into autoconf stuffs of libX11, UIThrStubs.c is intended to be compiled if stub for pthread_self(3) is missing in libc. Actually, we don't have it in libc; UIThrStubs.c provides stubs for more thread operations than our libc does. However, if we need them, they should be provided by libc, not libX11. The attached patch below simply removes UIThrStubs.c from libX11. xterm gets sanity with this patch on x68k. I also checked X server and few X clients work fine with this patch on x68k, evbearmv7hfeb, and amd64. However, I've not confirmed whether most other 3rd-party applications work or not. --- src/external/mit/xorg/lib/libX11/Makefile.libx11.orig 2015-11-09 19:43:39.000000000 +0900 +++ src/external/mit/xorg/lib/libX11/Makefile.libx11 2015-11-09 19:47:04.000000000 +0900 @@ -265,8 +265,8 @@ XlibInt.c \ Xrm.c -SRCS+= \ - UIThrStubs.c +#SRCS+= \ +# UIThrStubs.c SRCS+= \ AddDIC.c \