Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abi: new module #1231

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

abi: new module #1231

wants to merge 1 commit into from

Conversation

xen0n
Copy link

@xen0n xen0n commented Aug 30, 2024

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)

Support probing LoongArch ABI features at first.
@xen0n
Copy link
Author

xen0n commented Aug 30, 2024

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

@CarterLi
Copy link
Member

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.

@RevySR
Copy link

RevySR commented Aug 30, 2024

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.

#1214
Linglong may have even fewer users than loongson, haven't they merged yet?

@CarterLi
Copy link
Member

CarterLi commented Aug 30, 2024

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

@xen0n
Copy link
Author

xen0n commented Aug 30, 2024

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. ¯\_(ツ)_/¯

@RevySR
Copy link

RevySR commented Aug 30, 2024

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

Got it. Thanks for the answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants