binutils-gdb/gas/mpw-config.in

116 lines
3.6 KiB
Plaintext
Raw Normal View History

# Configuration fragment for GAS.
Set target_arch `echo {target_canonical} | sed -e 's/-.*-.*//'`
If "{target_arch}" =~ /powerpc/
Set short_arch_name "ppc"
Set target_cpu "powerpc"
Else
Set short_arch_name "{target_arch}"
End If
# The following works for many configurations, though not all.
Set obj_format `echo {target_canonical} | sed -e 's/.*-.*-//'`
Set target_os `echo {target_canonical} | sed -e 's/.*-.*-//'`
Set bfd_gas no
Set TDEFINES ""
Set EXTRA_OBJECTS ""
# Default emulation.
Set em generic
If "{target_canonical}" =~ /m68k-apple-macos/
Set obj_format "coff"
Set TDEFINES '-d M68KCOFF'
Set EXTRA_OBJECTS '"{o}"m68k-parse.c.o'
Else If "{target_canonical}" =~ /powerpc-apple-macos/
Set obj_format "coff"
Set bfd_gas yes
Set em macos
Else If "{target_canonical}" =~ /i386-\Option-x-go32/
Set obj_format "coff"
Set TDEFINES '-d I386COFF'
Else If "{target_canonical}" =~ /m68k-\Option-x-coff/
Set TDEFINES '-d M68KCOFF'
Else If "{target_canonical}" =~ /mips-idt-ecoff/
Set bfd_gas yes
* doc/Makefile.in (TEXI2DVI): Set to just name of program. (DVIPS): Set to dvips. (ps, as.ps, gasp.ps): New targets. (internals.info, gasp.dvi, internals.dvi): Set both TEXINPUTS and MAKEINFO env variables. (internals.ps): Use DVIPS macro. (clean): Remove core and backup files. (distclean): Remove temporary files from building internals. (clean-dvi): Ditto. * doc/internals.texi (Frags): Fix typo. (GAS processing): Ditto. (CPU backend): Ditto. * ecoff.c (init_file): Use TARGET_BYTES_BIG_ENDIAN value directly. * mpw-config.in: Define TARGET_BYTES_BIG_ENDIAN as 1. * read.c: Remove ugly hack that dealt with config files not correctly defining TARGET_BYTES_BIG_ENDIAN. (target_big_endian): Use TARGET_BYTES_BIG_ENDIAN directly. * config/arm-big.mt: Define TARGET_BYTES_BIG_ENDIAN to 1. * config/arm-lit.mt: Define TARGET_BYTES_BIG_ENDIAN to 0. * config/mips-big.mt: Define TARGET_BYTES_BIG_ENDIAN to 1. * config/mips-lit.mt: Define TARGET_BYTES_BIG_ENDIAN to 0. * config/ppc-lit.mt: Define TARGET_BYTES_BIG_ENDIAN to 1. * config/ppc-sol.mt: Replace TARGET_BYTES_LITTLE_ENDIAN with TARGET_BYTES_BIG_ENDIAN defined to 0. * config/tc-arm.h: Remove use of TARGET_BYTES_LITTLE_ENDIAN and simplify. Test value of TARGET_BYTES_BIG_ENDIAN, not just whether it is defined or not. * config/tc-mips.h: Remove use of TARGET_BYTES_LITTLE_ENDIAN. * config/tc-ppc.h: Remove use of TARGET_BYTES_LITTLE_ENDIAN and simplify. Test value of TARGET_BYTES_BIG_ENDIAN, not just whether it is defined or not. start-sanitize-tic80 * config/tic80.h (TARGET_FORMAT): Define to coff-tic80. (TARGET_BYTES_BIG_ENDIAN): Define to 0. end-sanitize-tic80
1997-02-14 09:04:19 +08:00
Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN=1'
Else If "{target_canonical}" =~ /mips-\Option-x-\Option-x/
# Assume other OSes etc use ELF
Set obj_format "elf"
Set bfd_gas yes
* doc/Makefile.in (TEXI2DVI): Set to just name of program. (DVIPS): Set to dvips. (ps, as.ps, gasp.ps): New targets. (internals.info, gasp.dvi, internals.dvi): Set both TEXINPUTS and MAKEINFO env variables. (internals.ps): Use DVIPS macro. (clean): Remove core and backup files. (distclean): Remove temporary files from building internals. (clean-dvi): Ditto. * doc/internals.texi (Frags): Fix typo. (GAS processing): Ditto. (CPU backend): Ditto. * ecoff.c (init_file): Use TARGET_BYTES_BIG_ENDIAN value directly. * mpw-config.in: Define TARGET_BYTES_BIG_ENDIAN as 1. * read.c: Remove ugly hack that dealt with config files not correctly defining TARGET_BYTES_BIG_ENDIAN. (target_big_endian): Use TARGET_BYTES_BIG_ENDIAN directly. * config/arm-big.mt: Define TARGET_BYTES_BIG_ENDIAN to 1. * config/arm-lit.mt: Define TARGET_BYTES_BIG_ENDIAN to 0. * config/mips-big.mt: Define TARGET_BYTES_BIG_ENDIAN to 1. * config/mips-lit.mt: Define TARGET_BYTES_BIG_ENDIAN to 0. * config/ppc-lit.mt: Define TARGET_BYTES_BIG_ENDIAN to 1. * config/ppc-sol.mt: Replace TARGET_BYTES_LITTLE_ENDIAN with TARGET_BYTES_BIG_ENDIAN defined to 0. * config/tc-arm.h: Remove use of TARGET_BYTES_LITTLE_ENDIAN and simplify. Test value of TARGET_BYTES_BIG_ENDIAN, not just whether it is defined or not. * config/tc-mips.h: Remove use of TARGET_BYTES_LITTLE_ENDIAN. * config/tc-ppc.h: Remove use of TARGET_BYTES_LITTLE_ENDIAN and simplify. Test value of TARGET_BYTES_BIG_ENDIAN, not just whether it is defined or not. start-sanitize-tic80 * config/tic80.h (TARGET_FORMAT): Define to coff-tic80. (TARGET_BYTES_BIG_ENDIAN): Define to 0. end-sanitize-tic80
1997-02-14 09:04:19 +08:00
Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN=1'
forward-include "{srcroot}"bfd:elf-bfd.h 'bfd/elf-bfd.h'
Else If "{target_canonical}" =~ /sh-\Option-x-hms/
Set obj_format "coff"
forward-include "{srcroot}"opcodes:sh-opc.h 'opcodes/sh-opc.h'
End If
forward-include "{srcdir}"config:tc-{short_arch_name}.c targ-cpu.c
forward-include "{srcdir}"config:tc-{short_arch_name}.h targ-cpu.h
forward-include "{srcdir}"config:obj-{obj_format}.c obj-format.c
forward-include "{srcdir}"config:obj-{obj_format}.h obj-format.h
forward-include "{srcdir}"config:te-{em}.h targ-env.h
# Special cases for float handling.
If "{target_arch}" =~ /ns32k/
forward-include "{srcdir}"config:atof-ns32k.c atof-targ.c
Else If "{target_arch}" =~ /tahoe/
forward-include "{srcdir}"config:atof-tahoe.c atof-targ.c
Else If "{target_arch}" =~ /vax/
forward-include "{srcdir}"config:atof-vax.c atof-targ.c
Else
# Use IEEE by default.
forward-include "{srcdir}"config:atof-ieee.c atof-targ.c
End If
Echo '# From mpw-config.in' > "{o}"mk.tmp
Echo "TDEFINES = " {TDEFINES} >> "{o}"mk.tmp
Echo "EXTRA_OBJECTS = " {EXTRA_OBJECTS} >> "{o}"mk.tmp
# (We use the -n option here so as not to get extra spaces inserted)
Echo -n 'TARG_CPU_DEP = {TARG_CPU_DEP_' >> "{o}"mk.tmp
Echo -n {short_arch_name} >> "{o}"mk.tmp
Echo -n '}' >> "{o}"mk.tmp
Echo '# End from mpw-config.in' >> "{o}"mk.tmp
Echo '/* conf. Generated by mpw-configure. */' > "{o}"conf.new
Echo -n '#define TARGET_CPU "' >> "{o}"conf.new
Echo -n "{target_cpu}" >> "{o}"conf.new
Echo '"' >> "{o}"conf.new
Echo -n '#define TARGET_OS "' >> "{o}"conf.new
Echo -n "{target_os}" >> "{o}"conf.new
Echo '"' >> "{o}"conf.new
Echo -n '#define TARGET_ALIAS "' >> "{o}"conf.new
Echo -n "{target_alias}" >> "{o}"conf.new
Echo '"' >> "{o}"conf.new
Echo -n '#define TARGET_CANONICAL "' >> "{o}"conf.new
Echo -n "{target_canonical}" >> "{o}"conf.new
Echo '"' >> "{o}"conf.new
Echo '#include "mpw.h"' >> "{o}"conf.new
If "{bfd_gas}" =~ /yes/
Echo "#define BFD_ASSEMBLER" >> "{o}"conf.new
Else
Echo "#define MANY_SEGMENTS" >> "{o}"conf.new
End If
Echo '#define CR_EOL' >> "{o}"conf.new
Echo '#define OBJ_COFF_OMIT_TIMESTAMP' >> "{o}"conf.new
Echo '#define LOSING_COMPILER' >> "{o}"conf.new
MoveIfChange "{o}"conf.new "{o}"conf
sed -e "s/@srcdir@/{srcdir}/" "{srcdir}"gdbinit.in > "{o}"_gdbinit