-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workaround to make -flto work in nix shell
nix gcc comes with lto library, but binutils like ar doesn't seem to properly configured regarding this. The easiest workaround to make -flto work is therefore to avoid building libraries, let gcc take over everything. `CPPFLAGS += -DMLKEM_USE_NATIVE` in `mk/crypto.mk` is removed btw as it's duplicated in `mk/schemes.mk` Signed-off-by: Thing-han, Lim <[email protected]>
- Loading branch information
1 parent
78008a2
commit 8a3359e
Showing
5 changed files
with
10 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
LIBDEPS += $(LIB_DIR)/libhal.a | ||
LDLIBS += -lhal | ||
CPPFLAGS += -Itest/hal | ||
$(LIB_DIR)/libhal.a: $(call OBJS,$(wildcard test/hal/*.c)) | ||
SOURCES += $(wildcard test/hal/*.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
LDLIBS += -L$(LIB_DIR) | ||
|
||
LIBDEPS += $(LIB_DIR)/libfips202.a | ||
LDLIBS += -lfips202 | ||
CPPFLAGS += -Ifips202 -Ifips202/native | ||
|
||
FIPS202_SRCS = $(wildcard fips202/*.c) | ||
SOURCES += $(wildcard fips202/*.c) | ||
ifeq ($(OPT),1) | ||
FIPS202_SRCS += $(wildcard fips202/native/aarch64/*.S) $(wildcard fips202/native/x86_64/xkcp/*.c) | ||
CPPFLAGS += -DMLKEM_USE_NATIVE | ||
SOURCES += $(wildcard fips202/native/aarch64/*.S) $(wildcard fips202/native/x86_64/xkcp/*.c) | ||
endif | ||
|
||
$(LIB_DIR)/libfips202.a: $(call OBJS, $(FIPS202_SRCS)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters