* mpw-config.in: Add mapping from configs to object file formats,
authorStan Shebs <shebs@codesourcery.com>
Tue, 13 Dec 1994 03:52:01 +0000 (03:52 +0000)
committerStan Shebs <shebs@codesourcery.com>
Tue, 13 Dec 1994 03:52:01 +0000 (03:52 +0000)
get VERSION from Makefile.in and add to mk.tmp.
(mips-idt-ecoff) [TDEFINES]: Add TARGET_BYTES_BIG_ENDIAN.
* mpw-make.in (VERSION, gC): Don't define.
(ALL_CFLAGS): Remove -d flags.
(config.h): Remove definition of MPW, add HAVE_STDARG_H,
BFD_ASSEMBLER.

gas/ChangeLog.mpw
gas/mpw-config.in
gas/mpw-make.in

index f616bdbf29e489cd3915b5af83a4e617e3e7b38b..6537b32c1b25330de5119f3ca1ad03c103fdf8d0 100644 (file)
@@ -1,3 +1,13 @@
+Mon Dec 12 19:44:29 1994  Stan Shebs  <shebs@andros.cygnus.com>
+
+       * mpw-config.in: Add mapping from configs to object file formats,
+       get VERSION from Makefile.in and add to mk.tmp.
+       (mips-idt-ecoff) [TDEFINES]: Add TARGET_BYTES_BIG_ENDIAN.
+       * mpw-make.in (VERSION, gC): Don't define.
+       (ALL_CFLAGS): Remove -d flags.
+       (config.h): Remove definition of MPW, add HAVE_STDARG_H,
+       BFD_ASSEMBLER.
+
 Sat Sep 24 14:24:48 1994  Stan Shebs  (shebs@andros.cygnus.com)
 
        * mpw-make.in (config.h): Add defines from ho-mpw.h directly.
index f36bf7c221cc9cbdbf8dc59e281bdf93f0dd97d3..a6819f6d05e3665c9ece2089eee575453b3de1f1 100644 (file)
@@ -2,20 +2,34 @@
 
 Set target_arch `echo {target_canonical} | sed -e 's/-.*-.*//'`
 
-# (should canonicalize arch name) */
+# The following works for many configurations ...
 
-Set target_format `echo {target_canonical} | sed -e 's/.*-.*-//'`
+Set obj_format `echo {target_canonical} | sed -e 's/.*-.*-//'`
+
+# ... but not all.
+
+If "{target_canonical}" =~ /m68k-apple-macos/
+       Set obj_format "coff"
+Else If "{target_canonical}" =~ /ppc-apple-macos/
+       Set obj_format "xcoff"
+Else If "{target_canonical}" =~ /sh-hitachi-hms/
+       Set obj_format "coff"
+Else If "{target_canonical}" =~ /mips-idt-ecoff/
+       Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN'
+End If
 
 forward-include "{srcdir}"config:tc-{target_arch}.c targ-cpu.c
 forward-include "{srcdir}"config:tc-{target_arch}.h targ-cpu.h
 
-forward-include "{srcdir}"config:obj-{target_format}.c obj-format.c
-forward-include "{srcdir}"config:obj-{target_format}.h obj-format.h
+forward-include "{srcdir}"config:obj-{obj_format}.c obj-format.c
+forward-include "{srcdir}"config:obj-{obj_format}.h obj-format.h
 
 # Default emulation.
 
 forward-include "{srcdir}"config:te-generic.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/
@@ -26,3 +40,9 @@ 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 'VERSION = ' `Search 'VERSION=' "{srcdir}"Makefile.in | sed -e 's/.*VERSION=\(.*\)/\1/'` >> "{o}"mk.tmp
+
+Echo '# End from mpw-config.in'  >> "{o}"mk.tmp
index ac50ac8f41b03895dddb04d316192b8aa77e54ac..d568621305f91d575172e1659325b806ad551a98 100644 (file)
@@ -1,16 +1,12 @@
 # Makefile fragment for GAS.
 
-VERSION = cygnus-2.3.1
-
-gC = gC1
-
 s = "{srcdir}"
 
 o = :
 
 CROSS = -d CROSS_COMPILE
 
-ALL_CFLAGS = {CFLAGS} {CROSS} -d HAVE_STDARG_H -d TARGET_BYTES_BIG_ENDIAN -d BFD_ASSEMBLER -i "{topsrcdir}"include: -i "{topsrcdir}"bfd:,"{srcdir}",::libiberty:,::bfd:,::extra-include,"{srcroot}"include:mpw:
+ALL_CFLAGS = {CFLAGS} {CROSS} {TDEFINES} -i "{topsrcdir}"include: -i "{topsrcdir}"bfd:,"{srcdir}",::libiberty:,::bfd:,::extra-include,"{srcroot}"include:mpw:
 # debug options: -mbg on -sym on
 
 "{o}" \Option-f : "{s}"
@@ -20,9 +16,6 @@ ALL_CFLAGS = {CFLAGS} {CROSS} -d HAVE_STDARG_H -d TARGET_BYTES_BIG_ENDIAN -d BFD
 .c.o  \Option-f .c
    {CC}  {DepDir}{Default}.c {ALL_CFLAGS} -s gas_{Default} -o {TargDir}{Default}.c.o
 
-.gc.o  \Option-f .c
-   {gC}  {DepDir}{Default}.c {ALL_CFLAGS} -s gas_{Default} -o {TargDir}{Default}.gc.o
-
 prefix = usr:local:
 
 bindir = {prefix}bin:
@@ -65,7 +58,7 @@ INCLUDES =
 
 CLIBS = ::libiberty:libiberty.o        ::bfd:libbfd.o ::opcodes:libopcodes.o
 
-all \Option-f as.new
+all \Option-f "{o}"config.h as.new
 
 as.new \Option-f\Option-f {OBJECTS} {TARG_OBJECTS} {CLIBS}
        Link {LDFLAGS} -o as.new {OBJECTS} {TARG_OBJECTS} {CLIBS} {EXTRALIBS}
@@ -80,9 +73,6 @@ as.new \Option-f\Option-f {OBJECTS} {TARG_OBJECTS} {CLIBS}
        Echo '#define TARGET_CPU       "{target_cpu}"'       >> "{o}"config.new
        Echo '#define TARGET_ALIAS     "{target_alias}"'     >> "{o}"config.new
        Echo '#define TARGET_CANONICAL "{target_canonical}"' >> "{o}"config.new
-       Echo '#ifndef MPW'                              >> "{o}"config.new
-       Echo '#define MPW'                              >> "{o}"config.new
-       Echo '#endif'                                   >> "{o}"config.new
        Echo '#define bzero(a,b) memset(a,0,b)'         >> "{o}"config.new
        Echo '#define bcopy(a,b,c) memcpy(b,a,c)'       >> "{o}"config.new
        Echo '#define bcmp(a,b,c) memcmp(a,b,c)'        >> "{o}"config.new
@@ -90,6 +80,7 @@ as.new \Option-f\Option-f {OBJECTS} {TARG_OBJECTS} {CLIBS}
        Echo '#include <stdlib.h>'                      >> "{o}"config.new
        Echo '#include <string.h>'                      >> "{o}"config.new
        Echo '#include <memory.h>'                      >> "{o}"config.new
+       Echo '#include <spin.h>'                        >> "{o}"config.new
        Echo 'char *strdup();'                          >> "{o}"config.new
        Echo '#ifdef MPW_C'                             >> "{o}"config.new
        Echo '#undef  __PTR_TO_INT'                     >> "{o}"config.new
@@ -106,14 +97,15 @@ as.new \Option-f\Option-f {OBJECTS} {TARG_OBJECTS} {CLIBS}
        Echo '#define fseek mpw_fseek'                  >> "{o}"config.new
        Echo '#define abort mpw_abort'                  >> "{o}"config.new
        Echo '#define TRUE_FALSE_ALREADY_DEFINED'       >> "{o}"config.new
-       Echo '/* <cr> is an end-of-line marker. */'     >> "{o}"config.new
        Echo '#define CR_EOL'                           >> "{o}"config.new
        Echo '#define ABORT_ON_ERROR'                   >> "{o}"config.new
        Echo '#define LOSING_COMPILER'                  >> "{o}"config.new
        Echo '#define HOST_SPECIAL_INIT(argc,argv)  mpw_special_init ((argv)[0]);' >> "{o}"config.new
        Echo '#define WANT_FOPEN_BIN'                   >> "{o}"config.new
        Echo '#define HAVE_ERRNO_H'                     >> "{o}"config.new
-       Echo '#endif /* GAS_VERSION */'                 >> "{o}"config.new
+       Echo '#define HAVE_STDARG_H'                    >> "{o}"config.new
+       Echo '#define BFD_ASSEMBLER'                    >> "{o}"config.new
+    Echo '#endif /* GAS_VERSION */'                    >> "{o}"config.new
        MoveIfChange "{o}"config.new "{o}"config.h
        Echo ' ' >"{o}"config-stamp