From 8ef3b4b8e78578c31c2d8a30f316e8f32cfb30e7 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 21 Apr 2021 09:55:48 -0400 Subject: [PATCH] Add debug output to makefiles --- GNUmakefile | 24 ++++++++++++++++++++++++ GNUmakefile-cross | 18 ++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/GNUmakefile b/GNUmakefile index aab4e3b8f..e310d2d37 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/GNUmakefile-cross b/GNUmakefile-cross index 630598e1d..0245be667 100644 --- a/GNUmakefile-cross +++ b/GNUmakefile-cross @@ -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 @@ -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 @@ -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