[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-devel
Subject:    Re: [xine-devel] compiling xine-lib-1.1.6 on Solaris/11 X86
From:       "Pascal S. de Kloe" <pascal () quies ! net>
Date:       2007-05-06 11:05:31
Message-ID: 200705061305.37003.pascal () quies ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


Hello Gentleman,

OpenBSD also had problems with cpu_accel.c. I just disabled it with a 
simple modification (see attachment).

How about we only enable these assembler optimizations for the most 
common and therefore most tested platforms like Linux?


On Saturday 05 May 2007 14:42:10 Ben Taylor wrote:
>  -------------- Original message ----------------------
> From: Darren Salt <linux@youmustbejoking.demon.co.uk>
>
> > [text rewrapped to 77 columns]
> >
> > I demand that Ben Taylor may or may not have written...
> >
> > > Building Xine-lib on a Solaris 11 (Express) system, I get the
> > > following.  I doesn't appear to be gas/as related, as it seems
> > > that gas is never called? Ideas?
> >
> > [snip]
> >
> > > gmake[3]: Entering directory
> >
> > `/export/src/xine/050407/xine-lib-1.1.6/src/xine-utils'
> >
> > > [...] gcc [...] -g -O2 [...] cpu_accel.c; \
> >
> > [snip]
> >
> > > cpu_accel.c: In function `arch_accel':
> > > cpu_accel.c:109: error: can't find a register in class `BREG'
> > > while reloading
> >
> > `asm'
> > [snip]
> >
> > It looks like you've hit a compiler bug. We have several
> > workarounds in place for various ffmpeg source files.
> >
> > This should "fix" it:
> >
> > diff -r abd904cd9519 src/xine-utils/Makefile.am
> > --- a/src/xine-utils/Makefile.am	Fri May 04 18:25:14 2007 +0100
> > +++ b/src/xine-utils/Makefile.am	Fri May 04 22:00:01 2007 +0100
> > @@ -13,6 +13,9 @@ endif
> >
> >  AM_CFLAGS = $(X_CFLAGS) $(VISIBILITY_FLAG)
> >  AM_CPPFLAGS=-DXINE_LIBRARY_COMPILE
> > +
> > +# Avoid "can't find register" failures with -O1 and higher
> > +cpu_accel.o cpu_accel.lo: CFLAGS=$(shell echo @CFLAGS@ | sed -e
> > 's/-funroll-loops//g; s/$$/ -Os/')
> >
> >  libxineutils_la_SOURCES = $(pppc_files) \
> >  	cpu_accel.c \
>
> Unfortunately, that didn't seem to fix it either. Here's the snippet
> from the generated Makefile:
>
> # Avoid "can't find register" failures with -O1 and higher
> cpu_accel.o cpu_accel.lo: CFLAGS=$(shell echo -D_REENTRANT
> -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE $(MULTIPASS_CFLAGS)  -Wformat=2
> -Wno-format-zero-length -Wmissing-format-attribute
> -Werror-implicit-function-declaration -Wstrict-aliasing=2 -mtune=i386
> -O3 -pipe -fomit-frame-pointer -falign-functions=4 -falign-loops=4
> -falign-jumps=4   -fexpensive-optimizations -fschedule-insns2
> -ffast-math -finline-functions -Wall -Wpointer-arith -Wnested-externs
> -Wcast-align -Wchar-subscripts -Wmissing-declarations
> -Wmissing-prototypes -g -O2 -DNDEBUG | sed -e 's/-funroll-loops//g;
> s/$$/ -Os/')
>
> and the output from the make
>
>
> if /bin/bash ../../libtool --tag=CC --mode=compile gcc
> -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include
> -I../../include -I../../src -I../../src/xine-engine
> -I../../src/xine-engine -I../../src/xine-utils -I../../src/input
> -I../../src/input  -I../../lib -I../../lib -DXINE_LIBRARY_COMPILE 
> -I/usr/openwin/include -D_REENTRANT -D_FILE_OFFSET_BITS=64
> -DXINE_COMPILE -Wformat=2 -Wno-format-zero-length
> -Wmissing-format-attribute -Werror-implicit-function-declaration
> -Wstrict-aliasing=2 -mtune=i386 -O3 -pipe -fomit-frame-pointer
> -falign-functions=4 -falign-loops=4 -falign-jumps=4
> -fexpensive-optimizations -fschedule-insns2 -ffast-math
> -finline-functions -Wall -Wpointer-arith -Wnested-externs
> -Wcast-align -Wchar-subscripts -Wmissing-declarations
> -Wmissing-prototypes -g -O2 -DNDEBUG -Os -MT cpu_accel.lo -MD -MP -MF
> ".deps/cpu_accel.Tpo" -c -o cpu_accel.lo cpu_accel.c; \
>
>         then mv -f ".deps/cpu_accel.Tpo" ".deps/cpu_accel.Plo"; else
> rm -f ".deps/cpu_accel.Tpo"; exit 1; fi
>
>  gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include
> -I../../include -I../../src -I../../src/xine-engine
> -I../../src/xine-engine -I../../src/xine-utils -I../../src/input
> -I../../src/input -I../../lib -I../../lib -DXINE_LIBRARY_COMPILE
> -I/usr/openwin/include -D_REENTRANT -D_FILE_OFFSET_BITS=64
> -DXINE_COMPILE -Wformat=2 -Wno-format-zero-length
> -Wmissing-format-attribute -Werror-implicit-function-declaration
> -Wstrict-aliasing=2 -mtune=i386 -O3 -pipe -fomit-frame-pointer
> -falign-functions=4 -falign-loops=4 -falign-jumps=4
> -fexpensive-optimizations -fschedule-insns2 -ffast-math
> -finline-functions -Wall -Wpointer-arith -Wnested-externs
> -Wcast-align -Wchar-subscripts -Wmissing-declarations
> -Wmissing-prototypes -g -O2 -DNDEBUG -Os -MT cpu_accel.lo -MD -MP -MF
> .deps/cpu_accel.Tpo -c cpu_accel.c  -fPIC -DPIC -o .libs/cpu_accel.o
>
> cpu_accel.c: In function `arch_accel':
> cpu_accel.c:109: error: can't find a register in class `BREG' while
> reloading `asm' cpu_accel.c:117: error: can't find a register in
> class `BREG' while reloading `asm' cpu_accel.c:133: error: can't find
> a register in class `BREG' while reloading `asm' cpu_accel.c:135:
> error: can't find a register in class `BREG' while reloading `asm'
> gmake: *** [cpu_accel.lo] Error 1
>
> Thoughts?
>
> Ben
>
> ---------------------------------------------------------------------
>---- This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> xine-devel mailing list
> xine-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xine-devel



["xine-lib-cpu_accel.patch" (text/x-diff)]

--- xine-lib-1.1.4/src/xine-utils/cpu_accel.c-old	Mon May 22 18:35:15 2006
+++ xine-lib-1.1.4/src/xine-utils/cpu_accel.c	Fri Mar 23 00:49:11 2007
@@ -58,7 +58,7 @@
   caps = MM_ACCEL_X86_MMX | MM_ACCEL_X86_SSE | MM_ACCEL_X86_MMXEXT | MM_ACCEL_X86_SSE2;
 #else
 
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) && !defined(__OpenBSD__)
   uint32_t eax, ebx, ecx, edx;
   int AMD;
 
@@ -146,7 +146,7 @@
   }
 #else
   caps = 0;
-#endif /* _MSC_VER */
+#endif /* _MSC_VER & !__OpenBSD__ */
 
   /* test OS support for SSE */
   if (caps & MM_ACCEL_X86_SSE) {

["signature.asc" (application/pgp-signature)]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
xine-devel mailing list
xine-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic