-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Bug xxx crypto pkg openssl clang asm file fix #10634
base: master
Are you sure you want to change the base?
Bug xxx crypto pkg openssl clang asm file fix #10634
Conversation
a85ae47
to
8ff353d
Compare
009ca2a
to
93f4874
Compare
would you please fix the conflict? |
93f4874
to
b6bd181
Compare
PR #10687 was merged that consolidated the CLANG and GCC linker scripts to the GccBase.lds that was not discarding the COMMON sections. The commit in this PR to prevent COMMON section removal has been removed and this PR has been rebased. |
Update the CryptoPkg to support CLANGPDB and CLANGDWARF from both Windows and Linux host environments. * Add PcdOpensslLibAssemblySourceStyleNasm to select the correct optimized assembly source style for OpensslLib for IA32/X64. NASM style is for MSFT and CLANGPDB. GAS style is for GCC. Use this PCD in OpensslLibAccel.inf and OpensslLibFullAccel.inf to select between .nasm and .S files. * Add intrinsic functions required by CLANG IA32/X64 builds. * __ashlti3 * __lshrdi3 * Disable warning -Wno-error=unused-function for CLANG build compatibility * Set -D OPENSSL_NO_INLINE_ASM for CLANG build compatibility * Update TestBaseCryptLib to split out the implementation of main() into its own C file that is only use for host-based unit tests. This is due to CLANGPDB for host environments injecting a __main() call that can only be resolved in host based builds that link against host libraries. * Update Configure.py to update IA32/X64 [Sources] sections with feature flag expressions using the new PCD PcdOpensslLibAssemblySourceStyleNasm. Signed-off-by: Michael D Kinney <[email protected]>
b6bd181
to
9818368
Compare
@jyao1 @liyi77 I pushed one more update that was required to build The fix was to move |
This change looks fine to me, thanks. |
Description
Update the CryptoPkg to support CLANGPDB and CLANGDWARF from
both Windows and Linux host environments.
optimized assembly source style for OpensslLib for IA32/X64.
NASM style is for MSFT and CLANGPDB. GAS style is for GCC.
Use this PCD in OpensslLibAccel.inf and OpensslLibFullAccel.inf
to select between .nasm and .S files.
compatibility
main() into its own C file that is only use for host-based
unit tests. This is due to CLANGPDB for host environments
injecting a __main() call that can only be resolved in host
based builds that link against host libraries.
with feature flag expressions using the new PCD
PcdOpensslLibAssemblySourceStyleNasm.
Align CLANG and GCC linker scripts to not discard COMMON
sections for CLANG builds. If COMMON sections are discarded,
then global variables from optimized OpensslLib assembly
source files are removed and results in symbol not found
errors.
OpesslLibAccel.inf
orOpensslLibFullAccel.inf
must add the following statement to select the correct asm source files:How This Was Tested
Build CryptoPkg on Windows using VS2022, CLANGPDB and CLANGDWARF for IA32/X64 for DEBUG/RELEASE/NOOPT
Build CryptoPkg on Linux using GCC, GCC5, CLANGPDB and CLANGDWARF for IA32/X64 for DEBUG/RELEASE/NOOPT
Integration Instructions
Platform DSC file should add the following to support all OpensslLib instances