Skip to content

compiler-rt: __aarch64_*_sync functions not available #63483

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

Closed
emaste opened this issue Jun 23, 2023 · 5 comments · Fixed by llvm/llvm-project-release-prs#684
Closed

compiler-rt: __aarch64_*_sync functions not available #63483

emaste opened this issue Jun 23, 2023 · 5 comments · Fixed by llvm/llvm-project-release-prs#684

Comments

@emaste
Copy link
Member

emaste commented Jun 23, 2023

Attempting to build FreeBSD with GCC 12 and in-tree compiler-rt 16 fails with:

/usr/local/bin/aarch64-unknown-freebsd13.1-ld: heimbase.pico: in function `_heim_create_type':
/tmp/cirrus-ci-build/crypto/heimdal/base/heimbase.c:281: undefined reference to `__aarch64_ldadd4_sync'
/usr/local/bin/aarch64-unknown-freebsd13.1-ld: heimbase.pico: in function `heim_retain':
/tmp/cirrus-ci-build/crypto/heimdal/base/heimbase.c:97: undefined reference to `__aarch64_ldadd4_sync'
/usr/local/bin/aarch64-unknown-freebsd13.1-ld: heimbase.pico: in function `heim_release':
/tmp/cirrus-ci-build/crypto/heimdal/base/heimbase.c:120: undefined reference to `__aarch64_ldadd4_sync'
collect2: error: ld returned 1 exit status
@jrtc27
Copy link
Collaborator

jrtc27 commented Aug 17, 2023

@sebpop compiler-rt's LSE implementation is an adaptation of libgcc's, relicensed by Linaro. Given you authored gcc-mirror/gcc@bc25483 to add them to GCC, would you be willing to relicense it as Apache-2.0 WITH LLVM-exception for inclusion within compiler-rt, please? If so I'm happy to pick up getting it through Phab.

@sebpop
Copy link
Contributor

sebpop commented Aug 22, 2023

Yes, please adapt the code from my patch gcc-mirror/gcc@bc25483 to compiler-rt and please use an appropriate license for that. Thank you.

@jrtc27 jrtc27 closed this as completed in 4bb2416 Sep 4, 2023
@jrtc27 jrtc27 added this to the LLVM 17.0.X Release milestone Sep 4, 2023
@jrtc27 jrtc27 reopened this Sep 4, 2023
@jrtc27
Copy link
Collaborator

jrtc27 commented Sep 4, 2023

/cherry-pick 4bb2416

@llvmbot
Copy link
Member

llvmbot commented Sep 4, 2023

/branch llvm/llvm-project-release-prs/issue63483

llvmbot pushed a commit to llvm/llvm-project-release-prs that referenced this issue Sep 4, 2023
Whilst Clang does not use these, recent GCC does, and so on systems such
as FreeBSD that wish to use compiler-rt as the system runtime library
but also wish to support building programs with GCC these interfaces are
needed.

This is a light adaptation of the code committed to GCC by Sebastian Pop
<[email protected]>, relicensed with permission for use in compiler-rt.

Fixes llvm/llvm-project#63483

Reviewed By: sebpop, MaskRay

Differential Revision: https://reviews.llvm.org/D158536

(cherry picked from commit 4bb2416d42eb593c44bbeb765e1b8641a58f853c)
@llvmbot
Copy link
Member

llvmbot commented Sep 4, 2023

/pull-request llvm/llvm-project-release-prs#684

@github-project-automation github-project-automation bot moved this to Needs Triage in LLVM Release Status Sep 5, 2023
@tru tru moved this from Needs Triage to Needs Review in LLVM Release Status Sep 5, 2023
@jrtc27 jrtc27 reopened this Sep 5, 2023
tru pushed a commit to llvm/llvm-project-release-prs that referenced this issue Sep 11, 2023
Whilst Clang does not use these, recent GCC does, and so on systems such
as FreeBSD that wish to use compiler-rt as the system runtime library
but also wish to support building programs with GCC these interfaces are
needed.

This is a light adaptation of the code committed to GCC by Sebastian Pop
<[email protected]>, relicensed with permission for use in compiler-rt.

Fixes llvm/llvm-project#63483

Reviewed By: sebpop, MaskRay

Differential Revision: https://reviews.llvm.org/D158536

(cherry picked from commit 4bb2416d42eb593c44bbeb765e1b8641a58f853c)
@tru tru moved this from Needs Review to Done in LLVM Release Status Sep 11, 2023
avillega pushed a commit to avillega/llvm-project that referenced this issue Sep 11, 2023
Whilst Clang does not use these, recent GCC does, and so on systems such
as FreeBSD that wish to use compiler-rt as the system runtime library
but also wish to support building programs with GCC these interfaces are
needed.

This is a light adaptation of the code committed to GCC by Sebastian Pop
<[email protected]>, relicensed with permission for use in compiler-rt.

Fixes llvm#63483

Reviewed By: sebpop, MaskRay

Differential Revision: https://reviews.llvm.org/D158536
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this issue Sep 11, 2023
  [builtins][AArch64] Implement _sync out-of-line atomics

  Whilst Clang does not use these, recent GCC does, and so on systems such
  as FreeBSD that wish to use compiler-rt as the system runtime library
  but also wish to support building programs with GCC these interfaces are
  needed.

  This is a light adaptation of the code committed to GCC by Sebastian Pop
  <[email protected]>, relicensed with permission for use in compiler-rt.

  Fixes llvm/llvm-project#63483

  Reviewed By: sebpop, MaskRay

  Differential Revision: https://reviews.llvm.org/D158536

Reviewed by:	dim
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D41716

(cherry picked from commit 8524dc5)
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this issue Sep 11, 2023
  [builtins][AArch64] Implement _sync out-of-line atomics

  Whilst Clang does not use these, recent GCC does, and so on systems such
  as FreeBSD that wish to use compiler-rt as the system runtime library
  but also wish to support building programs with GCC these interfaces are
  needed.

  This is a light adaptation of the code committed to GCC by Sebastian Pop
  <[email protected]>, relicensed with permission for use in compiler-rt.

  Fixes llvm/llvm-project#63483

  Reviewed By: sebpop, MaskRay

  Differential Revision: https://reviews.llvm.org/D158536

Reviewed by:	dim
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D41716

(cherry picked from commit 8524dc5)
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this issue Sep 11, 2023
  [builtins][AArch64] Implement _sync out-of-line atomics

  Whilst Clang does not use these, recent GCC does, and so on systems such
  as FreeBSD that wish to use compiler-rt as the system runtime library
  but also wish to support building programs with GCC these interfaces are
  needed.

  This is a light adaptation of the code committed to GCC by Sebastian Pop
  <[email protected]>, relicensed with permission for use in compiler-rt.

  Fixes llvm/llvm-project#63483

  Reviewed By: sebpop, MaskRay

  Differential Revision: https://reviews.llvm.org/D158536

Reviewed by:	dim
Approved by:	re (gjb)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D41716

(cherry picked from commit 8524dc5)
(cherry picked from commit 2f269a3)
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this issue Feb 2, 2024
  [builtins][AArch64] Implement _sync out-of-line atomics

  Whilst Clang does not use these, recent GCC does, and so on systems such
  as FreeBSD that wish to use compiler-rt as the system runtime library
  but also wish to support building programs with GCC these interfaces are
  needed.

  This is a light adaptation of the code committed to GCC by Sebastian Pop
  <[email protected]>, relicensed with permission for use in compiler-rt.

  Fixes llvm/llvm-project#63483

  Reviewed By: sebpop, MaskRay

  Differential Revision: https://reviews.llvm.org/D158536

Reviewed by:	dim
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D41716
qihangkong pushed a commit to rvgpu/llvm that referenced this issue Apr 18, 2024
Whilst Clang does not use these, recent GCC does, and so on systems such
as FreeBSD that wish to use compiler-rt as the system runtime library
but also wish to support building programs with GCC these interfaces are
needed.

This is a light adaptation of the code committed to GCC by Sebastian Pop
<[email protected]>, relicensed with permission for use in compiler-rt.

Fixes llvm/llvm-project#63483

Reviewed By: sebpop, MaskRay

Differential Revision: https://reviews.llvm.org/D158536
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

5 participants