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

sgxssl: enable pointing sgxssl build to alternative glibc headers #436

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

berrange
Copy link

@berrange berrange commented Oct 9, 2024

The enclave musts be built with headers from a specific glibc version for the sake of reproducibility. It does not actually link to glibc, merely requiring a few self contained definitions. In the NixOS build env the glibc system include directories get set through various wrapper scripts NixOS creates.

When attempting a reproducible build outside of NixOS though, we can't rely on the compiler having the matching glibc system include dirs. Instead there needs to be a way to inject "-isystem/some/path" args into the enclave compiler flags.

A related commit in the SGX SDK buildenv.mk adds support for a "ENCLAVE_SYSTEM_INCLUDES" make var that can be set by the person triggering 'make', to provide a way to inject system include directories to the enclave build process.

This commit sures that $(ENCLAVE_SYSTEM_INCLUDES) is passed on to the build of sgxssl.

The enclave musts be built with headers from a specific glibc version
for the sake of reproducibility. It does not actually link to glibc,
merely requiring a few self contained definitions. In the NixOS build
env the glibc system include directories get set through various
wrapper scripts NixOS creates.

When attempting a reproducible build outside of NixOS though, we can't
rely on the compiler having the matching glibc system include dirs.
Instead there needs to be a way to inject "-isystem/some/path" args
into the enclave compiler flags.

A related commit in the SGX SDK buildenv.mk adds support for a
"ENCLAVE_SYSTEM_INCLUDES" make var that can be set by the person
triggering 'make', to provide a way to inject system include
directories to the enclave build process.

This commit sures that $(ENCLAVE_SYSTEM_INCLUDES) is passed on to
the build of sgxssl.

Signed-off-by: Daniel P. Berrangé <[email protected]>
@berrange
Copy link
Author

berrange commented Oct 9, 2024

Note this PR has a dependency on intel/linux-sgx#1062 requiring that to be merged before this is useful

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.

1 participant