From a23e2b7cdebb597ff654d1757fc580cce1120be3 Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Tue, 13 Dec 1994 03:52:01 +0000 Subject: [PATCH] * 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. --- gas/ChangeLog.mpw | 10 ++++++++++ gas/mpw-config.in | 28 ++++++++++++++++++++++++---- gas/mpw-make.in | 20 ++++++-------------- 3 files changed, 40 insertions(+), 18 deletions(-) diff --git a/gas/ChangeLog.mpw b/gas/ChangeLog.mpw index f616bdbf29e..6537b32c1b2 100644 --- a/gas/ChangeLog.mpw +++ b/gas/ChangeLog.mpw @@ -1,3 +1,13 @@ +Mon Dec 12 19:44:29 1994 Stan Shebs + + * 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. diff --git a/gas/mpw-config.in b/gas/mpw-config.in index f36bf7c221c..a6819f6d05e 100644 --- a/gas/mpw-config.in +++ b/gas/mpw-config.in @@ -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 diff --git a/gas/mpw-make.in b/gas/mpw-make.in index ac50ac8f41b..d568621305f 100644 --- a/gas/mpw-make.in +++ b/gas/mpw-make.in @@ -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 ' >> "{o}"config.new Echo '#include ' >> "{o}"config.new Echo '#include ' >> "{o}"config.new + Echo '#include ' >> "{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 '/* 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 -- 2.30.2