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

build system: fix compilation with LLVM [backport 2022.10] #18928

Merged
merged 2 commits into from
Nov 18, 2022

Conversation

maribu
Copy link
Member

@maribu maribu commented Nov 17, 2022

Backport of #18845

Contribution description

  • makefiles/cflags.inc.mk: add -z noexecstack to link flags
    • GCC on some platforms does need an executable stack to generate trampoline code, but use of nested functions is not allowed in RIOT's code base anyway.
  • makefiles/libc: fix wchar_t size warnings on LLVM
    • The test for the requirement of disabling wchar_t size warnings assumed that $(CC) is used for linking, instead of $(LINK). With GCC $(LINK) and $(CC) happen to be (in most cases) identical, but with LLVM they are not. This results in issues with compiling with LLVM.

Testing procedure

No change in binaries and everything should still compile.

Issues/PRs references

Inspired by #18844

GCC on some platforms does need an executable stack to generate
trampoline code, but use of nested functions is not allowed in
RIOT's code base anyway.

(cherry picked from commit 67ba1a0)
The test for the requirement of disabling wchar_t size warnings assumed
that $(CC) is used for linking, instead of $(LINK). With GCC $(LINK)
and $(CC) happen to be (in most cases) identical, but with LLVM they
are not. This results in issues with compiling with LLVM.

(cherry picked from commit 0077e9a)
@maribu maribu added Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: release backport Integration Process: The PR is a release backport of a change previously provided to master labels Nov 17, 2022
@maribu maribu requested a review from benpicco November 17, 2022 18:57
@maribu maribu enabled auto-merge November 17, 2022 18:59
@riot-ci
Copy link

riot-ci commented Nov 17, 2022

Murdock results

✔️ PASSED

158f52d makefiles/libc: fix wchar_t size warnings on LLVM

Success Failures Total Runtime
115836 0 115836 02h:04m:20s

Artifacts

This only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now.

Copy link
Contributor

@MrKevinWeiss MrKevinWeiss left a comment

Choose a reason for hiding this comment

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

ACK

@maribu maribu merged commit c33e91b into RIOT-OS:2022.10-branch Nov 18, 2022
@MrKevinWeiss
Copy link
Contributor

Hmmm... A bit late it seems 😕

@MrKevinWeiss
Copy link
Contributor

Or it just merged as soon as the ack... Cool.

@maribu
Copy link
Member Author

maribu commented Nov 18, 2022

Yes. I enablee auto merge and the ACK was the last checkbox to tick :)

@maribu maribu deleted the backport/2022.10/llvm-compat branch November 18, 2022 06:20
@maribu
Copy link
Member Author

maribu commented Nov 18, 2022

Thx :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: release backport Integration Process: The PR is a release backport of a change previously provided to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants