Actually use the obsd target environment, fgsch@ thinks this is a better

direction to go in for possible future changes which would afford us greater
flexibility.
This commit is contained in:
brad 2003-06-13 04:17:12 +00:00
parent 5eb1f9dd05
commit 2a879062fa
10 changed files with 162 additions and 25 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.17 2003/06/09 19:11:29 brad Exp $
# $OpenBSD: Makefile,v 1.18 2003/06/13 04:17:12 brad Exp $
COMMENT= "GNU development tools"
@ -51,6 +51,7 @@ FILES= ar nm-new objdump ranlib size strings strip-new
post-extract:
@cp -f ${FILESDIR}/{i386obsd.sh,sparcobsd.sh,m68kobsd.sh} \
${WRKSRC}/ld/emulparams
@cp -f ${FILESDIR}/te-obsd.h ${WRKSRC}/gas/config
post-patch:
@cd ${WRKSRC}/bfd && AUTOCONF_VERSION=${AUTOCONF_VERSION} autoconf

View File

@ -0,0 +1,24 @@
/* te-obsd.h -- OpenBSD target environment declarations.
Copyright 2003
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 2, 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, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#define TE_OpenBSD 1
#define LOCAL_LABELS_FB 1
#include "obj-format.h"

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-bfd_config_bfd,v 1.8 2003/06/08 03:04:50 brad Exp $
$OpenBSD: patch-bfd_config_bfd,v 1.9 2003/06/13 04:17:12 brad Exp $
--- bfd/config.bfd.orig Thu Nov 7 11:57:50 2002
+++ bfd/config.bfd Thu Jun 5 22:40:52 2003
+++ bfd/config.bfd Thu Jun 12 12:11:41 2003
@@ -413,11 +413,15 @@ case "${targ}" in
targ_defvec=i386pe_vec
targ_selvecs="i386pe_vec i386pei_vec bfd_elf32_i386_vec"
@ -32,6 +32,15 @@ $OpenBSD: patch-bfd_config_bfd,v 1.8 2003/06/08 03:04:50 brad Exp $
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec ecoff_big_vec ecoff_little_vec"
;;
@@ -788,7 +792,7 @@ case "${targ}" in
targ_defvec=pc532machaout_vec
targ_underscore=yes
;;
- ns32k-*-netbsd* | ns32k-*-lites* | ns32k-*-openbsd*)
+ ns32k-*-netbsd* | ns32k-*-lites*)
targ_defvec=pc532netbsd_vec
targ_underscore=yes
;;
@@ -1041,10 +1045,14 @@ case "${targ}" in
targ_selvecs=bfd_elf32_sparc_vec
targ_underscore=yes

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-gas_config_tc-hppa_h,v 1.1 2003/06/13 04:17:12 brad Exp $
--- gas/config/tc-hppa.h.orig Thu Jun 12 21:43:58 2003
+++ gas/config/tc-hppa.h Thu Jun 12 21:45:39 2003
@@ -68,7 +68,7 @@
#define TARGET_FORMAT "som"
#endif
-#if defined(TE_LINUX) || defined(TE_NetBSD)
+#if defined(TE_LINUX) || defined(TE_NetBSD) || defined(TE_OpenBSD)
/* Define to compile in an extra assembler option, -c, which enables a
warning (once per file) when a comment is encountered.
The hppa comment char is a `;' which tends to occur in random C asm
@@ -77,7 +77,7 @@
#define WARN_COMMENTS 1
#endif
-#ifdef TE_NetBSD
+#if defined(TE_NetBSD) || defined(TE_OpenBSD)
/* XXX the original OpenBSD code has labels without colons,
so this is required, for now -- fredette@netbsd.org */
/* Labels are not required to have a colon for a suffix. */

View File

@ -1,6 +1,15 @@
$OpenBSD: patch-gas_config_tc-i386_h,v 1.4 2003/06/05 23:39:48 brad Exp $
--- gas/config/tc-i386.h.orig Thu Jun 5 19:36:34 2003
+++ gas/config/tc-i386.h Thu Jun 5 19:38:49 2003
$OpenBSD: patch-gas_config_tc-i386_h,v 1.5 2003/06/13 04:17:12 brad Exp $
--- gas/config/tc-i386.h.orig Mon Sep 23 15:11:17 2002
+++ gas/config/tc-i386.h Thu Jun 12 21:56:14 2003
@@ -79,7 +79,7 @@ extern unsigned long i386_mach PARAMS ((
#ifdef TE_FreeBSD
#define AOUT_TARGET_FORMAT "a.out-i386-freebsd"
#endif
-#ifdef TE_NetBSD
+#if defined(TE_NetBSD) || defined(TE_OpenBSD)
#define AOUT_TARGET_FORMAT "a.out-i386-netbsd"
#endif
#ifdef TE_386BSD
@@ -515,7 +515,11 @@ arch_entry;
/* The name of the global offset table generated by the compiler. Allow
this to be overridden if need be. */

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-gas_config_tc-m68k_h,v 1.1 2003/06/13 04:17:12 brad Exp $
--- gas/config/tc-m68k.h.orig Thu Jun 12 22:27:57 2003
+++ gas/config/tc-m68k.h Thu Jun 12 22:28:23 2003
@@ -32,7 +32,7 @@ struct fix;
#ifdef TE_SUN3
#define TARGET_FORMAT "a.out-sunos-big"
#endif
-#ifdef TE_NetBSD
+#if defined(TE_NetBSD) || defined(TE_OpenBSD)
#define TARGET_FORMAT "a.out-m68k-netbsd"
#endif
#ifdef TE_LINUX

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-gas_config_tc-sparc_c,v 1.1 2003/06/13 04:17:12 brad Exp $
--- gas/config/tc-sparc.c.orig Thu Jun 12 22:28:54 2003
+++ gas/config/tc-sparc.c Thu Jun 12 22:29:11 2003
@@ -305,7 +305,7 @@ sparc_target_format ()
init_default_arch ();
#ifdef OBJ_AOUT
-#ifdef TE_NetBSD
+#if defined(TE_NetBSD) || defined(TE_OpenBSD)
return "a.out-sparc-netbsd";
#else
#ifdef TE_SPARCAOUT

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-gas_config_tc-vax_c,v 1.1 2003/06/13 04:17:12 brad Exp $
--- gas/config/tc-vax.c.orig Thu Jun 12 22:45:36 2003
+++ gas/config/tc-vax.c Thu Jun 12 22:45:41 2003
@@ -3397,7 +3397,7 @@ void
tc_headers_hook(headers)
object_headers *headers;
{
-#ifdef TE_NetBSD
+#if defined(TE_NetBSD) || defined(TE_OpenBSD)
N_SET_INFO(headers->header, OMAGIC, M_VAX4K_NETBSD, 0);
headers->header.a_info = htonl(headers->header.a_info);
#endif

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-gas_config_tc-vax_h,v 1.1 2003/06/13 04:17:12 brad Exp $
--- gas/config/tc-vax.h.orig Thu Jun 12 22:35:18 2003
+++ gas/config/tc-vax.h Thu Jun 12 22:35:35 2003
@@ -24,7 +24,7 @@
#define TARGET_BYTES_BIG_ENDIAN 0
#ifdef OBJ_AOUT
-#ifdef TE_NetBSD
+#if defined(TE_NetBSD) || defined(TE_OpenBSD)
#define TARGET_FORMAT "a.out-vax-netbsd"
#endif
#ifndef TARGET_FORMAT

View File

@ -1,32 +1,32 @@
$OpenBSD: patch-gas_configure_in,v 1.8 2003/06/12 14:26:20 brad Exp $
$OpenBSD: patch-gas_configure_in,v 1.9 2003/06/13 04:17:12 brad Exp $
--- gas/configure.in.orig Wed Oct 30 12:07:32 2002
+++ gas/configure.in Thu Jun 12 10:39:54 2003
@@ -180,7 +180,7 @@ changequote([,])dnl
alpha*-*-linuxecoff*) fmt=ecoff ;;
alpha*-*-linux-gnu*) fmt=elf em=linux ;;
alpha*-*-netbsd*) fmt=elf em=nbsd ;;
- alpha*-*-openbsd*) fmt=elf em=obsd ;;
+ alpha*-*-openbsd*) fmt=elf em=nbsd ;;
arc-*-elf*) fmt=elf bfd_gas=yes ;;
@@ -221,8 +221,7 @@ changequote([,])dnl
esac ;;
+++ gas/configure.in Thu Jun 12 12:08:53 2003
@@ -193,7 +193,8 @@ changequote([,])dnl
arm*-*-linux-gnu* | arm*-*-uclinux*)
fmt=elf em=linux ;;
arm-*-netbsdelf*) fmt=elf em=nbsd ;;
- arm-*-netbsd* | arm-*-openbsd*) fmt=aout em=nbsd ;;
+ arm-*-netbsd*) fmt=aout em=nbsd ;;
+ arm-*-openbsd*) fmt=elf em=obsd ;;
arm-*-oabi | thumb-*-oabi) fmt=elf ;;
arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;;
arm-*-wince) fmt=coff em=wince-pe ;;
@@ -222,7 +223,7 @@ changequote([,])dnl
hppa-*-*elf*) fmt=elf em=hppa ;;
hppa-*-lites*) fmt=elf em=hppa ;;
- hppa-*-netbsd*) fmt=elf em=nbsd ;;
hppa-*-netbsd*) fmt=elf em=nbsd ;;
- hppa-*-openbsd*) fmt=elf em=hppa ;;
+ hppa-*-netbsd* | hppa-*-openbsd*) fmt=elf em=nbsd ;;
+ hppa-*-openbsd*) fmt=elf em=obsd ;;
hppa-*-osf*) fmt=som em=hppa ;;
hppa-*-rtems*) fmt=elf em=hppa ;;
hppa-*-hpux11*) case ${cpu} in
@@ -260,7 +259,16 @@ changequote([,])dnl
@@ -260,7 +261,16 @@ changequote([,])dnl
;;
esac
;;
- i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
+changequote(,)dnl
+ i386-*-openbsd*) em=nbsd bfd_gas=yes
+ i386-*-openbsd*) em=obsd bfd_gas=yes
+ case ${os} in
+ openbsd[0-2].* | openbsd3.[0-2])
+ fmt=aout ;;
@ -38,6 +38,31 @@ $OpenBSD: patch-gas_configure_in,v 1.8 2003/06/12 14:26:20 brad Exp $
i386-*-linux*aout* | i386-*-linux*oldld) fmt=aout em=linux ;;
i386-*-linux*coff*) fmt=coff em=linux ;;
i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
@@ -344,7 +354,7 @@ changequote([,])dnl
m68k-*-netbsdelf*) fmt=elf em=nbsd bfd_gas=yes ;;
m68k-*-netbsdaout* | m68k-*-netbsd*)
fmt=aout em=nbsd bfd_gas=yes ;;
- m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
+ m68k-*-openbsd*) fmt=aout em=obsd bfd_gas=yes ;;
m68k-apple-aux*) fmt=coff em=aux ;;
m68k-*-psos*) fmt=elf em=psos;;
@@ -355,7 +365,6 @@ changequote([,])dnl
mcore-*-pe) fmt=coff em=pe bfd_gas=yes ;;
# don't change em like *-*-bsd does
- mips-dec-openbsd*) fmt=elf endian=little ;;
mips-dec-bsd*) fmt=aout endian=little ;;
mips-sony-bsd*) fmt=ecoff ;;
mips-*-bsd*) AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;;
@@ -434,7 +443,6 @@ changequote([,])dnl
sh64-*-elf*) fmt=elf ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
ns32k-*-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
- ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
sparc-*-rtemsaout*) fmt=aout ;;
sparc-*-rtemself*) fmt=elf ;;
@@ -458,12 +466,17 @@ changequote([,])dnl
sparc64) fmt=elf ;;
esac
@ -49,7 +74,7 @@ $OpenBSD: patch-gas_configure_in,v 1.8 2003/06/12 14:26:20 brad Exp $
- esac
- ;;
+changequote(,)dnl
+ sparc-*-openbsd*) em=nbsd bfd_gas=yes
+ sparc-*-openbsd*) em=obsd bfd_gas=yes
+ case ${os} in
+ openbsd[0-2].* | openbsd3.[0-1])
+ fmt=aout ;;
@ -58,7 +83,7 @@ $OpenBSD: patch-gas_configure_in,v 1.8 2003/06/12 14:26:20 brad Exp $
+ esac
+ ;;
+changequote([,])dnl
+ sparc64-*-openbsd*) em=nbsd bfd_gas=yes fmt=elf ;;
+ sparc64-*-openbsd*) em=obsd bfd_gas=yes fmt=elf ;;
strongarm-*-coff) fmt=coff ;;
strongarm-*-elf) fmt=elf ;;