pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/59822: the pkgsrc guide is missing many compiler/target/OS macros



>Number:         59822
>Category:       pkg
>Synopsis:       the pkgsrc guide is missing many compiler/target/OS macros
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 07 21:50:00 +0000 2025
>Originator:     David A. Holland
>Release:        pkgsrc 20251207
>Organization:
Enabling Coinductive Structural Engineering with Turtles(TM)
>Environment:
irrelevant

>Description:

The lists of recommended test macros for compilers, targets, OSes, and
such in fixes.xml is missing a lot of stuff.

This is important because for many there are multiple choices and some
are more reliably available than others. This is where our collective
experience about that is supposed to be documented.

The following targets that appear in mk/platform don't have documented
recognition macros:
   - AIX
   - FreeMINT
   - HPUX
   - MidnightBSD
   - OSF/1
   - QNX
   - SCO_SV
   - Unixware

The following CPUs that we presumptively care about don't have
documented recognition macros:
   - alpha
   - m68k
   - riscv
   - sh3
   - vax

plus at least the following that we may not actually care about:
   - microblaze
   - or1k

plus unless the recommended way to detect aargh64 is __arm__ and
__LP64__, which I don't think is the case, the proper recognition
macro should be added to the arm entry.

There is also no discussion of whether __LP64__ or _LP64 or something
else is the preferred test for that, and there should also be a table
for detecting 32-on-64 configs (most notably __mips__ with __N32__).

The following _compilers_ that appear in mk/compiler have no
documented recognition macro:
   - DEC/Compaq ccc
   - clang (!)
   - distcc (not exactly a compiler but someone might reasonably want
     to detect it)
   - HP's HPUX compiler
   - the Intel x86 compiler
   - the SGI compiler
   - mipspro
   - pcc
   - IBM's XL compiler

>How-To-Repeat:

Reading.

>Fix:

I don't know what most of these are (even for things like __alpha__
vs. __ALPHA__, it's just been too long) so I mostly can't fill any of
it in myself.

My immediately available clang build produces only __riscv for RISC-V
(not __riscv__ or __RISCV__ and not e.g. __RV32__ or __RV64__). It
produces __m68k__ for M68k. I don't have runnable cross-gcc builds for
any of the above cpus at the moment.

clang also produces __clang__ (not __CLANG__, I guess that's too
loud)... but note that because clang pretends to be gcc, if you need
to test specifically for clang you need to do it first; this
discussion needs to appear in the text as well.



Home | Main Index | Thread Index | Old Index