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

Loongarch: Add Loongarch port #1406

Closed
wants to merge 1 commit into from
Closed

Loongarch: Add Loongarch port #1406

wants to merge 1 commit into from

Conversation

Panxuefeng-loongson
Copy link
Contributor

This patch adds support for the LoongArch architecture

Note: libffi code is copy from https://github.com/loongson/libffi

This patch adds support for the LoongArch architecture

Note: libffi code is copy from https://github.com/loongson/libffi
Copy link
Member

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

Thank you and sorry for the late review. I would prefer if the loongarch changes could flow through libffi first. If the change is merged to upstream libffi, we can update to a current copy of libffi. Carrying custom patches for libffi in the JNA repository is a reality, but also problematic and should be kept to a minimum.

Is the upstream integration already done?

OS_PLATFORM = $(shell uname -m)
ifeq ($(OS_PLATFORM), loongarch64)
LDFLAGS += -Wl,-z,noexecstack
endif
Copy link
Member

Choose a reason for hiding this comment

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

This look broken as for example android and at least windows aarch64 are crossbuild, so the local platform should not affect the build. Also the other architectures have no similar treatment and mips64 should not even be touched, as this is targetted for loongarch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This look broken as for example android and at least windows aarch64 are crossbuild, so the local platform should not affect the build. Also the other architectures have no similar treatment and mips64 should not even be touched, as this is targetted for loongarch.

My fault. I will revise it

@Panxuefeng-loongson
Copy link
Contributor Author

Thank you and sorry for the late review. I would prefer if the loongarch changes could flow through libffi first. If the change is merged to upstream libffi, we can update to a current copy of libffi. Carrying custom patches for libffi in the JNA repository is a reality, but also problematic and should be kept to a minimum.

Is the upstream integration already done?

Thanks for your reply. The change is is not merge to upstream yet, but I am trying to do it.

@theaoqi
Copy link
Contributor

theaoqi commented Feb 24, 2022

FYI, JNA loongarch64 port is maintained at https://github.com/loongson/jna before the port is accepted by JNA upstream.

@theaoqi
Copy link
Contributor

theaoqi commented May 25, 2022

LoongArch port has been merged to upstream libffi, libffi/libffi@f259a6f.

@dbwiddis
Copy link
Contributor

LoongArch port has been merged to upstream libffi, libffi/libffi@f259a6f.

Should we not re-open this issue then, and consider using the port to generate a PR?

@Panxuefeng-loongson
Copy link
Contributor Author

LoongArch port has been merged to upstream libffi, libffi/libffi@f259a6f.

Should we not re-open this issue then, and consider using the port to generate a PR?

I think so. I want to open a new pr to continue my job.

@theaoqi
Copy link
Contributor

theaoqi commented May 25, 2022

Just for the record: #1440

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.

None yet

4 participants