-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nt build #1
Comments
Thanks for sharing. Can you post your code for the pragma part? Or, maybe, you could send me a pull request for the Windows-related improvements. Thanks! It was a fun project. |
Sure. Originally, this is what I did:
But, it appears that gcc supports the same pragma's as msc: https://gcc.gnu.org/onlinedocs/gcc/Structure-Layout-Pragmas.html So, instead of the _MSC_VER ifdef, switching to the pragma would work:
Apologies for not knowing that; I almost never use gcc, so I'm not very familiar with it. I did a 'build' batch and attached it. I had to give it a .txt extension. I'll try to do a batch version of the tmg.sh script later today/tonight. I was looking at it earlier and, because you have two 'phases', it made me think of the early 'cc', which basically just runs the compiler stages,
It might be interesting to do a 'tmgcc' thing that does the same. Then that led me to think about how nice it would be to use the old 'ar' utility, which wasn't tied to executable image files. I tried that earlier and it works just fine:
Then, tmgx.a could be put next to tmg.sh, or somewhere like /usr/local/lib, and then copied to the build directory and extracted when needed, instead of having to find the source. The ar I use is a port I did of the 7th edition source. I'll get the tmg.cmd batch done as quickly as possible and do a pull request. I've got source from an earlier S/360 version of tmg that I'll include; it's just three 360 assembler files. I've got a PDF of McClure's original paper also. It would be great to find the original IBM 7090/7040 source, but that's likely long gone. Another interesting compiler-compiler from those days is XPL, which is a dialect of PL/1. |
Excellent! Maybe, you can include the pragma part into the pull request as well then. As for the library archive utility, the idea is neat and efficient (if it helps to reduce the amount of code that needs to be recompiled by C). After all, that's how it worked originally. But on the other side, this code is so small by today's standards and, probably, so rarely used that, personally, I wouldn't invest time in this. S/360 code could be interesting, though it's probably not directly related to this Unix v2 dialect. And I hope that it's in public domain (just like OS/360). As for the McClure's article, I have it as well, but I'm pretty sure it's still protected by copyright. Unless we obtain a permission from copyright holders, I wouldn't want to include it into the repo explicitly. |
You mentioned preparing a windows build in your readme. I wanted to let you know that it built ok for me using the Microsoft 32-bit compiler (19.16.27040). There were two changes that I made:
the symbol_t struct in tmgc.h has a gcc-specific packed attribute that I ifdef'd on _MSC_VER, using a pack,1 pragma for msc, otherwise the gcc attribute.
the build script asks gcc to align functions. The msvc compiler doesn't support function alignment.
I built a few of the examples by hand and they worked as expected. It'd be fairly simple to make nt-batch file versions of the bash scripts, then run all the test bits.
It's very cool that you took the time to do this.
The text was updated successfully, but these errors were encountered: