discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kazuo Kuroi <kazuo@irixnet.org>
To: discuss@mandoc.bsd.lv
Subject: Patching Mandoc for IRIX
Date: Tue, 2 Jun 2020 19:29:52 -0400	[thread overview]
Message-ID: <aa6e83e2-fe72-d7c2-2f66-de849ea9df63@irixnet.org> (raw)

[-- 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 --]

             reply	other threads:[~2020-06-02 23:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02 23:29 Kazuo Kuroi [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aa6e83e2-fe72-d7c2-2f66-de849ea9df63@irixnet.org \
    --to=kazuo@irixnet.org \
    --cc=discuss@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).