-
Notifications
You must be signed in to change notification settings - Fork 98
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
Use the same patching script and command for all repos #584
Open
dcandler
wants to merge
3
commits into
ARM-software:main
Choose a base branch
from
dcandler:unified_patching
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,16 @@ | ||
|
||
# Function to generate a PATCH_COMMAND, calling the | ||
# patch_repo.py script using a target set of patches. | ||
|
||
function(get_patch_command toolchain_root patch_dir patch_command_out) | ||
set(patch_script ${toolchain_root}/cmake/patch_repo.py) | ||
list(APPEND patch_script_args ${Python3_EXECUTABLE} ${patch_script}) | ||
if(GIT_PATCH_METHOD STREQUAL "am") | ||
list(APPEND patch_script_args "--method" "am") | ||
elseif(GIT_PATCH_METHOD STREQUAL "apply") | ||
list(APPEND patch_script_args "--method" "apply") | ||
endif() | ||
list(APPEND patch_script_args ${toolchain_root}/patches/${patch_dir}) | ||
|
||
set(${patch_command_out} ${patch_script_args} PARENT_SCOPE) | ||
endfunction() |
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 |
---|---|---|
@@ -1,11 +1,40 @@ | ||
From 0e1475e5112b986ef5d9caee23dac554c749c54b Mon Sep 17 00:00:00 2001 | ||
From: David Candler <[email protected]> | ||
Date: Thu, 28 Nov 2024 15:31:35 +0000 | ||
Subject: [PATCH] Enable newlib build | ||
|
||
--- | ||
libgloss/aarch64/syscalls.c | 6 ++ | ||
libgloss/arm/cpu-init/rdimon-aem.S | 107 ++++++++++++------------ | ||
libgloss/arm/crt0.S | 2 +- | ||
libgloss/arm/linux-crt0.c | 2 +- | ||
libgloss/arm/syscalls.c | 6 +- | ||
libgloss/arm/trap.S | 2 +- | ||
libgloss/libnosys/configure | 2 +- | ||
newlib/libc/include/sys/features.h | 2 + | ||
newlib/libc/machine/aarch64/memchr.S | 6 +- | ||
newlib/libc/machine/aarch64/strchr.S | 6 +- | ||
newlib/libc/machine/aarch64/strchrnul.S | 6 +- | ||
newlib/libc/machine/aarch64/strrchr.S | 10 +-- | ||
newlib/libc/stdlib/aligned_alloc.c | 1 + | ||
newlib/libc/sys/arm/crt0.S | 2 +- | ||
newlib/libc/sys/arm/trap.S | 2 +- | ||
newlib/libm/machine/arm/sf_ceil.c | 2 +- | ||
newlib/libm/machine/arm/sf_floor.c | 2 +- | ||
newlib/libm/machine/arm/sf_nearbyint.c | 2 +- | ||
newlib/libm/machine/arm/sf_rint.c | 2 +- | ||
newlib/libm/machine/arm/sf_round.c | 2 +- | ||
newlib/libm/machine/arm/sf_trunc.c | 2 +- | ||
21 files changed, 92 insertions(+), 82 deletions(-) | ||
|
||
diff --git a/libgloss/aarch64/syscalls.c b/libgloss/aarch64/syscalls.c | ||
index 7343cc61f..2c4b63c17 100644 | ||
--- a/libgloss/aarch64/syscalls.c | ||
+++ b/libgloss/aarch64/syscalls.c | ||
@@ -172,6 +172,12 @@ newslot (void) | ||
return i; | ||
} | ||
|
||
+int __aarch64_sme_accessible() { | ||
+ int result = 0; | ||
+ asm volatile ( "mrs %x[result], id_aa64pfr1_el1" : [result]"=r"(result) : : ); | ||
|
@@ -635,3 +664,6 @@ index 64e4aeb9a..c08fa6fed 100644 | |
#include <math.h> | ||
|
||
float | ||
-- | ||
2.43.0 | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks as if
--3way
was previously unconditionally added, and now won't be added by default, because this new boolean argument defaults to off? Is that on purpose? I don't see anything in the commit message mentioning that it was.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
--3way
option has some side effects that I'm not sure were considered when it was added as the default; namely that it can seemingly apply a patch, but leave conflict markers in place. That will then cause the compile to fail, instead of flagging that there's an issue in patching. The expectation is for a user to deal with the conflicts, so it's less useful in an automated context. Using--3way
shouldn't be necessary from what I've tried (and indeed the newlib patch command never used it), so I removed it from the default but left the option to enable it in the script.I'll update the commit message when squashing to mention all this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine – that makes sense. If it's disabled on purpose and you say why, I'm happy.