2000-11-09 Kazu Hirata <kazu@hxi.com>
[deliverable/binutils-gdb.git] / gas / mpw-config.in
index 3e1f196e7656bb314c977da3a5c8db28a0d2b9ac..9e29b1d945cf1376d5254701c4f17d7a08310c6a 100644 (file)
@@ -12,6 +12,7 @@ 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
 
@@ -33,25 +34,25 @@ Else If "{target_canonical}" =~ /powerpc-apple-macos/
        Set bfd_gas yes
        Set em macos
 
-Else If "{target_canonical}" =~ /i386-unknown-go32/
+Else If "{target_canonical}" =~ /i386-\Option-x-go32/
        Set obj_format "coff"
        Set TDEFINES '-d I386COFF'
 
-Else If "{target_canonical}" =~ /m68k-unknown-coff/
+Else If "{target_canonical}" =~ /m68k-\Option-x-coff/
        Set TDEFINES '-d M68KCOFF'
 
 Else If "{target_canonical}" =~ /mips-idt-ecoff/
        Set bfd_gas yes
-       Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN'
+       Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN=1'
 
-# start-sanitize-gm
-Else If "{target_canonical}" =~ /mips-gm-magic/
-       Set obj_format "ecoff"
+Else If "{target_canonical}" =~ /mips-\Option-x-\Option-x/
+       # Assume other OSes etc use ELF
+       Set obj_format "elf"
        Set bfd_gas yes
-       Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN'
-# end-sanitize-gm
+       Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN=1'
+       forward-include "{srcroot}"bfd:elf-bfd.h 'bfd/elf-bfd.h'
 
-Else If "{target_canonical}" =~ /sh-hitachi-hms/
+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
@@ -90,6 +91,9 @@ 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
This page took 0.025061 seconds and 4 git commands to generate.