Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153127874
D16771.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D16771.diff
View Options
Index: head/contrib/elftoolchain/common/_elftc.h
===================================================================
--- head/contrib/elftoolchain/common/_elftc.h
+++ head/contrib/elftoolchain/common/_elftc.h
@@ -374,11 +374,14 @@
#include <libkern/OSByteOrder.h>
#define htobe32(x) OSSwapHostToBigInt32(x)
+#define htole32(x) OSSwapHostToLittleInt32(x)
+#ifndef roundup2
#define roundup2 roundup
+#endif
-#define ELFTC_BYTE_ORDER _BYTE_ORDER
-#define ELFTC_BYTE_ORDER_LITTLE_ENDIAN _LITTLE_ENDIAN
-#define ELFTC_BYTE_ORDER_BIG_ENDIAN _BIG_ENDIAN
+#define ELFTC_BYTE_ORDER __DARWIN_BYTE_ORDER
+#define ELFTC_BYTE_ORDER_LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN
+#define ELFTC_BYTE_ORDER_BIG_ENDIAN __DARWIN_BIG_ENDIAN
#define ELFTC_HAVE_MMAP 1
#define ELFTC_HAVE_STRMODE 1
@@ -418,7 +421,9 @@
/* Whether we need to supply {be,le}32dec. */
#define ELFTC_NEED_BYTEORDER_EXTENSIONS 1
+#ifndef roundup2
#define roundup2 roundup
+#endif
#endif /* __GLIBC__ || __linux__ */
Index: head/contrib/elftoolchain/libelftc/elftc_set_timestamps.c
===================================================================
--- head/contrib/elftoolchain/libelftc/elftc_set_timestamps.c
+++ head/contrib/elftoolchain/libelftc/elftc_set_timestamps.c
@@ -37,7 +37,7 @@
* stat'.
*/
-#if defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
#define ATIME st_atimespec
#define MTIME st_mtimespec
#define LIBELFTC_HAVE_UTIMES 1
Index: head/lib/libelf/Makefile
===================================================================
--- head/lib/libelf/Makefile
+++ head/lib/libelf/Makefile
@@ -79,6 +79,13 @@
#
SRCS+= sys/elf32.h sys/elf64.h sys/elf_common.h
+# Allow bootstrapping elftoolchain on Linux:
+.if defined(BOOTSTRAPPING) && ${.MAKE.OS} == "Linux"
+native-elf-format.h:
+ ${ELFTCDIR}/common/native-elf-format > ${.TARGET} || rm ${.TARGET}
+SRCS+= native-elf-format.h
+.endif
+
GENSRCS= libelf_fsize.c libelf_msize.c libelf_convert.c
CLEANFILES= ${GENSRCS}
CLEANDIRS= sys
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 8:45 AM (11 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31828833
Default Alt Text
D16771.diff (2 KB)
Attached To
Mode
D16771: Allow bootstrapping elftoolchain on MacOS and Linux
Attached
Detach File
Event Timeline
Log In to Comment