pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mk
Module Name: pkgsrc
Committed By: riastradh
Date: Fri Jan 26 03:16:58 UTC 2024
Modified Files:
pkgsrc/mk: endian.mk
Log Message:
mk/endian.mk: Make this work for cross-builds.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 pkgsrc/mk/endian.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/mk/endian.mk
diff -u pkgsrc/mk/endian.mk:1.10 pkgsrc/mk/endian.mk:1.11
--- pkgsrc/mk/endian.mk:1.10 Wed May 21 01:43:50 2014
+++ pkgsrc/mk/endian.mk Fri Jan 26 03:16:58 2024
@@ -1,4 +1,4 @@
-# $NetBSD: endian.mk,v 1.10 2014/05/21 01:43:50 obache Exp $
+# $NetBSD: endian.mk,v 1.11 2024/01/26 03:16:58 riastradh Exp $
#
# Determine the endianness of the platform by checking header files.
#
@@ -27,6 +27,11 @@ BUILTIN_FIND_HEADERS._ENDIAN_H= endian.h
_ENDIAN_H= /dev/null
. endif
+_MACHINE_ENDIAN_CPP= ${CCPATH:U${CC}} -E -
+.if ${TOOLS_USE_CROSS_COMPILE:tl} == "yes"
+_MACHINE_ENDIAN_CPP+= --sysroot=${TOOLS_CROSS_DESTDIR:Q}
+.endif
+
MACHINE_ENDIAN!= \
{ ${ECHO} "\#if defined(__sgi)"; \
${ECHO} "\# include <standards.h>"; \
@@ -39,7 +44,7 @@ MACHINE_ENDIAN!= \
${ECHO} "\#define BYTE_ORDER 1234"; \
${ECHO} "\#endif"; \
${ECHO} "\#endif"; \
- ${ECHO} "BYTE_ORDER"; } | ${CCPATH:U${CC}} -E - | \
+ ${ECHO} "BYTE_ORDER"; } | ${_MACHINE_ENDIAN_CPP} | \
{ while read line; do \
case $$line in \
1234) ${ECHO} "little"; exit 0 ;; \
Home |
Main Index |
Thread Index |
Old Index