Skip to content

Commit de64220

Browse files
committed
sgxssl: enable pointing sgxssl build to alternative glibc headers
The enclaves must be built with headers from a specific glibc version for the sake of reproducibility. They do 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 ensures that $(ENCLAVE_SYSTEM_INCLUDES) is passed on to the build of sgxssl. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
1 parent 72c70d6 commit de64220

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

QuoteVerification/prepare_sgxssl.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ fi
6767

6868
pushd $sgxssl_dir/Linux/
6969
if [[ "$*" == *SERVTD_ATTEST* ]];then
70-
make clean sgxssl_no_mitigation NO_THREADS=1 LINUX_SGX_BUILD=2 SERVTD_ATTEST=1
70+
make clean sgxssl_no_mitigation ENCLAVE_SYSTEM_INCLUDES="$ENCLAVE_SYSTEM_INCLUDES" NO_THREADS=1 LINUX_SGX_BUILD=2 SERVTD_ATTEST=1
7171
else
7272
if [[ "$*" == *FIPS* ]];then
73-
make clean sgxssl_no_mitigation FIPS=1
73+
make clean sgxssl_no_mitigation ENCLAVE_SYSTEM_INCLUDES="$ENCLAVE_SYSTEM_INCLUDES" FIPS=1
7474
else
75-
make clean sgxssl_no_mitigation
75+
make clean sgxssl_no_mitigation ENCLAVE_SYSTEM_INCLUDES="$ENCLAVE_SYSTEM_INCLUDES"
7676
fi
7777
fi
7878
popd

0 commit comments

Comments
 (0)