-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
llext: move all flags to compiler specific cmake files
Minimize the amount of flags that are hardcoded in the llext.cmake module by moving them to the compiler specific cmake files. The llext.cmake module will now use the new LLEXT_REMOVE_FLAGS and LLEXT_APPEND_FLAGS global variables to adjust the set of flags used to compile the llext code. This will make it easier to add support for new architectures and compilers. Signed-off-by: Luca Burelli <[email protected]>
- Loading branch information
1 parent
feee017
commit c5b7aab
Showing
5 changed files
with
74 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Flags not supported by llext linker | ||
# (regexps are supported and match whole word) | ||
set(LLEXT_REMOVE_FLAGS | ||
-fno-pic | ||
-fno-pie | ||
-ffunction-sections | ||
-fdata-sections | ||
-g.* | ||
-Os | ||
-mcpu=.* | ||
) | ||
|
||
# Flags to be added to llext code compilation | ||
set(LLEXT_APPEND_FLAGS | ||
-fPIC | ||
-nostdlib | ||
-nodefaultlibs | ||
-shared | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters