OS/2, eCS & ArcaOS - Technical > Programming

Test build of GCC 4.7.3 available

<< < (6/6)

Paul Smedley:

--- Quote from: Dave Yeo on December 21, 2013, 06:58:39 am ---
--- Quote from: Paul Smedley on December 14, 2013, 09:20:24 am ---
GCC 4.8.2 binaries now at http://os2ports.smedley.id.au

I'll get the source up at github when i get a spare afternoon

--- End quote ---

Finally tested the C part by running the FFmpeg FATE suit which consists of about 2000 tests.  http://ffmpeg.org/fate.html.
While GCC 4.4.6 usually passes all tests (I get failures on 2 HEVC (H265) compliance tests after a few days of up time, see http://fate.ffmpeg.org/history.cgi?slot=x86.os2.446 and for comparison fate.ffmpeg.org), 4.8.2 failed between 24 and 30 tests and ffmpeg.exe and especially ffprobe.exe froze multiple times forcing me to kill them. There's still something wrong, I'd guess alignment issues.
If you want to test, you need to configure with cpu=i486 or higher to pull in the GCC atomics (could they be broken?) and I'll attach a patch for eCS to work around the buggy PMSHELL. Note this also tests your environment as things like diff not supporting stdin or a bad bc will cause falures. Need to use [k]sh to run configure as well due to buggy ash (doesn't set CWD).
Anyways thanks for the great work and I wish I knew how to debug some of this stuff.

--- End quote ---

Hi Dave - were you able to test with 4.7.3 at al? I'm curious when the regression started as it may help in the debugging.

Dave Yeo:

--- Quote from: Paul Smedley on December 22, 2013, 09:28:25 am ---
Hi Dave - were you able to test with 4.7.3 at al? I'm curious when the regression started as it may help in the debugging.

--- End quote ---

Hi Paul, tested 4.7.3 and had similar results.

Paul Smedley:

--- Quote from: Dave Yeo on December 23, 2013, 03:37:50 am ---
--- Quote from: Paul Smedley on December 22, 2013, 09:28:25 am ---
Hi Dave - were you able to test with 4.7.3 at al? I'm curious when the regression started as it may help in the debugging.

--- End quote ---

Hi Paul, tested 4.7.3 and had similar results.

--- End quote ---

I will have to get this replicated locally when step through 4.4.6 -> 4.5.4 -> 4.6.x -> 4.7.x and see where the failed tests started from

Another one for the todo list

Paul Smedley:

--- Quote from: Dave Yeo on September 08, 2013, 04:28:58 am ---
--- Quote from: Paul Smedley on September 08, 2013, 12:05:45 am ---fate tests fail here with:
Test eval failed. Look at tests/data/fate/eval.err for details.

http://smedley.id.au/tmp/eval.err

--- End quote ---

That'll be the FPU exception bug where the Presentation Manager re-enables FPU exceptions without saving state and restoring state, my V4+free updates install doesn't have it.
Easiest fix is to add
 
--- Code: ---#ifdef __i386
    short fcr;
    __asm__ volatile ("fstcw        %0 \n"
                      "or      $63, %0 \n"
                      "fldcw        %0 \n"
                      : "=m"(fcr));
#endif

--- End code ---
or from Cairo,

--- Code: ---static inline void
DisableFPUException (void)
{
    unsigned short usCW;

    /* Some OS/2 PM API calls modify the FPU Control Word,
     * but forget to restore it.
     *
     * This can result in XCPT_FLOAT_INVALID_OPCODE exceptions,
     * so to be sure, we disable Invalid Opcode FPU exception
     * before using FPU stuffs.
     */
    usCW = _control87 (0, 0);
    usCW = usCW | EM_INVALID | 0x80;
    _control87 (usCW, MCW_EM | 0x80);
}

--- End code ---
after main() in all executables.
Plan9 has a similar bug and there is an alternative main() in compat/plan9/main.c where main() is undefined and replaced but I never could get it to work on OS/2, multiple symbol errors, I guess it would be needed to be added to crt0.obj and perhaps used with another flag much like -Zbin-args.

--- End quote ---

Don't suppose you have a diff with this already in place? I don't fancy modifying multiple source files due to time constraints...

Dave Yeo:

--- Quote from: Paul Smedley on December 30, 2013, 10:00:34 am ---Don't suppose you have a diff with this already in place? I don't fancy modifying multiple source files due to time constraints...

--- End quote ---

I posted a patch here on the 21st. Here it is again freshly rebased. If you have problems with git, eg complaining about not being able to merge when pulling or cloning try
git fetch --force && git reset --hard origin/master
BTW I tested 4.5.4 and had the same failures even with optimizations turned off. Just tried 3.3.5, had to use pthreads as GCC is too old to have atomics and disable sse and mmx but it actually passed. I'll do some more experimenting later today.

Navigation

[0] Message Index

[*] Previous page

Go to full version