ARM programs expecting misspelt __ARM_ARCH_6ZK__

Peter Jeremy peter at rulingia.com
Sat Sep 21 10:32:37 UTC 2019


On 2019-Sep-21 11:55:15 +0200, Warner Losh <imp at bsdimp.com> wrote:
>On Sat, Sep 21, 2019, 10:17 AM Peter Jeremy <peter at rulingia.com> wrote:
>> The options for ports would seem to be:
>> 1) Hack clang to export __ARM_ARCH_6ZK__ as well as __ARM_ARCH_6KZ__
>
>I'd prefer #1. Or a 1a that defines the bad one if the good one is defined
>in some appropriate system header. It has become a defacto API...

The definition is in contrib/llvm/tools/clang/lib/Basic/Targets/ARM.cpp:
void ARMTargetInfo::getTargetDefines(const LangOptions &Opts,
                                     MacroBuilder &Builder) const {
...
  if (!CPUAttr.empty())
    Builder.defineMacro("__ARM_ARCH_" + CPUAttr + "__");

So it probably needs special casing to export __ARM_ARCH_6ZK__ when
CPUAttr is "6KZ".

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20190921/cbb4eacd/attachment.sig>


More information about the freebsd-arm mailing list