[rtems-tools commit] _libelf_config.h: Add removed Cygwin code
Joel Sherrill
joel at rtems.org
Wed Oct 12 14:47:53 UTC 2022
Module: rtems-tools
Branch: master
Commit: 40529bc566105be801481880a385a750bed44d36
Changeset: http://git.rtems.org/rtems-tools/commit/?id=40529bc566105be801481880a385a750bed44d36
Author: Ryan Long <ryan.long at oarcorp.com>
Date: Wed Oct 12 08:44:38 2022 -0500
_libelf_config.h: Add removed Cygwin code
This code was removed for some reason. Without it, we are unable to build
RTEMS with Cygwin.
---
rtemstoolkit/elftoolchain/libelf/_libelf_config.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/rtemstoolkit/elftoolchain/libelf/_libelf_config.h b/rtemstoolkit/elftoolchain/libelf/_libelf_config.h
index 0f16f3a..16b5f0b 100644
--- a/rtemstoolkit/elftoolchain/libelf/_libelf_config.h
+++ b/rtemstoolkit/elftoolchain/libelf/_libelf_config.h
@@ -189,3 +189,25 @@
#endif
#endif /* defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) */
+
+#if defined(__WIN32__) || defined(__CYGWIN__)
+
+#define LIBELF_VCSID(ID)
+
+#if defined(__amd64__)
+
+#define LIBELF_ARCH EM_X86_64
+#define LIBELF_BYTEORDER ELFDATA2LSB
+#define LIBELF_CLASS ELFCLASS64
+
+#elif defined(__i386__)
+
+#define LIBELF_ARCH EM_386
+#define LIBELF_BYTEORDER ELFDATA2LSB
+#define LIBELF_CLASS ELFCLASS32
+
+#else
+#error Unknown Windows architecture.
+#endif
+
+#endif /* __WIN32__ || __CYGWIN__ */
More information about the vc
mailing list