void-packages/srcpkgs/polyml/patches/poly-aarch64.patch

43 lines
1.1 KiB
Diff

--- config.h.in 2014-02-19 14:11:05.000000000 +0000
+++ config.h.in 2015-07-09 14:18:31.313388000 +0000
@@ -551,6 +551,9 @@
/* Define if the host is an ARM (32 bit) */
#undef HOSTARCHITECTURE_ARM
+/* Define if the host is an ARM (64 bit) */
+#undef HOSTARCHITECTURE_AARCH64
+
/* Define if the host is Itanium */
#undef HOSTARCHITECTURE_IA64
--- configure 2014-05-09 10:11:45.000000000 +0000
+++ configure 2015-07-09 14:18:55.073388000 +0000
@@ -21306,6 +21306,12 @@
polyarch=interpret
;;
+ aarch64*)
+
+$as_echo "#define HOSTARCHITECTURE_AARCH64 1" >>confdefs.h
+
+ polyarch=interpret
+ ;;
ia64*)
$as_echo "#define HOSTARCHITECTURE_IA64 1" >>confdefs.h
--- libpolyml/elfexport.cpp 2013-10-15 16:25:39.000000000 +0000
+++ libpolyml/elfexport.cpp 2015-07-09 14:13:35.433388000 +0000
@@ -344,6 +344,10 @@
directReloc = R_IA64_DIR64LSB;
fhdr.e_flags = EF_IA_64_ABI64;
useRela = true;
+#elif defined(HOSTARCHITECTURE_AARCH64)
+ fhdr.e_machine = EM_AARCH64;
+ directReloc = R_AARCH64_ABS64;
+ useRela = true;
#else
#error "No support for exporting on this architecture"
#endif