Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

basic: update the Arch tuple for LoongArch #27

Closed
wants to merge 0 commits into from
Closed

Conversation

yetist
Copy link

@yetist yetist commented Mar 10, 2022

按最新规范修改,请测试评审,谢谢。

@yetist yetist requested a review from a team March 10, 2022 13:05
Copy link

@xen0n xen0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good

@xen0n
Copy link

xen0n commented Mar 10, 2022

哦 commit message 那个 tuple 要用复数,tuples

Copy link

@xen0n xen0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-LGTM

#elif defined(__loongarch64)
# pragma message "Please update the Arch tuple of loongarch64 after psABI is stable"
#elif defined(__loongarch__)
# if defined(__loongarch32)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

查了 gcc 代码,发现这个是写错了,没有定义宏 __loongarch32https://github.com/loongson/gcc/blob/loongarch-12/gcc/config/loongarch/loongarch-c.cc

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这应该是他们的 bug 吧?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档也没有写这个

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这怎么说呢,这种内置宏的设计,应该符合人的直觉和常识才对。
现在有的前后都有双下划线,有的只有前面有双下划线,后面没有,如:__loongarch____loongarch64
还有,定义了 __loongarch64,却没有定义 __loongarch32

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

发起了一个讨论: loongson/LoongArch-Documentation#46

@yetist
Copy link
Author

yetist commented Mar 25, 2022

补丁不完整,导致测试没通过:https://github.com/systemd/systemd/runs/5686676827?check_suite_focus=true#step:4:5111

由于 32 位的 loongarch 不知道uname -m 是啥,不清楚uname那部分怎么写,所以只好把32位的先去掉了。

Copy link

@xen0n xen0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上游现在好像也只有 LA64,那这波先不加 LA32 是可以的

@yetist
Copy link
Author

yetist commented Mar 29, 2022

上游 PR 已合并:systemd#22864

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

Successfully merging this pull request may close these issues.

4 participants