We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 687

Summary: SDL_cpuinfo.c does not compile on Solaris / GCC / Sun assembler
Product: SDL Reporter: Jörn Clausen <joern.clausen>
Component: buildAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: binarycrusader
Version: 1.2.13Keywords: target-1.2.14
Hardware: Other   
OS: Solaris   

Description Jörn Clausen 2009-01-22 08:36:18 UTC
Compiling SDL_cpuinfo.c on Solaris 10/x86 with GCC 3.4.6 and /usr/ccs/bin/as stops with

 gcc -g -O2 -I/usr/local/pkgsrc/pkgsrc-cvs/include -I./include -D_GNU_SOURCE=1 -I/usr/local/pkgsrc/pkgsrc-cvs/include -I/usr/local/pkgsrc/pkgsrc-cvs/include -DXTHREADS -D_REENTRANT -c ./src/cpuinfo/SDL_cpuinfo.c  -fPIC -DPIC -o build/.libs/SDL_cpuinfo.o
Assembler: SDL_cpuinfo.c
        "/var/tmp//ccRMHeed.s", line 57 : Syntax error
        Near line: "            pushfl                      # Get original EFLAGS             "
        "/var/tmp//ccRMHeed.s", line 60 : Syntax error
        Near line: "        xorl    $0x200000,%eax     # Flip ID bit in EFLAGS           "
        "/var/tmp//ccRMHeed.s", line 61 : Syntax error
        Near line: "        pushl   %eax               # Save new EFLAGS value on stack  "
        "/var/tmp//ccRMHeed.s", line 62 : Syntax error
        Near line: "        popfl                       # Replace current EFLAGS value    "
        "/var/tmp//ccRMHeed.s", line 63 : Syntax error
        Near line: "        pushfl                      # Get new EFLAGS                  "
        "/var/tmp//ccRMHeed.s", line 64 : Syntax error
        Near line: "        popl    %eax               # Store new EFLAGS in EAX         "
        "/var/tmp//ccRMHeed.s", line 65 : Syntax error
        Near line: "        xorl    %ecx,%eax         # Can not toggle ID bit,          "
        "/var/tmp//ccRMHeed.s", line 66 : Syntax error
        Near line: "        jz      1f                  # Processor=80486                 "
        "/var/tmp//ccRMHeed.s", line 67 : Syntax error


Trying to configure SDL with --disable-cpuinfo didn't help. As far as I can see, the define SDL_CPUINFO_DISABLED is set, but never checked. --disable-assembly doesn't help either, as the define SDL_ASSEMBLY_ROUTINES is not checked in SDL_cpuinfo.c. Trying to activate other assembler code (the one defined after #elif defined(__sun) && defined(__i386)) resulted in a successful compile, but the resulting library segfaults in this function.
Comment 1 Ryan C. Gordon 2009-09-13 16:33:23 UTC
Tagging this bug with "target-1.2.14" so we can try to resolve it for SDL 1.2.14.

Please note that we may choose to resolve it as WONTFIX. This tag is largely so we have a comprehensive wishlist of bugs to examine for 1.2.14 (and so we can close bugs that we'll never fix, rather than have them live forever in Bugzilla).

--ryan.
Comment 2 Sam Lantinga 2009-09-21 03:10:06 UTC
We're not planning to fix this ourselves, though patches are welcome!