Hi --
I tried building xenocara on a fresh install and fresh cvs checkout on loongson, and I get the error below. There are no atomics on loongson. ~Brian ===> fc-case cc -O2 -pipe -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -DHAVE_CONFIG_H -I/usr/xenocara/lib/fontconfig/fc-case/../../../dist/fontconfig -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/xenocara/lib/fontconfig/fc-case/../src -I/usr/xenocara/lib/fontconfig/fc-case/../../../dist/fontconfig/src -I/usr/xenocara/lib/fontconfig/fc-case/../common -I/usr/xenocara/lib/fontconfig/fc-case -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -DHAVE_CONFIG_H -I/usr/xenocara/lib/fontconfig/fc-case/../../../dist/fontconfig -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/xenocara/lib/fontconfig/fc-case/../src -I/usr/xenocara/lib/fontconfig/fc-case/../../../dist/fontconfig/src -I/usr/xenocara/lib/fontconfig/fc-case/../common -I/usr/xenocara/lib/fontconfig/fc-case -c /usr/xenocara/lib/fontconfig/fc-case/../../../dist/fontconfig/fc-case/fc-case.c cc -o fc-case fc-case.o ===> fc-lang cc -O2 -pipe -I../fc-case -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -DHAVE_CONFIG_H -I/usr/xenocara/lib/fontconfig/fc-lang/../../../dist/fontconfig -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/xenocara/lib/fontconfig/fc-lang/../src -I/usr/xenocara/lib/fontconfig/fc-lang/../../../dist/fontconfig/src -I/usr/xenocara/lib/fontconfig/fc-lang/../common -I/usr/xenocara/lib/fontconfig/fc-lang -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -DHAVE_CONFIG_H -I/usr/xenocara/lib/fontconfig/fc-lang/../../../dist/fontconfig -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/xenocara/lib/fontconfig/fc-lang/../src -I/usr/xenocara/lib/fontconfig/fc-lang/../../../dist/fontconfig/src -I/usr/xenocara/lib/fontconfig/fc-lang/../common -I/usr/xenocara/lib/fontconfig/fc-lang -c /usr/xenocara/lib/fontconfig/fc-lang/../../../dist/fontconfig/fc-lang/fc-lang.c cc -o fc-lang fc-lang.o fc-lang.o(.text+0x19cc): In function `FcStrSerialize': : warning: strcpy() is almost always misused, please use strlcpy() fc-lang.o(.text+0x1a98): In function `scanopen': : warning: strcat() is almost always misused, please use strlcat() fc-lang.o(.text+0x20a4): In function `FcStrSetDestroy': : undefined reference to `__sync_fetch_and_add_4' fc-lang.o(.text+0x20a8): In function `FcStrSetDestroy': : undefined reference to `__sync_fetch_and_add_4' fc-lang.o(.text+0x2214): In function `FcStrListCreate': : undefined reference to `__sync_fetch_and_add_4' fc-lang.o(.text+0x2218): In function `FcStrListCreate': : undefined reference to `__sync_fetch_and_add_4' fc-lang.o(.text+0x2280): In function `FcCharSetDestroy': : undefined reference to `__sync_fetch_and_add_4' fc-lang.o(.text+0x2284): more undefined references to `__sync_fetch_and_add_4' follow collect2: ld returned 1 exit status *** Error 1 in fc-lang (<bsd.prog.mk>:95 'fc-lang') *** Error 1 in /usr/xenocara/lib/fontconfig (<bsd.subdir.mk>:48 'all') |
On Mon, Mar 18, 2013 at 04:12:59PM -0400, Brian Callahan wrote:
> Hi -- > > I tried building xenocara on a fresh install and fresh cvs checkout on loongson, and I get the error below. There are no atomics on loongson. > Please test the patch below on as many arcitectures as possible. diff --git lib/fontconfig/common/config.h lib/fontconfig/common/config.h index 1836d1f..5e6070d 100644 --- lib/fontconfig/common/config.h +++ lib/fontconfig/common/config.h @@ -90,7 +90,9 @@ #define HAVE_GETUID 1 /* Have Intel __sync_* atomic primitives */ +#if defined(__i386__) || defined(__amd64__) #define HAVE_INTEL_ATOMIC_PRIMITIVES 1 +#endif /* Define to 1 if you have the <inttypes.h> header file. */ #define HAVE_INTTYPES_H 1 -- Matthieu Herrb |
On Mon, Mar 18, 2013 at 09:44:38PM +0100, Matthieu Herrb wrote:
> On Mon, Mar 18, 2013 at 04:12:59PM -0400, Brian Callahan wrote: > > Hi -- > > > > I tried building xenocara on a fresh install and fresh cvs checkout on loongson, and I get the error below. There are no atomics on loongson. > > > Please test the patch below on as many arcitectures as possible. > > diff --git lib/fontconfig/common/config.h lib/fontconfig/common/config.h > index 1836d1f..5e6070d 100644 > --- lib/fontconfig/common/config.h > +++ lib/fontconfig/common/config.h > @@ -90,7 +90,9 @@ > #define HAVE_GETUID 1 > > /* Have Intel __sync_* atomic primitives */ > +#if defined(__i386__) || defined(__amd64__) > #define HAVE_INTEL_ATOMIC_PRIMITIVES 1 > +#endif > > /* Define to 1 if you have the <inttypes.h> header file. */ > #define HAVE_INTTYPES_H 1 > Or do we have a list of architectures that support those gcc builtins somewhere already ? -- Matthieu Herrb |
> Or do we have a list of architectures that support those gcc builtins
> somewhere already ? No, but we ought to start working on this - and maybe implementing/backporting/whatever such routines where possible, since more and more software is expecting them. |
In reply to this post by Matthieu Herrb
On 3/18/2013 5:38 PM, Matthieu Herrb wrote:
> On Mon, Mar 18, 2013 at 09:44:38PM +0100, Matthieu Herrb wrote: >> On Mon, Mar 18, 2013 at 04:12:59PM -0400, Brian Callahan wrote: >>> Hi -- >>> >>> I tried building xenocara on a fresh install and fresh cvs checkout on loongson, and I get the error below. There are no atomics on loongson. >>> >> Please test the patch below on as many arcitectures as possible. >> >> diff --git lib/fontconfig/common/config.h lib/fontconfig/common/config.h >> index 1836d1f..5e6070d 100644 >> --- lib/fontconfig/common/config.h >> +++ lib/fontconfig/common/config.h >> @@ -90,7 +90,9 @@ >> #define HAVE_GETUID 1 >> >> /* Have Intel __sync_* atomic primitives */ >> +#if defined(__i386__) || defined(__amd64__) >> #define HAVE_INTEL_ATOMIC_PRIMITIVES 1 >> +#endif >> >> /* Define to 1 if you have the <inttypes.h> header file. */ >> #define HAVE_INTTYPES_H 1 >> > > Or do we have a list of architectures that support those gcc builtins > somewhere already ? > I don't know if we have a list somewhere, but I do know that no MIPS archs have those atomics, so at a minimum, we'd have to block out mips64 and mips64el. ~Brian |
> >Or do we have a list of architectures that support those gcc builtins
> >somewhere already ? > > > > I don't know if we have a list somewhere, but I do know that no MIPS archs have those atomics, so at a minimum, we'd have to block out mips64 and mips64el. Mips64 is an ll/sc platform (as are alpha, powerpc and sparc64). On such platforms every atomic operation on int or long is trivial to implement. |
In reply to this post by Miod Vallat
On 2013/03/18 21:39, Miod Vallat wrote:
> > Or do we have a list of architectures that support those gcc builtins > > somewhere already ? > > No, but we ought to start working on this - and maybe > implementing/backporting/whatever such routines where possible, since > more and more software is expecting them. > The following are known to have run into problems building things in ports which require them: arm hppa mips64 mips64el Boehm's GC (ports/devel/boehm-gc) includes libatomic_ops which might be a good place to look if adding support, our port has a patch for mips. |
In reply to this post by Brian Callahan-3
On Mon, Mar 18, 2013 at 05:40:02PM -0400, Brian Callahan wrote:
> On 3/18/2013 5:38 PM, Matthieu Herrb wrote: > >On Mon, Mar 18, 2013 at 09:44:38PM +0100, Matthieu Herrb wrote: > >>On Mon, Mar 18, 2013 at 04:12:59PM -0400, Brian Callahan wrote: > >>>Hi -- > >>> > >>>I tried building xenocara on a fresh install and fresh cvs checkout on loongson, and I get the error below. There are no atomics on loongson. > >>> > >>Please test the patch below on as many arcitectures as possible. > >> > >>diff --git lib/fontconfig/common/config.h lib/fontconfig/common/config.h > >>index 1836d1f..5e6070d 100644 > >>--- lib/fontconfig/common/config.h > >>+++ lib/fontconfig/common/config.h > >>@@ -90,7 +90,9 @@ > >> #define HAVE_GETUID 1 > >> > >> /* Have Intel __sync_* atomic primitives */ > >>+#if defined(__i386__) || defined(__amd64__) > >> #define HAVE_INTEL_ATOMIC_PRIMITIVES 1 > >>+#endif > >> > >> /* Define to 1 if you have the <inttypes.h> header file. */ > >> #define HAVE_INTTYPES_H 1 > >> > > > >Or do we have a list of architectures that support those gcc builtins > >somewhere already ? > > > > I don't know if we have a list somewhere, but I do know that no MIPS archs have those atomics, so at a minimum, we'd have to block out mips64 and mips64el. > Ok. So afer advice from kettenis@, here's a imho better patch. (keeping the list in Makefile.inc will make it easier to expand it later) diff --git lib/fontconfig/Makefile.inc lib/fontconfig/Makefile.inc index 5f0c63a..2854fb8 100644 --- lib/fontconfig/Makefile.inc +++ lib/fontconfig/Makefile.inc @@ -16,4 +16,10 @@ CFLAGS += -I${FONTCONFIG} \ -I${.CURDIR}/../common \ -I${.CURDIR} +.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "amd64" || \ + ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ + ${MACHINE_ARCH} == "sparc64" +CFLAGS += -DHAVE_INTEL_ATOMIC_PRIMITIVES=1 +.endif + NOPROFILE = diff --git lib/fontconfig/common/config.h lib/fontconfig/common/config.h index 1836d1f..27713a1 100644 --- lib/fontconfig/common/config.h +++ lib/fontconfig/common/config.h @@ -90,7 +90,7 @@ #define HAVE_GETUID 1 /* Have Intel __sync_* atomic primitives */ -#define HAVE_INTEL_ATOMIC_PRIMITIVES 1 +/* #undef HAVE_INTEL_ATOMIC_PRIMITIVES 1 */ /* Define to 1 if you have the <inttypes.h> header file. */ #define HAVE_INTTYPES_H 1 -- Matthieu Herrb |
On 3/18/2013 6:50 PM, Matthieu Herrb wrote:
> > Ok. So afer advice from kettenis@, here's a imho better > patch. (keeping the list in Makefile.inc will make it easier to expand > it later) > > diff --git lib/fontconfig/Makefile.inc lib/fontconfig/Makefile.inc > index 5f0c63a..2854fb8 100644 > --- lib/fontconfig/Makefile.inc > +++ lib/fontconfig/Makefile.inc > @@ -16,4 +16,10 @@ CFLAGS += -I${FONTCONFIG} \ > -I${.CURDIR}/../common \ > -I${.CURDIR} > > +.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "amd64" || \ > + ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ > + ${MACHINE_ARCH} == "sparc64" > +CFLAGS += -DHAVE_INTEL_ATOMIC_PRIMITIVES=1 > +.endif > + > NOPROFILE = > diff --git lib/fontconfig/common/config.h lib/fontconfig/common/config.h > index 1836d1f..27713a1 100644 > --- lib/fontconfig/common/config.h > +++ lib/fontconfig/common/config.h > @@ -90,7 +90,7 @@ > #define HAVE_GETUID 1 > > /* Have Intel __sync_* atomic primitives */ > -#define HAVE_INTEL_ATOMIC_PRIMITIVES 1 > +/* #undef HAVE_INTEL_ATOMIC_PRIMITIVES 1 */ > > /* Define to 1 if you have the <inttypes.h> header file. */ > #define HAVE_INTTYPES_H 1 > > This works for me on amd64, loongson & macppc. ~Brian |
Free forum by Nabble | Edit this page |