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

scheds: c: improve build portability #62

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

arighi
Copy link
Collaborator

@arighi arighi commented Jan 2, 2024

Improve build portability by including asm-generic/errno.h, instead of linux/errno.h.

The difference between these two headers can be summarized as following:

  • asm-generic/errno.h contains generic error code definitions that are intended to be common across different architectures,

  • linux/errno.h includes architecture-specific error codes and provides additional (or overrides) error code definitions based on the specific architecture where the code is compiled.

Considering the architecture-independent nature of scx, the advantages of being able to use architecture-specific error codes are marginal or negligible (and we should probably discourage using them).

Moving towards asm-generic/errno.h, however, allows the removal of cross-compilation dependencies (such as the gcc-multilib package in Debian/Ubuntu) and improves the code portability across various architectures and distributions.

This also allows to remove a symlink hack from the github workflow.

Improve build portability by including asm-generic/errno.h, instead of
linux/errno.h.

The difference between these two headers can be summarized as following:

  - asm-generic/errno.h contains generic error code definitions that are
    intended to be common across different architectures,

  - linux/errno.h includes architecture-specific error codes and
    provides additional (or overrides) error code definitions based on
    the specific architecture where the code is compiled.

Considering the architecture-independent nature of scx, the advantages
of being able to use architecture-specific error codes are marginal or
negligible (and we should probably discourage using them).

Moving towards asm-generic/errno.h, however, allows the removal of
cross-compilation dependencies (such as the gcc-multilib package in
Debian/Ubuntu) and improves the code portability across various
architectures and distributions.

This also allows to remove a symlink hack from the github workflow.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
@Byte-Lab Byte-Lab merged commit 620abac into sched-ext:main Jan 2, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants