Sunday, 4 October 2015

[gccsdk] GCC 4.7.4 release 2: minor bugs

Thanks to all for the new GCC 4.7.4 release, it's much appreciated.

I've noticed a couple of minor bugs, when compiling under RISC OS
5.22/RPCEmu 0.8.12.

First, it looks like the '-mthrowback' option is being silently ignored.

Second, elf2aif outputs files typed as Text instead of Absolute. I guess
this is caused by HostFS' inability to change the type of an open file
(see <https://www.riscosopen.org/forum/forums/10/topics/1316>). I
grabbed a copy of the source and simply moved the set type code down a
few lines so it's called after the file is closed; that seems to have
fixed it. Below is my first ever attempt to create a patch file, which
with luck will work...

--- Original/src/elf2aif.c 2015-10-02 15:00:08.000000000 +0100
+++ JEH/src/elf2aif.c 2015-10-04 14:39:05.000000000 +0100
@@ -561,25 +561,6 @@ e2a_convert (const char *elffilename, co
&& e2a_copy (elfhandle, aifhandle) == EXIT_SUCCESS)
status = EXIT_SUCCESS;

-#ifdef __riscos__
- if (status == EXIT_SUCCESS)
- {
- _kernel_swi_regs regs;
- _kernel_oserror *swierror;
-
- /* Set filetype to 0xFF8. */
- regs.r[0] = 0x12; /* Set file type. */
- regs.r[1] = (int) aiffilename;
- regs.r[2] = 0xFF8; /* Absolute. */
- if ((swierror = _kernel_swi (OS_File, &regs, &regs)) != NULL)
- {
- fprintf (stderr, "Cannot set filetype of '%s' (%s)", aiffilename,
- swierror->errmess);
- status = EXIT_FAILURE;
- }
- }
-

No comments:

Post a Comment