fastfetch icon indicating copy to clipboard operation
fastfetch copied to clipboard

abi: new module

Open xen0n opened this issue 1 year ago • 6 comments

Support probing LoongArch ABI features at first.

On a box running Linux 6.10.6 (with the 6.11 syscall interface update backported), with the libLoL old-world compatibility solution activated:

$ ./build/fastfetch -s abi -l none  
ABI (fastfetch program): New world (ABI2.0)
ABI (LoongArch new world): Supported (Linux 6.11)
ABI (LoongArch old world): Supported (compatible)

xen0n avatar Aug 30 '24 13:08 xen0n

JSON output format:

// ./fastfetch -s abi -l none --format json
[
  {
    "type": "ABI",
    "result": {
      "compats": [
        {
          "name": "fastfetch program",
          "desc": "New world (ABI2.0)"
        },
        {
          "name": "LoongArch new world",
          "desc": "Supported (Linux 6.11)"
        },
        {
          "name": "LoongArch old world",
          "desc": "Supported (compatible)"
        }
      ],
      "features": [
        {
          "name": "new-world signals",
          "supported": true
        },
        {
          "name": "old-world signals",
          "supported": true
        },
        {
          "name": "fstat & newfstatat",
          "supported": true
        },
        {
          "name": "getrlimit & setrlimit",
          "supported": true
        }
      ]
    }
  }
]

xen0n avatar Aug 30 '24 13:08 xen0n

Hello there. Although I'm from PRC, I personally don't and maybe will never use loongson. So do major users of fastfetch. If this module is only used for Linux / loongson, I don't think it's worth merging.

CarterLi avatar Aug 30 '24 14:08 CarterLi

Hello there. Although I'm from PRC, I personally don't and maybe will never use loongson. So do major users of fastfetch. If this module is only used for Linux / loongson, I don't think it's worth merging.

https://github.com/fastfetch-cli/fastfetch/pull/1214 Linglong may have even fewer users than loongson, haven't they merged yet?

RevySR avatar Aug 30 '24 15:08 RevySR

It didn't introduce a new module, and the code was fairly simple and not platform specific.

CarterLi avatar Aug 30 '24 15:08 CarterLi

If this module is only used for Linux / loongson

Other architectures' users may benefit from it too, just that they probably won't have the "new/old world split" issue, but rather real calling conventions (think x86 x32, or RISC-V RV64ILP32). I only contributed the one support for LoongArch mainly because I only had this much free time today. Besides, I could not implement more arch support, because my work machine is LoongArch, and I don't have easy access to exotic ABI boxes of other "more popular" arches. ¯\_(ツ)_/¯

xen0n avatar Aug 30 '24 15:08 xen0n

It didn't introduce a new module, and the code was fairly simple and not platform specific.

Got it. Thanks for the answer.

RevySR avatar Aug 30 '24 15:08 RevySR