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

bugzilla at linuxfromscratch.org bugzilla at linuxfromscratch.org
Sun May 2 03:21:43 PDT 2004


           Summary: SDL fails with certain CFLAGS or fails to detect correct
                    machine Arch
           Product: Linux From Scratch
           Version: 5.0
          Platform: PC
        OS/Version: All
            Status: UNCONFIRMED
          Severity: minor
          Priority: P5
         Component: Book
        AssignedTo: lfs-book at linuxfromscratch.org
        ReportedBy: matt at projecthugo.co.uk
         QAContact: lfs-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

First I'm sorry that this is a BLFS problems, but there is not a catagory for 
BLFS so I can only assume it goes under the LFS book. Sorry if I am mistaken.

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 

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



------- 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 lfs-book mailing list