aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1994-11-03 23:15:54 +0000
committerKen Raeburn <raeburn@cygnus>1994-11-03 23:15:54 +0000
commitf28891108ca6a50679c2297cda546768f0a3bc76 (patch)
tree024d16996f2649581ffaf1ca2e670549682d6244 /gas
parent6c27841f3b120b58f6306070deaccd7421696c1b (diff)
downloadgdb-f28891108ca6a50679c2297cda546768f0a3bc76.zip
gdb-f28891108ca6a50679c2297cda546768f0a3bc76.tar.gz
gdb-f28891108ca6a50679c2297cda546768f0a3bc76.tar.bz2
Changes from net 2.5.2 release branch:
* configure.in: Put AC_DEFINE(sparcv9) on its own line, so that the shell variable settings associated with it are permanent. For CPUs requiring bfd_gas=yes, select it based on CPU only, not individual target names. Handle m68k-hp-hpux*, not just -hpux. * config/tc-z8k.c (tc_coff_symbol_emit_hook): Add dummy argument to match prototype in obj-coff.h. * configure.in: Skip tests for defining WANT_FOPEN_BIN and IBM_COMPILER_SUX. * acconfig.h: Deleted them. * configure, conf.in: Rebuild with autoconf 2.0. * config/go32.cfg, config/vms-conf.h: Updated. * config/tc-m68k.c (md_apply_fix_2, md_convert_frag_1): Always use IBM_COMPILER_SUX version of code, with comments indicating why. * listing.c (file_info): Use text mode when opening file for read. Use "r" directly, no macro. * input-file.c (input_file_open): Don't use FOPEN_RT, just use "r". * read.c (s_include): Ditto. * output-file.c (output_file_create): Try both "wb" and "w", don't bother with FOPEN_* macros. * as.h: Don't include fopen-*.h. * config/alpha-opcode.h: Make "ret" with no operands equivalent to "ret zero,(ra)", to match OSF1 and to be consistent with both one-operand forms. Patches from DJ Delorie: * as.h (alloca): undef alloca before defining it just in case * config/go32.cfg: new file for autoconf values * config/te-go32.h: new file * configure.bat: new for autoconf * config/tc-i386.c (md_assemble): Fix typo in GOTPC check; had = for ==. * configure.in: If target_frag doesn't exist, use /dev/null. * as.c (parse_args): For non-VMS systems, re-add `v' to std_shortopts. Add "verbose" to list of long options. * write.c (adjust_reloc_syms): When generating an absolute section symbol as a placeholder, don't mark it as used in a relocation entry, here. * Makefile.in (comparison): Compare using makefile code from gcc, stripped down to discard subdir stuff and adapted to give a non-zero exit status if either file differs.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog56
-rw-r--r--gas/Makefile.in26
-rw-r--r--gas/acconfig.h11
-rw-r--r--gas/conf.in14
-rw-r--r--gas/config/alpha-opcode.h2
-rw-r--r--gas/config/go32.cfg93
-rw-r--r--gas/config/vms-conf.h11
-rwxr-xr-xgas/configure155
-rw-r--r--gas/configure.bat40
-rw-r--r--gas/configure.in60
-rw-r--r--gas/read.c2
11 files changed, 293 insertions, 177 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 8493100..d5118b0 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,59 @@
+Thu Nov 3 17:44:47 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ Changes from net 2.5.2 release branch:
+
+ * configure.in: Put AC_DEFINE(sparcv9) on its own line, so that
+ the shell variable settings associated with it are permanent. For
+ CPUs requiring bfd_gas=yes, select it based on CPU only, not
+ individual target names. Handle m68k-hp-hpux*, not just -hpux.
+
+ * config/tc-z8k.c (tc_coff_symbol_emit_hook): Add dummy argument
+ to match prototype in obj-coff.h.
+
+ * configure.in: Skip tests for defining WANT_FOPEN_BIN and
+ IBM_COMPILER_SUX.
+ * acconfig.h: Deleted them.
+ * configure, conf.in: Rebuild with autoconf 2.0.
+ * config/go32.cfg, config/vms-conf.h: Updated.
+
+ * config/tc-m68k.c (md_apply_fix_2, md_convert_frag_1): Always use
+ IBM_COMPILER_SUX version of code, with comments indicating why.
+
+ * listing.c (file_info): Use text mode when opening file for read.
+ Use "r" directly, no macro.
+ * input-file.c (input_file_open): Don't use FOPEN_RT, just use
+ "r".
+ * read.c (s_include): Ditto.
+ * output-file.c (output_file_create): Try both "wb" and "w", don't
+ bother with FOPEN_* macros.
+ * as.h: Don't include fopen-*.h.
+
+ * config/alpha-opcode.h: Make "ret" with no operands equivalent to
+ "ret zero,(ra)", to match OSF1 and to be consistent with both
+ one-operand forms.
+
+ Patches from DJ Delorie:
+ * as.h (alloca): undef alloca before defining it just in case
+ * config/go32.cfg: new file for autoconf values
+ * config/te-go32.h: new file
+ * configure.bat: new for autoconf
+
+ * config/tc-i386.c (md_assemble): Fix typo in GOTPC check; had =
+ for ==.
+
+ * configure.in: If target_frag doesn't exist, use /dev/null.
+
+ * as.c (parse_args): For non-VMS systems, re-add `v' to
+ std_shortopts. Add "verbose" to list of long options.
+
+ * write.c (adjust_reloc_syms): When generating an absolute section
+ symbol as a placeholder, don't mark it as used in a relocation
+ entry, here.
+
+ * Makefile.in (comparison): Compare using makefile code from gcc,
+ stripped down to discard subdir stuff and adapted to give a
+ non-zero exit status if either file differs.
+
Thu Nov 3 15:43:02 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
* config/tc-mips.c (load_address): Fix RELAX_ENCODE arguments for
diff --git a/gas/Makefile.in b/gas/Makefile.in
index 52a9c77..d1093a1 100644
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -53,7 +53,7 @@ infodir = $(prefix)/info
includedir = $(prefix)/include
docdir = $(datadir)/doc
-VERSION=cygnus-2.4.90
+VERSION=cygnus-2.5
SHELL = /bin/sh
@@ -67,7 +67,7 @@ DISTSTUFF= make-gas.com
AR = ar
AR_FLAGS = qv
-BISON = bison
+BISON = bison -y
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
RANLIB = ranlib
@@ -439,7 +439,7 @@ $(srcdir)/as.info: $(srcdir)/doc/as.texinfo
diststuff: $(DISTSTUFF)
clean-here:
- -rm -f $(STAGESTUFF) core
+ -rm -f $(STAGESTUFF) core stamp-mk.com
clean mostlyclean: clean-here
@cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
@@ -455,7 +455,7 @@ distclean: clean-here
else true; fi
-rm -f config.status Makefile targ-env.h targ-cpu.h \
targ-cpu.c obj-format.h obj-format.c atof-targ.c TAGS \
- config-stamp config.h conf config.log config.cache
+ config-stamp config.h conf config.log config.cache .gdbinit
realclean: clean distclean
-rm -rf $(DISTSTUFF)
@@ -536,8 +536,24 @@ stage3: force
against=stage2
+# This rule is derived from corresponding code in the Makefile.in for gcc.
+# The "tail +16c" is to bypass headers which may include timestamps or
+# temporary assembly file names.
comparison: force
- for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
+ x=0 ; \
+ for file in $(STAGESTUFF) ; do \
+ tail +16c ./$$file > tmp-foo1; \
+ if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
+ if cmp tmp-foo1 tmp-foo2 ; then \
+ true ; \
+ else \
+ echo $$file differs ; \
+ x=1 ; \
+ fi ; \
+ else true; fi ; \
+ done ; \
+ exit $$x
+ -rm -f tmp-foo*
de-stage1: force
- (cd stage1 ; rm -f as ; mv -f * ..)
diff --git a/gas/acconfig.h b/gas/acconfig.h
index abae0b8..5d15412 100644
--- a/gas/acconfig.h
+++ b/gas/acconfig.h
@@ -10,10 +10,6 @@
since byte orders and value sizes don't need to be adjusted. */
#undef CROSS_COMPILE
-/* Some IBM compilers can't handle some of the (rather basic) constructs
- used in the 68k support code. */
-#undef IBM_COMPILER_SUX
-
/* Some gas code wants to know these parameters. */
#undef TARGET_ALIAS
#undef TARGET_CPU
@@ -21,13 +17,6 @@
#undef TARGET_OS
#undef TARGET_VENDOR
-/* Some operating systems, for example DOS, require the use of "wb" mode when
- opening a binary file for writing. If only "w" is used, the file will not
- be correct. However, some other systems reject such a mode. This indicates
- which ../include/fopen-*.h header file we want to include, so that we can
- get macros that'll do the right thing for this system. */
-#undef WANT_FOPEN_BIN
-
/* Sometimes the system header files don't declare malloc and realloc. */
#undef NEED_DECLARATION_MALLOC
diff --git a/gas/conf.in b/gas/conf.in
index cc2f106..c2d8d4a 100644
--- a/gas/conf.in
+++ b/gas/conf.in
@@ -7,6 +7,9 @@
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
+/* Define if you have alloca, as a function or macro. */
+#undef HAVE_ALLOCA
+
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
@@ -34,10 +37,6 @@
since byte orders and value sizes don't need to be adjusted. */
#undef CROSS_COMPILE
-/* Some IBM compilers can't handle some of the (rather basic) constructs
- used in the 68k support code. */
-#undef IBM_COMPILER_SUX
-
/* Some gas code wants to know these parameters. */
#undef TARGET_ALIAS
#undef TARGET_CPU
@@ -45,13 +44,6 @@
#undef TARGET_OS
#undef TARGET_VENDOR
-/* Some operating systems, for example DOS, require the use of "wb" mode when
- opening a binary file for writing. If only "w" is used, the file will not
- be correct. However, some other systems reject such a mode. This indicates
- which ../include/fopen-*.h header file we want to include, so that we can
- get macros that'll do the right thing for this system. */
-#undef WANT_FOPEN_BIN
-
/* Sometimes the system header files don't declare malloc and realloc. */
#undef NEED_DECLARATION_MALLOC
diff --git a/gas/config/alpha-opcode.h b/gas/config/alpha-opcode.h
index af1c1d3..85955c9 100644
--- a/gas/config/alpha-opcode.h
+++ b/gas/config/alpha-opcode.h
@@ -221,7 +221,7 @@ static const struct alpha_opcode alpha_opcodes[] =
{ "jsr", 0x68004000, 0, "1,Bc" }, /* macro: lda $pv,L;jsr .. */
{ "ret", 0x68008000, 0, "1,(2),i" },
{ "ret", 0x68008000, 0, "1,(2)" },
-{ "ret", 0x6b5a8000, 0, "" }, /* macro: ret ra,(ra) */
+{ "ret", 0x6bfa8000, 0, "" }, /* macro: ret zero,(ra) */
{ "ret", 0x6be08000, 0, "(2)" }, /* macro: ret zero,(2) */
{ "ret", 0x681a8000, 0, "1" }, /* macro: ret 1,(ra) */
{ "jcr", 0x6800c000, 0, "1,(2)" },
diff --git a/gas/config/go32.cfg b/gas/config/go32.cfg
new file mode 100644
index 0000000..4059395
--- /dev/null
+++ b/gas/config/go32.cfg
@@ -0,0 +1,93 @@
+/* config.h for go32 */
+
+#define I386COFF 1
+
+/* Define if using alloca.c. */
+#undef C_ALLOCA
+
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+ This function is required for alloca.c support on those systems. */
+#undef CRAY_STACKSEG_END
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+#undef HAVE_ALLOCA_H
+
+/* Define as __inline if that's what the C compiler calls it. */
+#undef inline
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+#undef STACK_DIRECTION
+
+/* Should gas use high-level BFD interfaces? */
+#undef BFD_ASSEMBLER
+
+/* If we aren't doing cross-assembling, some operations can be optimized,
+ since byte orders and value sizes don't need to be adjusted. */
+#undef CROSS_COMPILE
+
+/* Some gas code wants to know these parameters. */
+#define TARGET_ALIAS "i386"
+#define TARGET_CPU "i386"
+#define TARGET_CANONICAL "i386-i386"
+#define TARGET_OS "djgpp"
+#define TARGET_VENDOR "djgpp"
+
+/* Some operating systems, for example DOS, require the use of "wb" mode when
+ opening a binary file for writing. If only "w" is used, the file will not
+ be correct. However, some other systems reject such a mode. This indicates
+ which ../include/fopen-*.h header file we want to include, so that we can
+ get macros that'll do the right thing for this system. */
+#define WANT_FOPEN_BIN 1
+
+/* Sometimes the system header files don't declare malloc and realloc. */
+#undef NEED_DECLARATION_MALLOC
+
+/* Sometimes the system header files don't declare free. */
+#undef NEED_DECLARATION_FREE
+
+/* Sometimes errno.h doesn't declare errno itself. */
+#undef NEED_DECLARATION_ERRNO
+
+#define MANY_SEGMENTS 1
+
+/* Needed only for sparc configuration */
+#undef sparcv9
+
+/* Define if you have the remove function. */
+#define HAVE_REMOVE 1
+
+/* Define if you have the unlink function. */
+#define HAVE_UNLINK 1
+
+/* Define if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H 1
+
+/* Define if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define if you have the <varargs.h> header file. */
+#undef HAVE_VARARGS_H
diff --git a/gas/config/vms-conf.h b/gas/config/vms-conf.h
index b83034e..da32c44 100644
--- a/gas/config/vms-conf.h
+++ b/gas/config/vms-conf.h
@@ -47,10 +47,6 @@
since byte orders and value sizes don't need to be adjusted. */
#undef CROSS_COMPILE
-/* Some IBM compilers can't handle some of the (rather basic) constructs
- used in the 68k support code. */
-#undef IBM_COMPILER_SUX
-
/* Some gas code wants to know these parameters. */
#define TARGET_ALIAS "vms"
#define TARGET_CPU "vax"
@@ -58,13 +54,6 @@
#define TARGET_OS "vms"
#define TARGET_VENDOR "dec"
-/* Some operating systems, for example DOS, require the use of "wb" mode when
- opening a binary file for writing. If only "w" is used, the file will not
- be correct. However, some other systems reject such a mode. This indicates
- which ../include/fopen-*.h header file we want to include, so that we can
- get macros that'll do the right thing for this system. */
-#undef WANT_FOPEN_BIN
-
/* Sometimes the system header files don't declare malloc and realloc. */
#undef NEED_DECLARATION_MALLOC
diff --git a/gas/configure b/gas/configure
index 0377a84..7baa0d9 100755
--- a/gas/configure
+++ b/gas/configure
@@ -1,27 +1,16 @@
#!/bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 1.120
-# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+# Generated automatically using autoconf version 2.0
+# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
#
-# This configure script 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.
-#
-# This script 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 this script; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# The redistribution and modification terms for this script do not affect
-# the terms for software that it configures.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+# Defaults:
ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
ac_help="$ac_help
bfd-assembler use BFD back end for writing object files"
@@ -35,8 +24,10 @@ Configuration:
--quiet, --silent do not print \`checking...' messages
--version print the version of autoconf that created configure
Directory and file names:
- --exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local]
- --prefix=PREFIX install host independent files in PREFIX [/usr/local]
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=PREFIX install architecture-dependent files in PREFIX
+ [same as prefix]
--srcdir=DIR find the sources in DIR [configure dir or ..]
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
@@ -69,6 +60,7 @@ program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
+site=
srcdir=
target=NONE
verbose=
@@ -208,6 +200,11 @@ EOF
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -222,7 +219,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 1.120"
+ echo "configure generated by autoconf version 2.0"
exit 0 ;;
-with-* | --with-*)
@@ -359,17 +356,14 @@ if test ! -r $srcdir/$ac_unique_file; then
{ echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
fi
fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
- CONFIG_SITE=$prefix/lib/config.site
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
- CONFIG_SITE=/usr/local/lib/config.site
- fi
- # System dependent files override system independent ones.
- if test "x$exec_prefix" != xNONE && test "x$exec_prefix" != "x$prefix"; then
- CONFIG_SITE="$CONFIG_SITE $exec_prefix/lib/config.site"
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
fi
for ac_site_file in $CONFIG_SITE; do
@@ -390,6 +384,7 @@ fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
@@ -449,9 +444,8 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# 2. Host defaults to nonopt.
# 3. If nonopt is not specified, then host defaults to the current host,
# as determined by config.guess.
-# 4. Target defaults to nonopt.
-# 5. If nonopt is not specified, then target defaults to host.
-# 6. build defaults to empty (but implicitly to host).
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
@@ -507,14 +501,17 @@ echo $ac_n "checking build system type""... $ac_c" 1>&4
build_alias=$build
case "$build_alias" in
-NONE) build= build_alias= ;;
-*)
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
build=`$ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
-;;
-esac
echo "$ac_t""$build" 1>&4
test "$host_alias" != "$target_alias" &&
@@ -555,7 +552,8 @@ case ${target_cpu} in
mips*) cpu_type=mips endian=big ;;
powerpc*) cpu_type=ppc ;;
rs6000*) cpu_type=ppc ;;
- sparc64) cpu_type=sparc obj_format=elf cat >> confdefs.h <<\EOF
+ sparc64) cpu_type=sparc obj_format=elf
+ cat >> confdefs.h <<\EOF
#define sparcv9 1
EOF
;;
@@ -585,7 +583,7 @@ case ${generic_target} in
alpha-*-netware*) obj_format=ecoff ;;
alpha-*-osf*) obj_format=ecoff ;;
- arm-*-riscix*) obj_format=aout bfd_gas=yes ;;
+ arm-*-riscix*) obj_format=aout ;;
hppa-*-*elf*) obj_format=elf emulation=hppa ;;
hppa-*-osf*) obj_format=som emulation=hppa ;;
@@ -630,14 +628,14 @@ case ${generic_target} in
m68k-apollo-*) obj_format=coff gas_target=apollo emulation=apollo ;;
m68k-*-coff | m68k-*-sysv*)
obj_format=coff gas_target=m68kcoff ;;
- m68k-*-hpux) obj_format=hp300 emulation=hp300 ;;
+ m68k-*-hpux*) obj_format=hp300 emulation=hp300 ;;
m68k-*-lynxos*) obj_format=coff gas_target=m68kcoff
emulation=lynx ;;
m88k-*-coff*) obj_format=coff gas_target=m88kcoff ;;
# don't change emulation like *-*-bsd does
- mips-*-bsd*) bfd_gas=yes obj_format=aout gas_target=mips-lit ;;
+ mips-*-bsd*) obj_format=aout gas_target=mips-lit ;;
mips-*-ultrix*) obj_format=ecoff gas_target=mips-lit ;;
mips-*-ecoff*) obj_format=ecoff
case "$endian" in
@@ -656,15 +654,15 @@ case ${generic_target} in
*) gas_target=mips-lit ;;
esac
;;
- ppc-*-aix*) obj_format=coff bfd_gas=yes ;;
- ppc-*-elf*) obj_format=elf bfd_gas=yes ;;
+ ppc-*-aix*) obj_format=coff ;;
+ ppc-*-elf*) obj_format=elf ;;
ppc-*-netware*) obj_format=elf emulation=ppcnw ;;
- ppc-*-sysv4*) obj_format=elf bfd_gas=yes ;;
+ ppc-*-sysv4*) obj_format=elf ;;
sh-*-coff) obj_format=coff ;;
- ns32k-pc532-mach*) obj_format=aout emulation=pc532 bfd_gas=yes ;;
- ns32k-pc532-netbsd*) obj_format=aout emulation=nbsd532 bfd_gas=yes ;;
+ ns32k-pc532-mach*) obj_format=aout emulation=pc532 ;;
+ ns32k-pc532-netbsd*) obj_format=aout emulation=nbsd532 ;;
sparc*-*-sunos4*) obj_format=aout emulation=sun3 ;;
sparc*-*-aout | sparc*-*-vxworks)
@@ -722,11 +720,18 @@ fi
# and target makefile frag
target_frag=${srcdir}/config/${gas_target}.mt
+if test ! -r ${target_frag}; then
+ target_frag=/dev/null # ick! but subst_file can't be conditionalized
+fi
case ${cpu_type}-${obj_format} in
+ arm-*) bfd_gas=yes ;;
# not yet
# i386-aout) bfd_gas=preferred ;;
+ mips-*) bfd_gas=yes ;;
+ ns32k-*) bfd_gas=yes ;;
+ ppc-*) bfd_gas=yes ;;
sparc*-*) bfd_gas=yes ;;
*-elf) bfd_gas=yes ;;
*-ecoff) bfd_gas=yes ;;
@@ -811,22 +816,6 @@ cat >> confdefs.h <<EOF
EOF
-case ${host} in
- rs6000-*-*)
- # The IBM compiler mis-compiles some expressions used in gas.
- # This will tell gas to work around this lossage.
- cat >> confdefs.h <<\EOF
-#define IBM_COMPILER_SUX 1
-EOF
- ;;
- i386-*-go32)
- # Using fopen(..., "w") for a binary file breaks under DOS.
- cat >> confdefs.h <<\EOF
-#define WANT_FOPEN_BIN 1
-EOF
- ;;
-esac
-
echo $ac_n "checking for CC""... $ac_c" 1>&4
test -z "$CC" && CC=`egrep '^CC *=' ../Makefile | tail -1 | sed 's/^CC *= *//'`
test -z "$CC" && CC=cc
@@ -913,9 +902,9 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 917 "configure"
+#line 906 "configure"
#include "confdefs.h"
-#include <stdio.h>
+#include <assert.h>
Syntax Error
EOF
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
@@ -927,9 +916,9 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 931 "configure"
+#line 920 "configure"
#include "confdefs.h"
-#include <stdio.h>
+#include <assert.h>
Syntax Error
EOF
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
@@ -952,13 +941,13 @@ echo "$ac_t""$CPP" 1>&4
for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
do
-ac_safe=`echo "$ac_hdr" | tr './' '__'`
+ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 962 "configure"
+#line 951 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
@@ -976,7 +965,7 @@ rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&4
- ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
+ ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
@@ -1010,7 +999,7 @@ else
ac_cv_cross=yes
else
cat > conftest.$ac_ext <<EOF
-#line 1014 "configure"
+#line 1003 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
@@ -1033,7 +1022,7 @@ if eval "test \"`echo '${'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1037 "configure"
+#line 1026 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() { return 0; }
@@ -1064,7 +1053,7 @@ if eval "test \"`echo '${'ac_cv_func_alloca'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1068 "configure"
+#line 1057 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1122,7 +1111,7 @@ if eval "test \"`echo '${'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1126 "configure"
+#line 1115 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1149,7 +1138,7 @@ if eval "test \"`echo '${'ac_cv_func__getb67'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1153 "configure"
+#line 1142 "configure"
#include "confdefs.h"
#include <ctype.h> /* Arbitrary system header to define __stub macros. */
int main() { return 0; }
@@ -1190,7 +1179,7 @@ if eval "test \"`echo '${'ac_cv_func_GETB67'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1194 "configure"
+#line 1183 "configure"
#include "confdefs.h"
#include <ctype.h> /* Arbitrary system header to define __stub macros. */
int main() { return 0; }
@@ -1231,7 +1220,7 @@ if eval "test \"`echo '${'ac_cv_func_getb67'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1235 "configure"
+#line 1224 "configure"
#include "confdefs.h"
#include <ctype.h> /* Arbitrary system header to define __stub macros. */
int main() { return 0; }
@@ -1283,7 +1272,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1287 "configure"
+#line 1276 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1324,7 +1313,7 @@ if eval "test \"`echo '${'ac_cv_c_inline'+set}'`\" = set"; then
else
if test "$GCC" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 1328 "configure"
+#line 1317 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -1332,7 +1321,7 @@ int t() {
} inline foo() {
; return 0; }
EOF
-if eval $ac_link; then
+if eval $ac_compile; then
rm -rf conftest*
ac_cv_c_inline=yes
else
@@ -1362,7 +1351,7 @@ if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1366 "configure"
+#line 1355 "configure"
#include "confdefs.h"
#include <ctype.h> /* Arbitrary system header to define __stub macros. */
int main() { return 0; }
@@ -1411,7 +1400,7 @@ if eval "test \"`echo '${'gas_cv_assert_ok'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1415 "configure"
+#line 1404 "configure"
#include "confdefs.h"
#include <assert.h>
#include <stdio.h>
@@ -1468,7 +1457,7 @@ if eval "test \"`echo '${'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1472 "configure"
+#line 1461 "configure"
#include "confdefs.h"
$gas_test_headers
int main() { return 0; }
@@ -1504,7 +1493,7 @@ if eval "test \"`echo '${'gas_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1508 "configure"
+#line 1497 "configure"
#include "confdefs.h"
$gas_test_headers
int main() { return 0; }
@@ -1543,7 +1532,7 @@ if eval "test \"`echo '${'gas_cv_decl_needed_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1547 "configure"
+#line 1536 "configure"
#include "confdefs.h"
#ifdef HAVE_ERRNO_H
@@ -1610,7 +1599,7 @@ fi
trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
-test "x$prefix" = xNONE && prefix=/usr/local
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
@@ -1650,7 +1639,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 1.120"
+ echo "$CONFIG_STATUS generated by autoconf version 2.0"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
diff --git a/gas/configure.bat b/gas/configure.bat
index 784bae7..1fd269f 100644
--- a/gas/configure.bat
+++ b/gas/configure.bat
@@ -2,7 +2,6 @@
if "%1" == "h8/300" goto h8300
echo Configuring gas for go32
-update config/ho-go32.h host.h
update config/tc-i386.c targ-cpu.c
update config/tc-i386.h targ-cpu.h
update config/te-go32.h targ-env.h
@@ -23,32 +22,26 @@ copy config\atof-ieee.c atof-targ.c
:common
-echo # Makefile generated by "configure.bat"> Makefile
-echo all.dos : as.new>>Makefile
+echo # Makefile generated by "configure.bat"> Makefile.2
+echo all.dos : as.new gasp.new>> Makefile.2
if exist config.sed del config.sed
-echo "s/^ \$(srcdir)\/move-if-change/ update/ ">> config.sed
-echo "/\.o[ ]*:/ s/config.status// ">> config.sed
-echo "/^target=/ c\ ">> config.sed
-echo "target=go32 ">> config.sed
-echo "s/CC = cc/CC = gcc/ ">> config.sed
-echo "s/:\$/: \$/g ">> config.sed
-echo "s/^ \ *\.\// go32 / ">> config.sed
-echo "s/`echo \$(srcdir)\///g ">> config.sed
-echo "s/ | sed 's,\^\\\.\/,,'`//g ">> config.sed
-echo "s/^ cd \$(srcdir)[ ]*;// ">> config.sed
-
-echo "/^####/ i\ ">> config.sed
-echo "TDEFINES=-DMANY_SEGMENTS -DI386COFF \ ">> config.sed
-echo "LOCAL_LOADLIBES=../bfd/libbfd.a ">> config.sed
+echo "s/@srcdir@/./g ">> config.sed
+echo "s/@target_alias@/go32/ ">> config.sed
+echo "s/@prefix@// ">> config.sed
+echo "s/@CC@/gcc/g ">> config.sed
+echo "s/@OPCODES_LIB@/..\/opcodes\/libopcodes.a/g ">> config.sed
+echo "s/@BFDLIB@/..\/bfd\/libbfd.a/g ">> config.sed
+echo "s/@ALL_OBJ_DEPS@/..\/bfd\/bfd.h/g ">> config.sed
echo "/^all[ ]*:/ a\ ">> config.sed
echo "dummy: ">> config.sed
-echo "s/\/usr[^ ]*errno.h//g ">> config.sed
+echo "s/\/usr[^ ]*.h//g ">> config.sed
echo "/^config.h[ ]*:/ d ">> config.sed
+echo "s/^Makefile/not-Makefile/ ">> config.sed
sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed
sed -f config2.sed Makefile.in >> Makefile.2
@@ -57,9 +50,8 @@ del Makefile.2
del config.sed
del config2.sed
-echo > config-stamp
-echo #define TARGET_CPU "i386">config.h1
-echo #define TARGET_ALIAS "i386">>config.h1
-echo #define TARGET_CANONICAL "i386">>config.h1
-sed -n "/^VERSION=/p" Makefile.in | sed -e "s/VERSION=/#define GAS_VERSION \"/" -e "s/$/\"/">> config.h1
-update config.h1 config.h
+echo #ifndef GAS_VERSION> config.new
+sed -n "/^VERSION=/p" Makefile.in | sed -e "s/VERSION=/#define GAS_VERSION \"/" -e "s/$/\"/">> config.new
+type config\go32.cfg >> config.new
+echo #endif>> config.new
+update config.new config.h
diff --git a/gas/configure.in b/gas/configure.in
index 5244e61..70cf05e 100644
--- a/gas/configure.in
+++ b/gas/configure.in
@@ -43,7 +43,8 @@ changequote([,])dnl
mips*) cpu_type=mips endian=big ;;
powerpc*) cpu_type=ppc ;;
rs6000*) cpu_type=ppc ;;
- sparc64) cpu_type=sparc obj_format=elf AC_DEFINE(sparcv9) ;;
+ sparc64) cpu_type=sparc obj_format=elf
+ AC_DEFINE(sparcv9) ;;
sparclite*) cpu_type=sparc ;;
*) cpu_type=${target_cpu} ;;
esac
@@ -70,7 +71,7 @@ case ${generic_target} in
alpha-*-netware*) obj_format=ecoff ;;
alpha-*-osf*) obj_format=ecoff ;;
- arm-*-riscix*) obj_format=aout bfd_gas=yes ;;
+ arm-*-riscix*) obj_format=aout ;;
hppa-*-*elf*) obj_format=elf emulation=hppa ;;
hppa-*-osf*) obj_format=som emulation=hppa ;;
@@ -115,14 +116,14 @@ case ${generic_target} in
m68k-apollo-*) obj_format=coff gas_target=apollo emulation=apollo ;;
m68k-*-coff | m68k-*-sysv*)
obj_format=coff gas_target=m68kcoff ;;
- m68k-*-hpux) obj_format=hp300 emulation=hp300 ;;
+ m68k-*-hpux*) obj_format=hp300 emulation=hp300 ;;
m68k-*-lynxos*) obj_format=coff gas_target=m68kcoff
emulation=lynx ;;
m88k-*-coff*) obj_format=coff gas_target=m88kcoff ;;
# don't change emulation like *-*-bsd does
- mips-*-bsd*) bfd_gas=yes obj_format=aout gas_target=mips-lit ;;
+ mips-*-bsd*) obj_format=aout gas_target=mips-lit ;;
mips-*-ultrix*) obj_format=ecoff gas_target=mips-lit ;;
mips-*-ecoff*) obj_format=ecoff
case "$endian" in
@@ -141,22 +142,22 @@ case ${generic_target} in
*) gas_target=mips-lit ;;
esac
;;
- ppc-*-aix*) obj_format=coff bfd_gas=yes ;;
- ppc-*-elf*) obj_format=elf bfd_gas=yes ;;
+ ppc-*-aix*) obj_format=coff ;;
+ ppc-*-elf*) obj_format=elf ;;
ppc-*-netware*) obj_format=elf emulation=ppcnw ;;
- ppc-*-sysv4*) obj_format=elf bfd_gas=yes ;;
+ ppc-*-sysv4*) obj_format=elf ;;
sh-*-coff) obj_format=coff ;;
- ns32k-pc532-mach*) obj_format=aout emulation=pc532 bfd_gas=yes ;;
- ns32k-pc532-netbsd*) obj_format=aout emulation=netbsd532 bfd_gas=yes ;;
+ ns32k-pc532-mach*) obj_format=aout emulation=pc532 ;;
+ ns32k-pc532-netbsd*) obj_format=aout emulation=nbsd532 ;;
- sparc*-*-sunos4*) obj_format=aout emulation=sun3 bfd_gas=yes ;;
+ sparc*-*-sunos4*) obj_format=aout emulation=sun3 ;;
sparc*-*-aout | sparc*-*-vxworks)
- obj_format=aout bfd_gas=yes ;;
- sparc*-*-coff) obj_format=coff bfd_gas=yes ;;
- sparc*-*-lynxos*) obj_format=coff bfd_gas=yes emulation=lynx ;;
- sparc*-fujitsu-none) obj_format=aout bfd_gas=yes ;;
+ obj_format=aout ;;
+ sparc*-*-coff) obj_format=coff ;;
+ sparc*-*-lynxos*) obj_format=coff emulation=lynx ;;
+ sparc*-fujitsu-none) obj_format=aout ;;
sparc*-*-elf | sparc*-*-solaris*)
obj_format=elf ;;
@@ -210,11 +211,19 @@ fi
# and target makefile frag
target_frag=${srcdir}/config/${gas_target}.mt
+if test ! -r ${target_frag}; then
+ target_frag=/dev/null # ick! but subst_file can't be conditionalized
+fi
AC_SUBST_FILE(target_frag)
case ${cpu_type}-${obj_format} in
+ arm-*) bfd_gas=yes ;;
# not yet
# i386-aout) bfd_gas=preferred ;;
+ mips-*) bfd_gas=yes ;;
+ ns32k-*) bfd_gas=yes ;;
+ ppc-*) bfd_gas=yes ;;
+ sparc*-*) bfd_gas=yes ;;
*-elf) bfd_gas=yes ;;
*-ecoff) bfd_gas=yes ;;
*-som) bfd_gas=yes ;;
@@ -234,6 +243,9 @@ case ${user_bfd_gas}-${bfd_gas} in
*-preferred)
bfd_gas=yes
;;
+ yes-*)
+ bfd_gas=yes
+ ;;
-*)
# User specified nothing.
;;
@@ -277,16 +289,6 @@ AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}")
AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}")
AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}")
-case ${host} in
- rs6000-*-*)
- # The IBM compiler mis-compiles some expressions used in gas.
- # This will tell gas to work around this lossage.
- AC_DEFINE(IBM_COMPILER_SUX) ;;
- i386-*-go32)
- # Using fopen(..., "w") for a binary file breaks under DOS.
- AC_DEFINE(WANT_FOPEN_BIN) ;;
-esac
-
AC_PROG_CC
AC_PROG_INSTALL
@@ -296,10 +298,10 @@ AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.
# people who are not cross-compiling but are compiling cross-assemblers.
AC_MSG_CHECKING(whether compiling a cross-assembler)
if test "${host}" = "${target}"; then
+ cross_gas=no
+else
cross_gas=yes
AC_DEFINE(CROSS_COMPILE)
-else
- cross_gas=no
fi
AC_MSG_RESULT($cross_gas)
@@ -308,8 +310,8 @@ dnl AC_CONST
AC_FUNC_ALLOCA
AC_C_INLINE
-# VMS needs this.
-AC_CHECK_FUNCS(unlink delete, break)
+# VMS doesn't have unlink.
+AC_CHECK_FUNCS(unlink remove, break)
# Some non-ANSI preprocessors botch requoting inside strings. That's bad
# enough, but on some of those systems, the assert macro relies on requoting
@@ -347,6 +349,4 @@ GAS_CHECK_DECL_NEEDED(errno, f, int f, [
AC_CONFIG_SUBDIRS(testsuite)
dnl This must come last.
-dnl Apparently symlinks are checked for in the directory containing
-dnl the last Makefile. Thus the order used here...
AC_OUTPUT(Makefile doc/Makefile .gdbinit:gdbinit.in)
diff --git a/gas/read.c b/gas/read.c
index fc2d29b..3bedd14 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -2644,7 +2644,7 @@ s_include (arg)
strcpy (path, include_dirs[i]);
strcat (path, "/");
strcat (path, filename);
- if (0 != (try = fopen (path, FOPEN_RT)))
+ if (0 != (try = fopen (path, "r")))
{
fclose (try);
goto gotit;