[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250203073610.206000-1-david.engraf@sysgo.com>
Date: Mon, 3 Feb 2025 08:36:10 +0100
From: David Engraf <david.engraf@...go.com>
To: jpoimboe@...nel.org,
peterz@...radead.org
Cc: linux-kernel@...r.kernel.org,
David Engraf <david.engraf@...go.com>
Subject: [PATCH] objtool: Hide unnecessary compiler error message
The check for using old libelf prints an error message when libelf.h is
not available but does not abort. This may confuse so hide the compiler
error message.
Signed-off-by: David Engraf <david.engraf@...go.com>
---
tools/objtool/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index f56e277275341..38609e3612ba1 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -37,7 +37,7 @@ OBJTOOL_CFLAGS := -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBE
OBJTOOL_LDFLAGS := $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
# Allow old libelf to be used:
-elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(HOSTCC) $(OBJTOOL_CFLAGS) -x c -E - | grep elf_getshdr)
+elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(HOSTCC) $(OBJTOOL_CFLAGS) -x c -E - 2>/dev/null | grep elf_getshdr)
OBJTOOL_CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
# Always want host compilation.
--
2.43.0
Powered by blists - more mailing lists