Rust::com fix for aarche64 gcc build for rust example file#329
Rust::com fix for aarche64 gcc build for rust example file#329bharatGoswami8 wants to merge 1 commit intoeclipse-score:mainfrom
Conversation
75ea18a to
8d37dcd
Compare
8d37dcd to
4d440fc
Compare
LittleHuba
left a comment
There was a problem hiding this comment.
This should also be added to the examples/.bazelrc
I would also ask that you open a bug ticket in the toolchain. Such workarounds should not be a longterm solution.
NEOatNHNG
left a comment
There was a problem hiding this comment.
Fine as a workaround for now, but probably we should fix this is in the score rust toolchain, right?
597b627 to
f0db6bd
Compare
@LittleHuba , Created ticket on score rust toolchain. |
56e84ad to
1d574f9
Compare
* Added rustc flag for build
1d574f9 to
183b955
Compare
|
|
||
| common --@score_communication//score/mw/com/flags:tracing_library=@score_baselibs//score/analysis/tracing/generic_trace_library/stub_implementation | ||
|
|
||
| common --@rules_rust//:extra_rustc_flags=-Clink-arg=-no-pie,-Clink-arg=-lgcc |
There was a problem hiding this comment.
I think this is going in the wrong direction. We should instead enable PIC compatible builds.
From what I see the issues about relocation come from ACL.
Can you create a bugticket in baselibs, that the ACL library must be provided with -fPIC?
There was a problem hiding this comment.
I think this is not just ACL library issue, it is a score aarch64 GCC toolchain tool-chain issuw which build without --enable-default-pie.
Because if resolve in ACL next static library may have same kind of issue.
There was a problem hiding this comment.
If keeping no-pie flag on tool-chain is not a ideal solution then we can move to user level - #361
There was a problem hiding this comment.
As discussed created ticket for ACL lib in baselibs - eclipse-score/baselibs#172
|
|
||
| common --@score_communication//score/mw/com/flags:tracing_library=@score_baselibs//score/analysis/tracing/generic_trace_library/stub_implementation | ||
|
|
||
| common --@rules_rust//:extra_rustc_flags=-Clink-arg=-no-pie,-Clink-arg=-lgcc |
There was a problem hiding this comment.
Regarding the linkage to gcc, we have to investigate further.
I'd first check whether bumping the toolchain version helps here. @nradakovic mentioned in a talk that they link libgcc. Maybe we are on a version that does not yet do that.
We need to look at the bazel subcommands to investigate.
Can you please do a bazel run with the flag -s and post the logs here?
There was a problem hiding this comment.
I have added logs in the mentioned ticket as a comment - #328 (comment)
Bug: Compilation of rust applications for linux_aarch64 leads to linker error #328