intel / linux-sgx

Intel SGX for Linux*
https://www.intel.com/content/www/us/en/developer/tools/software-guard-extensions/linux-overview.html
Other
1.34k stars 548 forks source link

Compiler version comparison logic may not be valid #887

Open BornThisWay opened 2 years ago

BornThisWay commented 2 years ago

https://github.com/intel/linux-sgx/blob/4887b30b519d7bfc9f5de6e6330bc0034cce3d75/SampleCode/LocalAttestation/EnclaveInitiator/Makefile#L82

On my machine, shouldn't the result be 0?

[root@localhost linux-sgx-sgx_2.15.1]# expr "`cc -dumpversion`" \< "4.9"
1
[root@localhost linux-sgx-sgx_2.15.1]# cc -dumpversion
10.3.1
lzha101 commented 2 years ago

Yes. This version check should be updated, similar as the top buildenv.mk https://github.com/intel/linux-sgx/blob/4887b30b519d7bfc9f5de6e6330bc0034cce3d75/buildenv.mk#L90-L94