[Bug 755] New: SDL fails with certain CFLAGS or fails to detect correct machine Arch

blfs-bugs at linuxfromscratch.org blfs-bugs at linuxfromscratch.org
Sun May 2 07:40:59 PDT 2004


http://blfs-bugs.linuxfromscratch.org/show_bug.cgi?id=755

           Summary: SDL fails with certain CFLAGS or fails to detect correct
                    machine Arch
           Product: Beyond LinuxFromScratch
           Version: 5.0
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: trivial
          Priority: P5
         Component: BOOK
        AssignedTo: blfs-book at linuxfromscratch.org
        ReportedBy: matt at projecthugo.co.uk
         QAContact: blfs-book at linuxfromscratch.org


This is a hard bug to reproduce. as I have only come across this after 
building a lot of LFS machines on different hardware

The problem I have come across on SDL 1.2.6 is that on a lot of platforms 
setting the gcc CFLAGS/CXXFLAGS with an -Ox optimisation causes failure, and 
not specifying any CFLAGS/CXXFLAGS causes the configure script to set -O2 
which again causes it to fail. After much playing I came to the following 
conclusion optimisation on this package is not good, probably down to the 
ammount of use of nasm. The reason the optimisation appears to be failing is 
because if you don't set a -march=$your_cpu or other options that correctly 
identify your cpu the configure script does not always get it right. I don't 
know what causes the configure script to get it wrong but on one machine it 
set my pentium 3 to a pentiumpro and my Opteron to an AMD64. I've seen it have 
a few messy calls on the UltraSparc CPU also.

The only way I can get around this is to set my CFLAGS/CXXFLAGS to -march-cpu 
and leave it at that, this way the CPU is correctly identified and the 
configure script cannot force -O2 on the end, and you have not set any -Ox 
problems

This does appear a rare occurance in the SDL package, however it may be worth 
mentioning in the book to set your compile options to force the CPU type - and 
the CPU type alone, nothing else.

The error caused by this problem is normally some variation on 

SDL_RLEaccel.c:845: error: invalid `asm': invalid expression as operand

Thanks,

Matt.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.



More information about the blfs-book mailing list