Skip to content

Commit 45379c1

Browse files
committed
Remove NIX_PATH check for ipp-crypto build
Instead just check if the submodule is empty, and if it is then proceed as it was done before. A better approach could be to not only verify if the ipp-crypto submodule is not empty but to check that it is up-to-date, and if it is either empty or out-of-date then proceed as before, meaning, init the submodule, or clone. An even better approach: why not have ipp-crypto as an external dependency like any other dependency? Perhaps there are good reasons not to do so.
1 parent 1e00adf commit 45379c1

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

external/ippcp_internal/Makefile

Lines changed: 14 additions & 6 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,14 +59,22 @@ 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
73+
ifeq ("$(wildcard $(LINUX_EXTERNAL_DIR)/ippcp_internal/ipp_crypto)", "")
74+
CHECK_SOURCE := ipp_source
6875
endif
6976

77+
7078
.PHONY: all build_ipp
7179
all: build_ipp
7280
# copy the built out lib, header files and license to the target folder

0 commit comments

Comments
 (0)