Add handling for compilation failures of list-syscalls.c#138
Merged
hrw merged 1 commit intohrw:masterfrom Apr 29, 2026
Merged
Conversation
78a4c9c to
a3195f4
Compare
hrw
requested changes
Apr 29, 2026
hrw
requested changes
Apr 29, 2026
a3195f4 to
8398079
Compare
Since no error checking was previously being performed on the gcc
command that generates the list-syscalls executable, delete the
list-syscalls.c and list-syscalls executable between architecture
iterations. Also, add an "if succeeded" around the execution of
./list-syscalls to avoid an execution error. Adding these checks
ensures that a previous architecture's list-syscalls isn't
erroneously used for an architecture that fails to compile.
Without this patch, the previous architecture's (i386's)
list-syscalls was erroneously used for x32, and thus the i386
syscalls and syscall numbers were being placed in the x32 table.
This was motivated by trying to compile x32 on a Fedora x86_64
system. The Fedora kernel currently doesn't support x32 [1].
I was unable to find a Fedora userspace package that provides
stubs-x32.h, and various internet discussions mention that x32
is _not_ supported by Fedora.
Below is the gcc error when compiling x32 on Fedora that is being
suppressed:
In file included from /usr/include/features.h:535,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from list-syscalls.c:2:
/usr/include/gnu/stubs.h:13:11: fatal error: gnu/stubs-x32.h: No such file or directory
13 | # include <gnu/stubs-x32.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
[1] https://src.fedoraproject.org/rpms/kernel/blob/rawhide/f/kernel-x86_64-fedora.config#_9367
Signed-off-by: Tom Hromatka (Oracle) <tom.hromatka@gmail.com>
8398079 to
57f785c
Compare
Owner
|
Thanks for changes! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Since no error checking was previously being performed on the gcc command that generates the list-syscalls executable, delete the list-syscalls.c and list-syscalls executable between architecture iterations. Also, add an "if succeeded" around the execution of ./list-syscalls to avoid an execution error. Adding these checks ensures that a previous architecture's list-syscalls isn't erroneously used for an architecture that fails to compile.
Without this patch, the previous architecture's (i386's) list-syscalls was erroneously used for x32, and thus the i386 syscalls and syscall numbers were being placed in the x32 table.
This was motivated by trying to compile x32 on a Fedora x86_64 system. The Fedora kernel currently doesn't support x32 [1]. I was unable to find a Fedora userspace package that provides stubs-x32.h, and various internet discussions mention that x32 is not supported by Fedora.
Below is the gcc error when compiling x32 on Fedora that is being suppressed:
[1] https://src.fedoraproject.org/rpms/kernel/blob/rawhide/f/kernel-x86_64-fedora.config#_9367