Bug 744785

Summary: libcrystalhd doesn't build on ARM due to use of sse compile options
Product: [Fedora] Fedora Reporter: Peter Robinson <pbrobinson>
Component: libcrystalhdAssignee: Jarod Wilson <jarodwilson>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jarodwilson, kwizart
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-11 04:06:52 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 245418    

Description Peter Robinson 2011-10-10 09:13:23 EDT
Being a mini PCIe card it should be possible to use these on ARM devices but it doesn't compile because it doesn't use optimal compile options for the ARM platform. It should probably use standard CFLAGS so it compiles optimal on all platforms.

failed job: http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=181261

+ make
OBJFILES = libcrystalhd_if.o libcrystalhd_int_if.o libcrystalhd_fwcmds.o libcrystalhd_priv.o libcrystalhd_fwdiag_if.o libcrystalhd_fwload_if.o libcrystalhd_parser.o
SRCFILES = libcrystalhd_if.cpp libcrystalhd_int_if.cpp libcrystalhd_fwcmds.cpp libcrystalhd_priv.cpp libcrystalhd_fwdiag_if.cpp libcrystalhd_fwload_if.cpp libcrystalhd_parser.cpp
LNM = libcrystalhd.so.3.6 libcrystalhd.so.3
g++  -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -O2 -Wall -fPIC -shared -fstrict-aliasing -msse2  -c -o libcrystalhd_if.o libcrystalhd_if.cpp
cc1plus: error: unrecognized command line option "-msse2"
make: *** [libcrystalhd_if.o] Error 1
Comment 1 Nicolas Chauvet (kwizart) 2012-08-01 19:01:18 EDT
Actually this is not as easy as removing -msse2 as CFLAGS. There is also a need to replace the whole chroma conversion done exclusively in SSE2 asm from this file:
http://git.linuxtv.org/jarod/crystalhd.git/blob/HEAD:/linux_lib/libcrystalhd/libcrystalhd_int_if.cpp

I've done a stupid patch that comment out the SSE2 assembly, but I wonder if another library couldn't do the job.
Comment 2 Peter Robinson 2012-08-01 19:06:30 EDT
> I've done a stupid patch that comment out the SSE2 assembly, but I wonder if
> another library couldn't do the job.

ORC is one that comes to mind (http://code.entropywave.com/orc/) as it does conversion into SIMD instructions for different platforms so SSE for x86 or NEON for ARM etc.