Date: Tue, 29 Jul 2014 21:12:29 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: =?iso-8859-1?Q?Jean-S=E9bastien_P=E9dron?= <jean-sebastien.pedron@dumbbell.fr> Cc: freebsd-x11@freebsd.org, Benjamin Kramer <benny.kra@gmail.com>, Roman Divacky <rdivacky@FreeBSD.org>, =?iso-8859-1?Q?Rafael_Esp=EDndola?= <rafael.espindola@gmail.com> Subject: Re: ATI radeon 3450 with new xorg Message-ID: <AE24FFA8-2782-4255-BB3F-5AC5DC928F78@FreeBSD.org> In-Reply-To: <E83B0FF1-EF39-4CDD-A2AC-21BED89B240B@FreeBSD.org> References: <20140722222518.a5f098a3e5aa4f85407cb3b4@fbsd.es> <53CF65B0.7010504@dumbbell.fr> <E83B0FF1-EF39-4CDD-A2AC-21BED89B240B@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_5C3507DD-08E0-48C9-B402-19FDA7AA2912 Content-Type: multipart/mixed; boundary="Apple-Mail=_915F7405-6DF3-4CAD-AA1D-8DC68F08990B" --Apple-Mail=_915F7405-6DF3-4CAD-AA1D-8DC68F08990B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On 28 Jul 2014, at 22:09, Dimitry Andric <dim@freebsd.org> wrote: > On 23 Jul 2014, at 09:35, Jean-S=E9bastien P=E9dron = <jean-sebastien.pedron@dumbbell.fr> wrote: ... >> The bug is described here: >> http://llvm.org/bugs/show_bug.cgi?id=3D19778 >>=20 >> I add Dimitry into the loop: Dimitry, do you have any news for this >> Clang bug? >=20 > I haven't seen any updates from upstream on this bug. I will try = again > to get some attention, but in the mean time, I propose the workaround > patch which I have attached. This simply avoids the duplicate symbol > definitions, and makes the libglapi port work with clang. >=20 > The resulting assembly output looks the same in the places that count, > but I do not have the proper hardware to test if the libglapi support > really works as expected. Can somebody with actual GL hardware please > verify that it doesn't blow up? Here is an updated diff, which produces the same @GOTOFF accesses as were generated by gcc originally, by marking the symbols as hidden. This should work for both clang and gcc (base or ports). -Dimitry --Apple-Mail=_915F7405-6DF3-4CAD-AA1D-8DC68F08990B Content-Disposition: attachment; filename=graphics__libGL-workaround-duplicate-asm-defs-2.diff Content-Type: application/octet-stream; name="graphics__libGL-workaround-duplicate-asm-defs-2.diff" Content-Transfer-Encoding: 7bit Index: graphics/libGL/bsd.mesalib.mk =================================================================== --- graphics/libGL/bsd.mesalib.mk (revision 362984) +++ graphics/libGL/bsd.mesalib.mk (working copy) @@ -57,10 +57,6 @@ src/glsl/tests/compare_ir src/mapi/glapi/gen/*.py \ src/mapi/mapi/mapi_abi.py -# i386 triggers clang bug 19778. This happens with clang 3.4.1 and older. -. if ${ARCH} == i386 -USE_GCC=yes -. endif .else CONFIGURE_ARGS+=--disable-glut --disable-glw --disable-glu Index: graphics/libGL/files/patch-src_mapi_mapi_entry_x86-64_tls.h =================================================================== --- graphics/libGL/files/patch-src_mapi_mapi_entry_x86-64_tls.h (revision 0) +++ graphics/libGL/files/patch-src_mapi_mapi_entry_x86-64_tls.h (working copy) @@ -0,0 +1,13 @@ +--- src/mapi/mapi/entry_x86-64_tls.h.orig 2013-10-05 05:59:22.000000000 +0200 ++++ src/mapi/mapi/entry_x86-64_tls.h 2014-07-29 20:28:05.000000000 +0200 +@@ -63,8 +63,8 @@ entry_patch_public(void) + { + } + +-static char +-x86_64_entry_start[]; ++extern char ++x86_64_entry_start[] __attribute__((visibility("hidden"))); + + mapi_func + entry_get_public(int slot) Index: graphics/libGL/files/patch-src_mapi_mapi_entry_x86_tls.h =================================================================== --- graphics/libGL/files/patch-src_mapi_mapi_entry_x86_tls.h (revision 0) +++ graphics/libGL/files/patch-src_mapi_mapi_entry_x86_tls.h (working copy) @@ -0,0 +1,13 @@ +--- src/mapi/mapi/entry_x86_tls.h.orig 2013-10-05 05:59:22.000000000 +0200 ++++ src/mapi/mapi/entry_x86_tls.h 2014-07-29 20:28:05.000000000 +0200 +@@ -73,8 +73,8 @@ __asm__(".text"); + extern unsigned long + x86_current_tls(); + +-static char x86_entry_start[]; +-static char x86_entry_end[]; ++extern char x86_entry_start[] __attribute__((visibility("hidden"))); ++extern char x86_entry_end[] __attribute__((visibility("hidden"))); + + void + entry_patch_public(void) Index: graphics/libGL/files/patch-src_mapi_mapi_entry_x86_tsd.h =================================================================== --- graphics/libGL/files/patch-src_mapi_mapi_entry_x86_tsd.h (revision 0) +++ graphics/libGL/files/patch-src_mapi_mapi_entry_x86_tsd.h (working copy) @@ -0,0 +1,13 @@ +--- src/mapi/mapi/entry_x86_tsd.h.orig 2013-10-05 05:59:22.000000000 +0200 ++++ src/mapi/mapi/entry_x86_tsd.h 2014-07-29 20:28:05.000000000 +0200 +@@ -60,8 +60,8 @@ __asm__(".balign 32\n" + #include <string.h> + #include "u_execmem.h" + +-static const char x86_entry_start[]; +-static const char x86_entry_end[]; ++extern const char x86_entry_start[] __attribute__((visibility("hidden"))); ++extern const char x86_entry_end[] __attribute__((visibility("hidden"))); + + void + entry_patch_public(void) --Apple-Mail=_915F7405-6DF3-4CAD-AA1D-8DC68F08990B Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=iso-8859-1 --Apple-Mail=_915F7405-6DF3-4CAD-AA1D-8DC68F08990B-- --Apple-Mail=_5C3507DD-08E0-48C9-B402-19FDA7AA2912 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlPX8isACgkQsF6jCi4glqMbBgCg7VOUBaddSaJggPXGGhcl4BKN B1AAnRtqdN/j/ags6RRGm3DTyX11MCkt =Oc+t -----END PGP SIGNATURE----- --Apple-Mail=_5C3507DD-08E0-48C9-B402-19FDA7AA2912--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AE24FFA8-2782-4255-BB3F-5AC5DC928F78>