Skip to content

Commit

Permalink
Add debug output to makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader committed Apr 21, 2021
1 parent 400009f commit 8ef3b4b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
24 changes: 24 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ ifeq ($(DETECT_FEATURES),1)
CHACHA_FLAG = $(SSE2_FLAG)
SUN_LDFLAGS += $(SSE2_FLAG)
else
# Make does not have useful debugging facilities. Show the user
# what happened by compiling again without the pipe.
$(info Running make again to see what failed)
$(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT))
SSE2_FLAG =
endif

Expand Down Expand Up @@ -477,6 +481,14 @@ ifeq ($(DETECT_FEATURES),1)
SPECK128_FLAG = -march=armv7-a -mfpu=neon
SM4_FLAG = -march=armv7-a -mfpu=neon
else
# Make does not have useful debugging facilities. Show the user
# what happened by compiling again without the pipe.
$(info Running make again to see what failed)
$(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT))
NEON_FLAG =
endif

ifeq ($(NEON_FLAG),)
CRYPTOPP_CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
endif

Expand Down Expand Up @@ -522,6 +534,14 @@ ifeq ($(DETECT_FEATURES),1)
SPECK128_FLAG = -march=armv8-a
SM4_FLAG = -march=armv8-a
else
# Make does not have useful debugging facilities. Show the user
# what happened by compiling again without the pipe.
$(info Running make again to see what failed)
$(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT))
ASIMD_FLAG =
endif

ifneq ($(ASIMD_FLAG),)
CRYPTOPP_CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
endif

Expand Down Expand Up @@ -722,6 +742,10 @@ ifeq ($(DETECT_FEATURES),1)
ifeq ($(strip $(HAVE_OPT)),0)
ALTIVEC_FLAG := $(ALTIVEC_FLAG)
else
# Make does not have useful debugging facilities. Show the user
# what happened by compiling again without the pipe.
$(info Running make again to see what failed)
$(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT))
ALTIVEC_FLAG =
endif

Expand Down
18 changes: 18 additions & 0 deletions GNUmakefile-cross
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ ifeq ($(DETECT_FEATURES),1)
ifeq ($(strip $(HAVE_OPT)),0)
CHACHA_FLAG = $(SSE2_FLAG)
else
# Make does not have useful debugging facilities. Show the user
# what happened by compiling again without the pipe.
$(info Running make again to see what failed)
$(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT))
SSE2_FLAG =
endif

Expand Down Expand Up @@ -417,7 +421,14 @@ ifeq ($(DETECT_FEATURES),1)
SPECK128_FLAG = $(NEON_FLAG)
SM4_FLAG = $(NEON_FLAG)
else
# Make does not have useful debugging facilities. Show the user
# what happened by compiling again without the pipe.
$(info Running make again to see what failed)
$(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT))
NEON_FLAG =
endif

ifeq ($(NEON_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
endif

Expand Down Expand Up @@ -477,7 +488,14 @@ ifeq ($(DETECT_FEATURES),1)
SPECK128_FLAG = $(ASIMD_FLAG)
SM4_FLAG = $(ASIMD_FLAG)
else
# Make does not have useful debugging facilities. Show the user
# what happened by compiling again without the pipe.
$(info Running make again to see what failed)
$(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT))
ASIMD_FLAG =
endif

ifeq ($(ASIMD_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
endif

Expand Down

0 comments on commit 8ef3b4b

Please sign in to comment.