Skip to content

Commit b1e1b2e

Browse files
committed
WIP: figure more general mechanism to build ipp crypto
When building SDK & IPP Crypto from source with nix, the current check for the IPP source code does not work properly. That is, even though the IPP Crypto source code is there the check in the Makefile triggers the call to the ipp_source target which invokes git to update the submodule or clone the repo. In the context of a nix derivation, the source code along with the submodules is fetch at the beginning and the .git directory is removed, such that later invocations to git commands such as the one in the Makefile for the ipp_source target, fail. Also, depending on the environment, NIX_PATH may not be set and is therefore too restrictive as a check or assumes too much. A more general mechanism would be preferable. Signed-off-by: Sylvain Bellemare <[email protected]>
1 parent e592908 commit b1e1b2e

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

external/ippcp_internal/Makefile

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ DIR = $(CURDIR)
3636
IPP_CONFIG = -Bbuild -DCMAKE_VERBOSE_MAKEFILE=on
3737

3838
# Ignore the CMAKE C/C++ compiler check to avoid conflicts with mitigation options
39-
IPP_CONFIG += -DCMAKE_C_COMPILER_WORKS=TRUE -DCMAKE_CXX_COMPILER_WORKS=TRUE
39+
IPP_CONFIG += -DCMAKE_C_COMPILER_WORKS=TRUE -DCMAKE_CXX_COMPILER_WORKS=TRUE
4040
IPP_SOURCE = ipp-crypto
4141
ARCH = intel64
4242
IPP_CONFIG += -DARCH=$(ARCH)
@@ -59,13 +59,21 @@ else ifeq ($(MITIGATION-CVE-2020-0551), CF)
5959
endif
6060
OUT_DIR = lib/linux/$(ARCH)/$(SUB_DIR)/
6161

62+
#CHECK_SOURCE :=
63+
## For reproducibility build in docker, the code should be
64+
## prepared before build. So skip the code check to avoid
65+
## triggering network request
66+
#ifneq ($(origin NIX_PATH), environment)
67+
#CHECK_SOURCE:= ipp_source
68+
#endif
69+
# FIXME temporary workaround for nix derivation
70+
# Why can't IPP simply be a dependency like any other dependency?
71+
# IPP library is a git submodule which must be init
6272
CHECK_SOURCE :=
63-
# For reproducibility build in docker, the code should be
64-
# prepared before build. So skip the code check to avoid
65-
# triggering network request
66-
ifneq ($(origin NIX_PATH), environment)
67-
CHECK_SOURCE:= ipp_source
68-
endif
73+
#ifeq ("$(wildcard $(LINUX_EXTERNAL_DIR)/ippcp_internal/ipp_crypto)", "")
74+
#CHECK_SOURCE := ipp_source
75+
#endif
76+
6977

7078
.PHONY: all build_ipp
7179
all: build_ipp

0 commit comments

Comments
 (0)