Date: Mon, 28 Jul 2014 22:09:39 +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: <E83B0FF1-EF39-4CDD-A2AC-21BED89B240B@FreeBSD.org> In-Reply-To: <53CF65B0.7010504@dumbbell.fr> References: <20140722222518.a5f098a3e5aa4f85407cb3b4@fbsd.es> <53CF65B0.7010504@dumbbell.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_55EB2DEB-8D8A-4F5C-A793-D968CD475C2A Content-Type: multipart/mixed; boundary="Apple-Mail=_35009F46-8DF6-4532-8228-ACB58B4D428B" --Apple-Mail=_35009F46-8DF6-4532-8228-ACB58B4D428B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On 23 Jul 2014, at 09:35, Jean-S=E9bastien P=E9dron = <jean-sebastien.pedron@dumbbell.fr> wrote: > On 22.07.2014 22:25, Carlos Jacobo Puga Medina wrote: >> Currently I'm testing an ATI Radeon HD 3450 with the new Xorg=20 >> drivers on 11-CURRENT. It works partially due some ports aren't able >> to compile with CLANG and prefer GCC47. These ports are dri, libGL >> and libglapi. >>=20 >> % uname -a >> (...) 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r268969 (...) i386 >>=20 >> % make -C /usr/ports/graphics/dri -V CC >> gcc47 >=20 > I now see that Mesa (libGL, dri, ...) is built with GCC on i386; never > noticed that before. See graphics/libGL/bsd.mesalib.mk: >=20 > # i386 triggers clang bug 19778. This happens with clang 3.4.1 and = older. > . if ${ARCH} =3D=3D i386 > USE_GCC=3Dyes > . endif >=20 > 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? 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. 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? > Buildling Mesa with GCC causes the usual libc++ vs. libstdc++ > incompatibilty: >=20 > libGL error: dlopen /usr/local/lib/dri/r600_dri.so failed > (/usr/local/lib/dri/r600_dri.so: Undefined symbol > = "_ZN4llvm13EngineBuilder12selectTargetERKNS_6TripleENS_9StringRefES4_RKNS_= 15SmallVectorImplISsEE") For this situation, Baptiste has created the devel/libc++ port, which can be compiled with gcc 4.8 or higher, and which should be compatible with the base libc++. See the graphics/rawtherapee port for an example. -Dimitry --Apple-Mail=_35009F46-8DF6-4532-8228-ACB58B4D428B Content-Disposition: attachment; filename=graphics__libGL-workaround-duplicate-asm-defs-1.diff Content-Type: application/octet-stream; name="graphics__libGL-workaround-duplicate-asm-defs-1.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,11 @@ +--- 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-28 21:47:24.000000000 +0200 +@@ -63,7 +63,7 @@ entry_patch_public(void) + { + } + +-static char ++extern char + x86_64_entry_start[]; + + mapi_func 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-28 21:47:39.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[]; ++extern char x86_entry_end[]; + + 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-28 21:47:55.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[]; ++extern const char x86_entry_end[]; + + void + entry_patch_public(void) --Apple-Mail=_35009F46-8DF6-4532-8228-ACB58B4D428B Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=iso-8859-1 --Apple-Mail=_35009F46-8DF6-4532-8228-ACB58B4D428B-- --Apple-Mail=_55EB2DEB-8D8A-4F5C-A793-D968CD475C2A 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) iEYEARECAAYFAlPWrhYACgkQsF6jCi4glqOeyACeNZ0MxYrOK157W9VyYVjVkfi4 Hb0AnRAf/2Clf/vd/uDM2BRP8ZQT+VWy =F1Rj -----END PGP SIGNATURE----- --Apple-Mail=_55EB2DEB-8D8A-4F5C-A793-D968CD475C2A--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E83B0FF1-EF39-4CDD-A2AC-21BED89B240B>