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

Support uClibc for the tests compilations. #11600

Merged
merged 1 commit into from
Feb 17, 2021
Merged

Support uClibc for the tests compilations. #11600

merged 1 commit into from
Feb 17, 2021

Conversation

jlsalvador
Copy link
Contributor

@jlsalvador jlsalvador commented Feb 14, 2021

There are two issues that don't allow ZFS to be compiled using uClibc.
backtrace(), and program_invocation_short_name as a const.
This patch adds uClibc to the conditionals in the same way there are
already for Glibc for backtrace(); and removes the external param
program_invocation_short_name because its only used here for the
whole project.

Signed-off-by: José Luis Salvador Rufo salvador.joseluis@gmail.com


Motivation and Context

I'm trying to add ZFS as a package into the Buildroot project.
Buildroot uses uClibc by default. This patch fix the compilation process of the tests.
I'm sending these changes to upstream in order to remove the .patch file (following
the Buildroot policies around patches).

How Has This Been Tested?

Compiling Buildroot with a first version patch from here:
https://patchwork.ozlabs.org/project/buildroot/patch/20210203075440.421072-1-salvador.joseluis@gmail.com/raw/
Using GLIBC, UCLIBC, and MUSL as toolchains.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the OpenZFS code style requirements.
  • I have updated the documentation accordingly.
  • I have read the contributing document.
  • I have added tests to cover my changes.
  • I have run the ZFS Test Suite with this change applied.
  • All commit messages are properly formatted and contain [Signed-off-by]

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Feb 16, 2021
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Feb 16, 2021
There are two issues that don't allow ZFS to be compiled using uClibc.
`backtrace()`, and `program_invocation_short_name` as a `const`.
This patch adds uClibc to the conditionals in the same way there are
already for Glibc for `backtrace()`; and removes the external param
`program_invocation_short_name` because its only used here for the
whole project.

Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
@behlendorf behlendorf merged commit aef1830 into openzfs:master Feb 17, 2021
@jlsalvador jlsalvador deleted the patch-uclibc branch February 17, 2021 07:12
behlendorf pushed a commit that referenced this pull request Mar 5, 2021
There are two issues that don't allow ZFS to be compiled using uClibc.
`backtrace()`, and `program_invocation_short_name` as a `const`.
This patch adds uClibc to the conditionals in the same way there are
already for Glibc for `backtrace()`; and removes the external param
`program_invocation_short_name` because its only used here for the
whole project.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Closes #11600
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
There are two issues that don't allow ZFS to be compiled using uClibc.
`backtrace()`, and `program_invocation_short_name` as a `const`.
This patch adds uClibc to the conditionals in the same way there are
already for Glibc for `backtrace()`; and removes the external param
`program_invocation_short_name` because its only used here for the
whole project.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Closes openzfs#11600
sempervictus pushed a commit to sempervictus/zfs that referenced this pull request May 31, 2021
There are two issues that don't allow ZFS to be compiled using uClibc.
`backtrace()`, and `program_invocation_short_name` as a `const`.
This patch adds uClibc to the conditionals in the same way there are
already for Glibc for `backtrace()`; and removes the external param
`program_invocation_short_name` because its only used here for the
whole project.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Closes openzfs#11600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants