View Single Post
Old 07 November 2021, 07:06   #17
kerravon
Registered User
 
Join Date: Mar 2021
Location: Sydney, Australia
Posts: 186
Good news. I have managed to build ld and ar. "ld" was a can of worms. The fundamental problem was that I didn't know you needed to configure with m68k-amigaos and because of the mention of a.out I thought that the a.out target had been modified to build the Amiga, so I had configured with m68k-aout and when I tried to reconfigure with different options, I didn't realize that they weren't taking effect in the subdirectories. A clean configure does in fact build usable code. I have now merged both bebbo's 2.14 mods and mine. Another problem was that the Amiga target was using the non-C90 function "fstat" which I only had a stub for, and when I realized that that might be the cause of the mostly-empty executables, I reworked the binutils code to stop using fstat.

The end result is at http://pdos.org/custom.zip
(that's both binutils 2.14a and gcc 3.2.3)

So this is useful if you only have a C90 environment. I'll distribute Windows executables as part of the PDOS/386 distribution in due course.

Quote:
Originally Posted by phx View Post
As I already mentioned, GNU-as doesn't understand Motorola-syntax directives.
Thanks, I now understand what that means and I have switched to std syntax which works for both assemblers. Awaiting test results. One gotcha I found was that with std syntax, a leading 0 seems to be octal, and it took a while before I realized that that's why it was rejecting my offsets (generated by fd2pragma).

Quote:
Theoretically you can put anything into an ar-archive you like. But most linkers won't expect hunk-format object files in such a linker library.
I have confirmed that "ar" accepts storing hunks in there and "ld" accepts an archive containing hunks.

Quote:
That's the infamous MIT syntax for m68k. Probably no other m68k assembler, other than GNU-as, supports it.
Ok, I don't care if it puts out MIT syntax so long as I don't need to look at it and the stack calling convention is correct. I'll see if I have been successful with that in due course. I don't think there's a way to change that in GCC, and in the assembler I went looking for the m68k equivalent of i386 ".intel_syntax noprefix" but it looks like there is no such thing and the Motorola syntax is just quietly accepted alongside MIT.

Anyway, that means my GCC 3.2.3 based system can now build Windows, MVS and Amiga executables so that I can do a better job of triangulating and abstracting.
kerravon is offline  
 
Page generated in 0.06401 seconds with 11 queries