All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 8/9] make: avoid using host include for cross-compiling
@ 2019-09-26  7:21 Kurt Van Dijck
  0 siblings, 0 replies; only message in thread
From: Kurt Van Dijck @ 2019-09-26  7:21 UTC (permalink / raw)
  To: linux-ppp

Prepend include paths with the toolchain's sysroot directory.
In case of a non-sysroot-aware toolchain, this does not help,
but does not break either.

Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
---
 pppd/Makefile.linux | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
index 8d5ce99..12a986e 100644
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -125,7 +125,7 @@ CFLAGS   += -DHAS_SHADOW
 #LIBS     += -lshadow $(LIBS)
 endif
 
-ifneq ($(wildcard /usr/include/crypt.h),)
+ifneq ($(wildcard $(shell $CC --print-sysroot)/usr/include/crypt.h),)
 CFLAGS  += -DHAVE_CRYPT_H=1
 LIBS	+= -lcrypt
 endif
@@ -137,7 +137,7 @@ endif
 
 ifdef NEEDDES
 ifndef USE_CRYPT
-CFLAGS   += -I/usr/include/openssl
+CFLAGS   += -I$(shell $CC --print-sysroot)/usr/include/openssl
 LIBS     += -lcrypto
 else
 CFLAGS   += -DUSE_CRYPT=1
-- 
1.8.5.rc3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-26  7:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-26  7:21 [PATCH 8/9] make: avoid using host include for cross-compiling Kurt Van Dijck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.