summaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlexander von Gluck IV <kallisti5@unixzen.com>2021-09-02 12:19:14 +0100
committerNick Clifton <nickc@redhat.com>2021-09-02 12:19:14 +0100
commitd85e70a35bffa755fd3e9f4ccc6bf6c64953e85d (patch)
tree4fe42b81c0faa1a152338545a5318863f7fbbc41 /gas
parent718aefcf55cc5a9de3f73d9a37259f8f792b1cef (diff)
downloadbinutils-gdb-d85e70a35bffa755fd3e9f4ccc6bf6c64953e85d.tar.gz
Add support for the haiku operating system. These are the os support patches we have been grooming and maintaining for quite a few years over on git.haiku-os.org. All of these architectures are working and most have been stable for quite some time.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-i386.c1
-rw-r--r--gas/config/te-haiku.h30
-rwxr-xr-xgas/configure2
-rw-r--r--gas/configure.tgt8
4 files changed, 40 insertions, 1 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 7148c073247..339f9694948 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -478,6 +478,7 @@ const char extra_symbol_chars[] = "*%-([{}"
#if ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
&& !defined (TE_GNU) \
&& !defined (TE_LINUX) \
+ && !defined (TE_Haiku) \
&& !defined (TE_FreeBSD) \
&& !defined (TE_DragonFly) \
&& !defined (TE_NetBSD))
diff --git a/gas/config/te-haiku.h b/gas/config/te-haiku.h
new file mode 100644
index 00000000000..44557178e2f
--- /dev/null
+++ b/gas/config/te-haiku.h
@@ -0,0 +1,30 @@
+/* te-haiku.h -- Haiku target environment declarations.
+ Copyright 2013 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to
+ the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* Target environment for BeOS/Haiku. It is the same as the generic
+ target, except that it arranges via the TE_BeOS define to
+ suppress the use of "/" as a comment character. Some code in the
+ haiku kernel uses "/" to mean division. (What a concept!) */
+#define TE_Haiku 1
+
+#define LOCAL_LABELS_DOLLAR 1
+#define LOCAL_LABELS_FB 1
+
+#include "obj-format.h"
diff --git a/gas/configure b/gas/configure
index 7a528fd485e..a63c6ff0e39 100755
--- a/gas/configure
+++ b/gas/configure
@@ -9860,7 +9860,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
hardcode_into_libs=yes
;;
diff --git a/gas/configure.tgt b/gas/configure.tgt
index 68ee0468e8d..550fa4098f8 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -125,6 +125,7 @@ generic_target=${cpu_type}-$vendor-$os
case ${generic_target} in
aarch64*-*-elf*) fmt=elf;;
aarch64*-*-fuchsia*) fmt=elf;;
+ aarch64*-*-haiku*) fmt=elf em=haiku ;;
aarch64*-*-genode*) fmt=elf;;
aarch64*-*-linux*) fmt=elf em=linux
case ${cpu}-${os} in
@@ -161,6 +162,7 @@ case ${generic_target} in
fmt=coff em=wince-pe ;;
arm-*-pe) fmt=coff em=pe ;;
arm-*-fuchsia*) fmt=elf ;;
+ arm-*-haiku*) fmt=elf em=haiku ;;
avr-*-*) fmt=elf bfd_gas=yes ;;
@@ -222,6 +224,7 @@ case ${generic_target} in
i386-*-elfiamcu) fmt=elf arch=iamcu ;;
i386-*-elf*) fmt=elf ;;
i386-*-fuchsia*) fmt=elf ;;
+ i386-*-haiku*) fmt=elf em=haiku ;;
i386-*-genode*) fmt=elf ;;
i386-*-bsd*) fmt=aout em=386bsd ;;
i386-*-netbsd*-gnu* | \
@@ -288,6 +291,7 @@ case ${generic_target} in
m68k-*-uclinux*) fmt=elf em=uclinux ;;
m68k-*-gnu*) fmt=elf ;;
m68k-*-netbsd*) fmt=elf em=nbsd ;;
+ m68k-*-haiku*) fmt=elf em=haiku ;;
s12z-*-*) fmt=elf ;;
@@ -309,6 +313,7 @@ case ${generic_target} in
mips-*-sysv4* | mips-*-gnu*) fmt=elf em=tmips ;;
mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
fmt=elf em=tmips ;;
+ mips-*-haiku*) fmt=elf em=haiku ;;
mips-*-elf*) fmt=elf ;;
mips-*-netbsd*) fmt=elf em=tmips ;;
mips-*-openbsd*) fmt=elf em=tmips ;;
@@ -351,6 +356,7 @@ case ${generic_target} in
ppc-*-beos*) fmt=coff ;;
ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
+ ppc-*-haiku*) fmt=elf em=haiku ;;
ppc-*-linux-*) fmt=elf em=linux ;;
ppc-*-solaris*) fmt=elf em=solaris ;;
ppc-*-macos*) fmt=coff em=macos ;;
@@ -359,6 +365,7 @@ case ${generic_target} in
pru-*-*) fmt=elf ;;
+ riscv*-*-haiku*) fmt=elf endian=little em=haiku ;;
riscv*-*-*) fmt=elf ;;
rx-*-linux*) fmt=elf em=linux ;;
@@ -386,6 +393,7 @@ case ${generic_target} in
sh-*-kaos*) fmt=elf ;;
shle*-*-kaos*) fmt=elf ;;
+ sparc-*-haiku*) fmt=elf em=haiku ;;
sparc-*-linux-*) fmt=elf em=linux ;;
sparc-*-solaris*) fmt=elf em=solaris ;;
sparc-*-freebsd*) fmt=elf em=freebsd ;;