]> granicus.if.org Git - gc/commitdiff
Support FreeBSD/aarch64
authorCarlos J. Puga Medina <cpm@fbsd.es>
Fri, 3 Jul 2015 18:55:54 +0000 (21:55 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 4 Jul 2015 07:09:51 +0000 (10:09 +0300)
* include/private/gcconfig.h (NOSYS): Do not define if FREEBSD and
__aarch64__.
* include/private/gcconfig.h (AARCH64, mach_type_known): Define if
FREEBSD and __aarch64__.
* include/private/gcconfig.h (ALIGNMENT, OS_TYPE, DYNAMIC_LOADING,
HEURISTIC2, SEARCH_FOR_DATA_START): Likewise.

include/private/gcconfig.h

index 18bfc4c2fe9281f3eb26bd98533f55cc6bad0e53..c359d0a771b0a78ec6762ecedca6d04010f86b5a 100644 (file)
@@ -98,7 +98,7 @@
 # endif
 # if defined(__aarch64__)
 #    define AARCH64
-#    if !defined(LINUX) && !defined(DARWIN)
+#    if !defined(LINUX) && !defined(DARWIN) && !defined(FREEBSD)
 #      define NOSYS
 #      define mach_type_known
 #    endif
 #   define I386
 #   define mach_type_known
 # endif
+# if defined(FREEBSD) && defined(__aarch64__)
+#   define AARCH64
+#   define mach_type_known
+# endif
 # if defined(FREEBSD) && (defined(__amd64__) || defined(__x86_64__))
 #   define X86_64
 #   define mach_type_known
 #       define NO_DYLD_BIND_FULLY_IMAGE
 #     endif
 #   endif
+#   ifdef FREEBSD
+#     define ALIGNMENT 8
+#     define OS_TYPE "FREEBSD"
+#     ifdef __ELF__
+#       define DYNAMIC_LOADING
+#     endif
+#     define HEURISTIC2
+      extern char etext[];
+#     define SEARCH_FOR_DATA_START
+#   endif
 #   ifdef NOSYS
       /* __data_start is usually defined in the target linker script.   */
       extern int __data_start[];