From 3dcb7063c56a9119cb7e2e2c4c56bdc4d3b2d28a Mon Sep 17 00:00:00 2001 Message-Id: <3dcb7063c56a9119cb7e2e2c4c56bdc4d3b2d28a.1659770551.git.github@sicherha.de> In-Reply-To: References: From: Christoph Erhardt Date: Sat, 6 Aug 2022 09:18:54 +0200 Subject: [PATCH 2/2] Use system-compatible include path for `xxhash.h` Distributors that build mold against the system-provided xxHash package expect its header file `xxhash.h` in the top-level include directory, not in an `xxhash` subdirectory. Adjust the include path and the `#include` directive accordingly. --- Makefile | 3 ++- mold.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b19c34c0..0f66c6df 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,8 @@ CFLAGS = -O2 CXXFLAGS = -O2 MOLD_CXXFLAGS := -std=c++20 -fno-exceptions -fno-unwind-tables \ - -fno-asynchronous-unwind-tables -Ithird-party \ + -fno-asynchronous-unwind-tables \ + -Ithird-party -Ithird-party/xxhash \ -DMOLD_VERSION=\"$(VERSION)\" -DLIBDIR="\"$(LIBDIR)\"" MOLD_LDFLAGS := -pthread -lz -lm -ldl diff --git a/mold.h b/mold.h index 9464d8ad..b6478960 100644 --- a/mold.h +++ b/mold.h @@ -27,7 +27,7 @@ #include #define XXH_INLINE_ALL 1 -#include +#include #ifdef NDEBUG # define unreachable() __builtin_unreachable() -- 2.37.1