discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Patching Mandoc for IRIX
@ 2020-06-02 23:29 Kazuo Kuroi
  2020-06-22 21:44 ` Ingo Schwarze
  0 siblings, 1 reply; 6+ messages in thread
From: Kazuo Kuroi @ 2020-06-02 23:29 UTC (permalink / raw)
  To: discuss

[-- Attachment #1: Type: text/plain, Size: 1735 bytes --]

Hi there,

I have patched mandoc to work with IRIX, but I have a feeling that the 
fixes made will require some changes. Let me first explain my goals here:

I am patching mandoc to work with MIPSPro, the native compiler of IRIX, 
so I'll have to explain the changes I made to get it to build:

http://gitea.irixce.org/Raion/Xenopatches/raw/branch/master/mandoc/mandoc.patch 


Here's the patch file.

First change is because it doesn't reliably detect the c99 driver, and 
as the code uses non ANSI-related things, it needs to detect c99. This 
can probably be disregarded, as can the CFLAGS reference.

Next one is in mandoc.h, and it's because MIPSPro doesn't support the 
__attribute__ block. This could be fixed with a guard for non-GCC 
compilers, like this:
#ifdef __GNUC__
__attribute__((__format__ (__printf__, 4, 5)));

#endif

Or something. I would hope that you won't lock it out to GCC or clang, 
because I'm sure there's other compilers this thing chokes on.

The rest are to fix the IRIX printf() implementation, which doesn't 
allow for %zu as mandoc currently does. You can see my discussion with a 
colleague on the topic here:

https://forums.irixnet.org/thread-1946-post-14522.html

I understand if you do not want to upstream all of these changes, but I 
would hope that we can take some action to prevent someone else from 
having to go through this. Surely, this is not the only UNIX that would 
cause this.

Yes, GCC works, but we don't have clang and often times using a GPL 
compiler isn't only against my own principles when we have perfectly 
good alternatives, and MIPSPro performs better on IRIX than GCC.

If I can be of any assistance or questions in regards to this patch, let 
me know!

-Kazuo Kuroi


[-- Attachment #2: Type: text/html, Size: 2749 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-31 14:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02 23:29 Patching Mandoc for IRIX Kazuo Kuroi
2020-06-22 21:44 ` Ingo Schwarze
2020-06-22 22:09   ` Kazuo Kuroi
2020-08-27 18:09     ` Ingo Schwarze
2020-08-28 19:40       ` Kazuo Kuroi
2020-08-31 14:12         ` Ingo Schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).