diff options
author | cvs2svn <> | 2004-03-30 20:03:10 +0000 |
---|---|---|
committer | cvs2svn <> | 2004-03-30 20:03:10 +0000 |
commit | e31af88b736d3bef7f5a53aaade099ac0d2c0ca0 (patch) | |
tree | d0dcf64ec5c5c40bf89e2ff71892211088207ef6 | |
parent | f3a88e3bd25802e6acc3fb5d716ad12b4e67f494 (diff) | |
download | newlib-drow_intercu-merge-20040402.zip newlib-drow_intercu-merge-20040402.tar.gz newlib-drow_intercu-merge-20040402.tar.bz2 |
This commit was manufactured by cvs2svn to create tag 'drow_intercu-drow_intercu-merge-20040402
merge-20040402'.
Sprout from ezannoni_pie-20040323-branch 2004-03-23 23:05:53 UTC cvs2svn 'This commit was manufactured by cvs2svn to create branch'
Cherrypick from master 2004-03-30 20:03:09 UTC DJ Delorie <dj@redhat.com> 'merge from gcc':
ChangeLog
MAINTAINERS
Makefile.in
Makefile.tpl
configure
configure.in
include/ChangeLog
include/elf/ChangeLog
include/elf/common.h
include/elf/cr16c.h
include/hashtab.h
include/splay-tree.h
src-release
Delete:
include/mpw/ChangeLog
include/mpw/README
include/mpw/dir.h
include/mpw/dirent.h
include/mpw/fcntl.h
include/mpw/grp.h
include/mpw/mpw.h
include/mpw/pwd.h
include/mpw/spin.h
include/mpw/stat.h
include/mpw/sys/file.h
include/mpw/sys/param.h
include/mpw/sys/resource.h
include/mpw/sys/stat.h
include/mpw/sys/time.h
include/mpw/sys/types.h
include/mpw/utime.h
include/mpw/varargs.h
mpw-README
mpw-build.in
mpw-config.in
mpw-configure
mpw-install
36 files changed, 342 insertions, 1937 deletions
@@ -1,3 +1,35 @@ +2004-03-25 Stan Shebs <shebs@apple.com> + + Remove MPW support, no longer used. + * mpw-README, mpw-build.in, mpw-config.in, mpw-configure, + mpw-install: Remove files. + * src-release (DEVO_SUPPORT): Remove names of removed files. + * MAINTAINERS: Likewise. + +2004-03-24 Nathanael Nerode <neroden@gcc.gnu.org> + + * Makefile.tpl (top level bootstrap support): Remove now-unneeded + STRICT_WARN, WARN_CFLAGS flags passed down to make. + * Makefile.in: Regenerate. + + * configure.in (top level bootstrap support): Rework --enable-werror + to set @stage2_werror_flag@. + * configure: Regenerate. + * Makefile.tpl (top level bootstrap support): Pass + @stage2_werror_flag@ down to configure in stages 2 and 3. + * Makefile.in: Regenerate. + +2004-03-23 Nathanael Nerode <neroden@gcc.gnu.org> + + * Makefile.tpl (new-bootstrap): Set CC and CC_FOR_BUILD in configure + for stages 2 and 3 as well as in make. As a consequence, remove + OUTPUT_OPTION (now detected by configure) from the flags passed down + to make. + * Makefile.in: Regenerate. + + * Makefile.tpl (new-bootstrap): Fix typo. + * Makefile.in: Regenerate. + 2004-03-22 Nathanael Nerode <neroden@gcc.gnu.org> * Makefile.tpl: Rearrange by moving recursive_targets rules diff --git a/MAINTAINERS b/MAINTAINERS index c9ad6b3..7194268 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -100,8 +100,7 @@ winsup/ General discussion cygwin@sources.redhat.com. See also winsup/MAINTAINERS. -expect/; config-ml.in; mpw-README; mpw-build.in; mpw-config.in; -mpw-configure; mpw-install; setup.com; missing; makefile.vms; utils/; +expect/; config-ml.in; setup.com; missing; makefile.vms; utils/; config/; config.if; makefile.vms; missing; ylwrap; mkdep; etc/; install-sh; intl/ Ask DJ Delorie <dj@redhat.com> after reading the libiberty entry. diff --git a/Makefile.in b/Makefile.in index 68f43e6..5935660 100644 --- a/Makefile.in +++ b/Makefile.in @@ -24046,6 +24046,8 @@ all-stage1-gcc: configure-stage1-gcc prebootstrap $(STAMP) all-stage1-gcc # TODO: Deal with STAGE_PREFIX (which is only for ada, incidentally) +# Possibly pass --enable-werror-always (depending on --enable-werror); +# that's what @stage2_werror_flag@ is for configure-stage2-gcc: all-stage1-gcc echo configure-stage2-gcc > stage_last ; \ if [ -f stage2-gcc/Makefile ] ; then \ @@ -24061,13 +24063,11 @@ configure-stage2-gcc: all-stage1-gcc s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ - CC="$(CC)"; export CC; \ CFLAGS="$(CFLAGS)"; export CFLAGS; \ CXX="$(CXX)"; export CXX; \ CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ AR="$(AR)"; export AR; \ AS="$(AS)"; export AS; \ - CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ LD="$(LD)"; export LD; \ NM="$(NM)"; export NM; \ @@ -24075,6 +24075,8 @@ configure-stage2-gcc: all-stage1-gcc WINDRES="$(WINDRES)"; export WINDRES; \ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \ + CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \ echo Configuring stage 2 in gcc; \ cd gcc || exit 1; \ case $(srcdir) in \ @@ -24089,7 +24091,7 @@ configure-stage2-gcc: all-stage1-gcc libsrcdir="$$s/gcc";; \ esac; \ $(SHELL) $${libsrcdir}/configure \ - $(HOST_CONFIGARGS) $${srcdiroption} ; \ + $(HOST_CONFIGARGS) $${srcdiroption} @stage2_werror_flag@ ; \ cd .. ; \ mv gcc stage2-gcc ; \ mv prev-gcc stage1-gcc ; \ @@ -24099,10 +24101,7 @@ configure-stage2-gcc: all-stage1-gcc BOOT_CFLAGS= -g -O2 POSTSTAGE1_FLAGS_TO_PASS = \ CFLAGS="$(BOOT_CFLAGS)" \ - ADAC="\$$(CC)" \ - WARN_CFLAGS="\$$(GCC_WARN_CFLAGS)" \ - STRICT_WARN="\$$(STRICT2_WARN)" \ - OUTPUT_OPTION="-o \$$@" + ADAC="\$$(CC)" all-stage2-gcc: all-stage1-gcc configure-stage2-gcc echo all-stage2-gcc > stage_last ; \ @@ -24131,18 +24130,16 @@ configure-stage3-gcc: all-stage2-gcc fi ; \ [ -d stage3-gcc ] || mkdir stage3-gcc; \ mv stage3-gcc gcc ; \ - mv stage1-gcc prev-gcc ; \ + mv stage2-gcc prev-gcc ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ - CC="$(CC)"; export CC; \ CFLAGS="$(CFLAGS)"; export CFLAGS; \ CXX="$(CXX)"; export CXX; \ CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ AR="$(AR)"; export AR; \ AS="$(AS)"; export AS; \ - CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ LD="$(LD)"; export LD; \ NM="$(NM)"; export NM; \ @@ -24150,6 +24147,8 @@ configure-stage3-gcc: all-stage2-gcc WINDRES="$(WINDRES)"; export WINDRES; \ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \ + CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \ echo Configuring stage 3 in gcc; \ cd gcc || exit 1; \ case $(srcdir) in \ @@ -24164,7 +24163,7 @@ configure-stage3-gcc: all-stage2-gcc libsrcdir="$$s/gcc";; \ esac; \ $(SHELL) $${libsrcdir}/configure \ - $(HOST_CONFIGARGS) $${srcdiroption} ; \ + $(HOST_CONFIGARGS) $${srcdiroption} @stage2_werror_flag@ ; \ cd .. ; \ mv gcc stage3-gcc ; \ mv prev-gcc stage2-gcc ; \ diff --git a/Makefile.tpl b/Makefile.tpl index 91fdae2..cd7e06e 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -1374,6 +1374,8 @@ all-stage1-gcc: configure-stage1-gcc prebootstrap $(STAMP) all-stage1-gcc # TODO: Deal with STAGE_PREFIX (which is only for ada, incidentally) +# Possibly pass --enable-werror-always (depending on --enable-werror); +# that's what @stage2_werror_flag@ is for configure-stage2-gcc: all-stage1-gcc echo configure-stage2-gcc > stage_last ; \ if [ -f stage2-gcc/Makefile ] ; then \ @@ -1389,13 +1391,11 @@ configure-stage2-gcc: all-stage1-gcc s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ - CC="$(CC)"; export CC; \ CFLAGS="$(CFLAGS)"; export CFLAGS; \ CXX="$(CXX)"; export CXX; \ CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ AR="$(AR)"; export AR; \ AS="$(AS)"; export AS; \ - CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ LD="$(LD)"; export LD; \ NM="$(NM)"; export NM; \ @@ -1403,6 +1403,8 @@ configure-stage2-gcc: all-stage1-gcc WINDRES="$(WINDRES)"; export WINDRES; \ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \ + CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \ echo Configuring stage 2 in gcc; \ cd gcc || exit 1; \ case $(srcdir) in \ @@ -1417,7 +1419,7 @@ configure-stage2-gcc: all-stage1-gcc libsrcdir="$$s/gcc";; \ esac; \ $(SHELL) $${libsrcdir}/configure \ - $(HOST_CONFIGARGS) $${srcdiroption} ; \ + $(HOST_CONFIGARGS) $${srcdiroption} @stage2_werror_flag@ ; \ cd .. ; \ mv gcc stage2-gcc ; \ mv prev-gcc stage1-gcc ; \ @@ -1427,10 +1429,7 @@ configure-stage2-gcc: all-stage1-gcc BOOT_CFLAGS= -g -O2 POSTSTAGE1_FLAGS_TO_PASS = \ CFLAGS="$(BOOT_CFLAGS)" \ - ADAC="\$$(CC)" \ - WARN_CFLAGS="\$$(GCC_WARN_CFLAGS)" \ - STRICT_WARN="\$$(STRICT2_WARN)" \ - OUTPUT_OPTION="-o \$$@" + ADAC="\$$(CC)" all-stage2-gcc: all-stage1-gcc configure-stage2-gcc echo all-stage2-gcc > stage_last ; \ @@ -1459,18 +1458,16 @@ configure-stage3-gcc: all-stage2-gcc fi ; \ [ -d stage3-gcc ] || mkdir stage3-gcc; \ mv stage3-gcc gcc ; \ - mv stage1-gcc prev-gcc ; \ + mv stage2-gcc prev-gcc ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ - CC="$(CC)"; export CC; \ CFLAGS="$(CFLAGS)"; export CFLAGS; \ CXX="$(CXX)"; export CXX; \ CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ AR="$(AR)"; export AR; \ AS="$(AS)"; export AS; \ - CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ LD="$(LD)"; export LD; \ NM="$(NM)"; export NM; \ @@ -1478,6 +1475,8 @@ configure-stage3-gcc: all-stage2-gcc WINDRES="$(WINDRES)"; export WINDRES; \ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \ + CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \ echo Configuring stage 3 in gcc; \ cd gcc || exit 1; \ case $(srcdir) in \ @@ -1492,7 +1491,7 @@ configure-stage3-gcc: all-stage2-gcc libsrcdir="$$s/gcc";; \ esac; \ $(SHELL) $${libsrcdir}/configure \ - $(HOST_CONFIGARGS) $${srcdiroption} ; \ + $(HOST_CONFIGARGS) $${srcdiroption} @stage2_werror_flag@ ; \ cd .. ; \ mv gcc stage3-gcc ; \ mv prev-gcc stage2-gcc ; \ @@ -4484,9 +4484,9 @@ else enable_werror=yes fi -case ${enable_error} in - yes) WERROR=-Werror ;; - *) WERROR= ;; +case ${enable_werror} in + yes) stage2_werror_flag="--enable-werror-always" ;; + *) stage2_werror_flag="" ;; esac @@ -4745,7 +4745,7 @@ s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g s%@MAINT@%$MAINT%g s%@stage1_cflags@%$stage1_cflags%g -s%@WERROR@%$WERROR%g +s%@stage2_werror_flag@%$stage2_werror_flag%g CEOF EOF diff --git a/configure.in b/configure.in index 0a9f05f..5735d84 100644 --- a/configure.in +++ b/configure.in @@ -2129,10 +2129,10 @@ AC_SUBST(stage1_cflags) AC_ARG_ENABLE(werror, [ --enable-werror enable -Werror in bootstrap stage2 and later], [], [enable_werror=yes]) -case ${enable_error} in - yes) WERROR=-Werror ;; - *) WERROR= ;; +case ${enable_werror} in + yes) stage2_werror_flag="--enable-werror-always" ;; + *) stage2_werror_flag="" ;; esac -AC_SUBST(WERROR) +AC_SUBST(stage2_werror_flag) AC_OUTPUT(Makefile) diff --git a/include/ChangeLog b/include/ChangeLog index 7f60004..883088e 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,11 @@ +2004-03-30 Zack Weinberg <zack@codesourcery.com> + + * hashtab.h, splay-tree.h: Use new shorter form of GTY markers. + +2004-03-25 Stan Shebs <shebs@apple.com> + + * mpw/: Remove subdirectory and everything in it. + 2004-03-23 Alan Modra <amodra@bigpond.net.au> PR 51. diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index 385b857..28ec205 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,9 @@ +2004-30-30 Galit Heller <Galit.Heller@nsc.com> + Tomer Levi <Tomer.Levi@nsc.com> + + * common.h (EM_CR): Define. + * cr16c.h: New file. + 2004-03-23 Paul Brook <paul@codesourcery.com> * arm.h (EF_ERM_BE8, EF_ARM_LE8, EF_ARM_EABI_VER3): Add. diff --git a/include/elf/common.h b/include/elf/common.h index bf233f6..8ebc2cf 100644 --- a/include/elf/common.h +++ b/include/elf/common.h @@ -180,6 +180,7 @@ #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ #define EM_IP2K 101 /* Ubicom IP2022 micro controller */ +#define EM_CR 103 /* National Semiconductor CompactRISC */ #define EM_MSP430 105 /* TI msp430 micro controller */ /* If it is necessary to assign new unofficial EM_* values, please pick large diff --git a/include/elf/cr16c.h b/include/elf/cr16c.h new file mode 100644 index 0000000..1a91afe --- /dev/null +++ b/include/elf/cr16c.h @@ -0,0 +1,258 @@ +/* CR16C ELF support for BFD. + Copyright 2004 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program 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 of the License, or + (at your option) any later version. + + This program 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 program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _ELF_CR16C_H +#define _ELF_CR16C_H + +#include "bfd.h" +#include "elf/reloc-macros.h" + +/* Creating indices for reloc_map_index array. */ +START_RELOC_NUMBERS (elf_cr16c_reloc_type) + RELOC_NUMBER (RINDEX_16C_NUM08, 0) + RELOC_NUMBER (RINDEX_16C_NUM08_C, 1) + RELOC_NUMBER (RINDEX_16C_NUM16, 2) + RELOC_NUMBER (RINDEX_16C_NUM16_C, 3) + RELOC_NUMBER (RINDEX_16C_NUM32, 4) + RELOC_NUMBER (RINDEX_16C_NUM32_C, 5) + RELOC_NUMBER (RINDEX_16C_DISP04, 6) + RELOC_NUMBER (RINDEX_16C_DISP04_C, 7) + RELOC_NUMBER (RINDEX_16C_DISP08, 8) + RELOC_NUMBER (RINDEX_16C_DISP08_C, 9) + RELOC_NUMBER (RINDEX_16C_DISP16, 10) + RELOC_NUMBER (RINDEX_16C_DISP16_C, 11) + RELOC_NUMBER (RINDEX_16C_DISP24, 12) + RELOC_NUMBER (RINDEX_16C_DISP24_C, 13) + RELOC_NUMBER (RINDEX_16C_DISP24a, 14) + RELOC_NUMBER (RINDEX_16C_DISP24a_C, 15) + RELOC_NUMBER (RINDEX_16C_REG04, 16) + RELOC_NUMBER (RINDEX_16C_REG04_C, 17) + RELOC_NUMBER (RINDEX_16C_REG04a, 18) + RELOC_NUMBER (RINDEX_16C_REG04a_C, 19) + RELOC_NUMBER (RINDEX_16C_REG14, 20) + RELOC_NUMBER (RINDEX_16C_REG14_C, 21) + RELOC_NUMBER (RINDEX_16C_REG16, 22) + RELOC_NUMBER (RINDEX_16C_REG16_C, 23) + RELOC_NUMBER (RINDEX_16C_REG20, 24) + RELOC_NUMBER (RINDEX_16C_REG20_C, 25) + RELOC_NUMBER (RINDEX_16C_ABS20, 26) + RELOC_NUMBER (RINDEX_16C_ABS20_C, 27) + RELOC_NUMBER (RINDEX_16C_ABS24, 28) + RELOC_NUMBER (RINDEX_16C_ABS24_C, 29) + RELOC_NUMBER (RINDEX_16C_IMM04, 30) + RELOC_NUMBER (RINDEX_16C_IMM04_C, 31) + RELOC_NUMBER (RINDEX_16C_IMM16, 32) + RELOC_NUMBER (RINDEX_16C_IMM16_C, 33) + RELOC_NUMBER (RINDEX_16C_IMM20, 34) + RELOC_NUMBER (RINDEX_16C_IMM20_C, 35) + RELOC_NUMBER (RINDEX_16C_IMM24, 36) + RELOC_NUMBER (RINDEX_16C_IMM24_C, 37) + RELOC_NUMBER (RINDEX_16C_IMM32, 38) + RELOC_NUMBER (RINDEX_16C_IMM32_C, 39) +END_RELOC_NUMBERS (RINDEX_16C_MAX) + +/* CR16C Relocation Types ('cr_reloc_type' entry in the reloc_map structure). + The relocation constant name is determined as follows : + + R_16C_<format><size>[_C] + + Where : + + <format> is one of the following: + NUM - R_NUMBER mnemonic, + DISP - R_16C_DISPL mnemonic, + REG - R_16C_REGREL mnemonic, + ABS - R_16C_ABS mnemonic, + IMM - R_16C_IMMED mnemonic, + <size> stands for R_S_16C_<size> + _C means 'code label' and is only added when R_ADDRTYPE subfield + is of type R_CODE_ADDR. */ + +/* The table below shows what the hex digits in the definition of the + relocation type constants correspond to. + ------------------------------------------------------------------ + R_SIZESP R_FORMAT R_RELTO R_ADDRTYPE + ------------------------------------------------------------------ */ +/* R_S_16C_08 R_NUMBER R_ABS R_ADDRESS */ +#define R_16C_NUM08 0X0001 + +/* R_S_16C_08 R_NUMBER R_ABS R_CODE_ADDR */ +#define R_16C_NUM08_C 0X0006 + +/* R_S_16C_16 R_NUMBER R_ABS R_ADDRESS */ +#define R_16C_NUM16 0X1001 + +/* R_S_16C_16 R_NUMBER R_ABS R_CODE_ADDR */ +#define R_16C_NUM16_C 0X1006 + +/* R_S_16C_32 R_NUMBER R_ABS R_ADDRESS */ +#define R_16C_NUM32 0X2001 + +/* R_S_16C_32 R_NUMBER R_ABS R_CODE_ADDR */ +#define R_16C_NUM32_C 0X2006 + +/* R_S_16C_04 R_16C_DISPL R_PCREL R_ADDRESS */ +#define R_16C_DISP04 0X5411 + +/* R_S_16C_04 R_16C_DISPL R_PCREL R_CODE_ADDR */ +#define R_16C_DISP04_C 0X5416 + +/* R_S_16C_08 R_16C_DISPL R_PCREL R_ADDRESS */ +#define R_16C_DISP08 0X0411 + +/* R_S_16C_08 R_16C_DISPL R_PCREL R_CODE_ADDR */ +#define R_16C_DISP08_C 0X0416 + +/* R_S_16C_16 R_16C_DISPL R_PCREL R_ADDRESS */ +#define R_16C_DISP16 0X1411 + +/* R_S_16C_16 R_16C_DISPL R_PCREL R_CODE_ADDR */ +#define R_16C_DISP16_C 0X1416 + +/* R_S_16C_24 R_16C_DISPL R_PCREL R_ADDRESS */ +#define R_16C_DISP24 0X7411 + +/* R_S_16C_24 R_16C_DISPL R_PCREL R_CODE_ADDR */ +#define R_16C_DISP24_C 0X7416 + +/* R_S_16C_24a R_16C_DISPL R_PCREL R_ADDRESS */ +#define R_16C_DISP24a 0X6411 + +/* R_S_16C_24a R_16C_DISPL R_PCREL R_CODE_ADDR */ +#define R_16C_DISP24a_C 0X6416 + +/* R_S_16C_04 R_16C_REGREL R_ABS R_ADDRESS */ +#define R_16C_REG04 0X5201 + +/* R_S_16C_04 R_16C_REGREL R_ABS R_CODE_ADDR */ +#define R_16C_REG04_C 0X5206 + +/* R_S_16C_04_a R_16C_REGREL R_ABS R_ADDRESS */ +#define R_16C_REG04a 0X4201 + +/* R_S_16C_04_a R_16C_REGREL R_ABS R_CODE_ADDR */ +#define R_16C_REG04a_C 0X4206 + +/* R_S_16C_14 R_16C_REGREL R_ABS R_ADDRESS */ +#define R_16C_REG14 0X3201 + +/* R_S_16C_14 R_16C_REGREL R_ABS R_CODE_ADDR */ +#define R_16C_REG14_C 0X3206 + +/* R_S_16C_16 R_16C_REGREL R_ABS R_ADDRESS */ +#define R_16C_REG16 0X1201 + +/* R_S_16C_16 R_16C_REGREL R_ABS R_CODE_ADDR */ +#define R_16C_REG16_C 0X1206 + +/* R_S_16C_20 R_16C_REGREL R_ABS R_ADDRESS */ +#define R_16C_REG20 0X8201 + +/* R_S_16C_20 R_16C_REGREL R_ABS R_CODE_ADDR */ +#define R_16C_REG20_C 0X8206 + +/* R_S_16C_20 R_16C_ABS R_ABS R_ADDRESS */ +#define R_16C_ABS20 0X8101 + +/* R_S_16C_20 R_16C_ABS R_ABS R_CODE_ADDR */ +#define R_16C_ABS20_C 0X8106 + +/* R_S_16C_24 R_16C_ABS R_ABS R_ADDRESS */ +#define R_16C_ABS24 0X7101 + +/* R_S_16C_24 R_16C_ABS R_ABS R_CODE_ADDR */ +#define R_16C_ABS24_C 0X7106 + +/* R_S_16C_04 R_16C_IMMED R_ABS R_ADDRESS */ +#define R_16C_IMM04 0X5301 + +/* R_S_16C_04 R_16C_IMMED R_ABS R_CODE_ADDR */ +#define R_16C_IMM04_C 0X5306 + +/* R_S_16C_16 R_16C_IMMED R_ABS R_ADDRESS */ +#define R_16C_IMM16 0X1301 + +/* R_S_16C_16 R_16C_IMMED R_ABS R_CODE_ADDR */ +#define R_16C_IMM16_C 0X1306 + +/* R_S_16C_20 R_16C_IMMED R_ABS R_ADDRESS */ +#define R_16C_IMM20 0X8301 + +/* R_S_16C_20 R_16C_IMMED R_ABS R_CODE_ADDR */ +#define R_16C_IMM20_C 0X8306 + +/* R_S_16C_24 R_16C_IMMED R_ABS R_ADDRESS */ +#define R_16C_IMM24 0X7301 + +/* R_S_16C_24 R_16C_IMMED R_ABS R_CODE_ADDR */ +#define R_16C_IMM24_C 0X7306 + +/* R_S_16C_32 R_16C_IMMED R_ABS R_ADDRESS */ +#define R_16C_IMM32 0X2301 + +/* R_S_16C_32 R_16C_IMMED R_ABS R_CODE_ADDR */ +#define R_16C_IMM32_C 0X2306 + + +/* Relocation item type. */ +#define R_ADDRTYPE 0x000f +#define R_ADDRESS 0x0001 /* Take address of symbol. */ +#define R_CODE_ADDR 0x0006 /* Take address of symbol divided by 2. */ + +/* Relocation action. */ +#define R_RELTO 0x00f0 +#define R_ABS 0x0000 /* Keep symbol's address as such. */ +#define R_PCREL 0x0010 /* Subtract the pc address of hole. */ + +/* Relocation item data format. */ +#define R_FORMAT 0x0f00 +#define R_NUMBER 0x0000 /* Retain as two's complement value. */ +#define R_16C_DISPL 0x0400 /* CR16C displacement type. */ +#define R_16C_ABS 0x0100 /* CR16C absolute type. */ +#define R_16C_REGREL 0x0200 /* CR16C register-relative type. */ +#define R_16C_IMMED 0x0300 /* CR16C immediate type. */ + +/* Relocation item size. */ +#define R_SIZESP 0xf000 +#define R_S_16C_04 0x5000 +#define R_S_16C_04_a 0x4000 +#define R_S_16C_08 0x0000 +#define R_S_16C_14 0x3000 +#define R_S_16C_16 0x1000 +#define R_S_16C_20 0x8000 +#define R_S_16C_24_a 0x6000 +#define R_S_16C_24 0x7000 +#define R_S_16C_32 0x2000 + + +/* Processor specific section indices. These sections do not actually + exist. Symbols with a st_shndx field corresponding to one of these + values have a special meaning. */ + +/* Far common symbol. */ +#define SHN_CR16C_FCOMMON 0xff00 +#define SHN_CR16C_NCOMMON 0xff01 + +typedef struct reloc_map +{ + unsigned short cr_reloc_type; /* CR relocation type. */ + bfd_reloc_code_real_type bfd_reloc_enum; /* BFD relocation enum. */ +} RELOC_MAP; + +#endif /* _ELF_CR16C_H */ diff --git a/include/hashtab.h b/include/hashtab.h index f7bd4ae..1af7368 100644 --- a/include/hashtab.h +++ b/include/hashtab.h @@ -99,7 +99,7 @@ struct htab GTY(()) htab_del del_f; /* Table itself. */ - PTR * GTY ((use_param (""), length ("%h.size"))) entries; + PTR * GTY ((use_param, length ("%h.size"))) entries; /* Current size (in entries) of the hash table */ size_t size; @@ -123,7 +123,7 @@ struct htab GTY(()) htab_free free_f; /* Alternate allocate/free functions, which take an extra argument. */ - PTR GTY((skip (""))) alloc_arg; + PTR GTY((skip)) alloc_arg; htab_alloc_with_arg alloc_with_arg_f; htab_free_with_arg free_with_arg_f; }; diff --git a/include/mpw/ChangeLog b/include/mpw/ChangeLog deleted file mode 100644 index 8dbad87..0000000 --- a/include/mpw/ChangeLog +++ /dev/null @@ -1,61 +0,0 @@ -Tue Feb 27 12:23:04 1996 Raymond Jou <rjou@mexican.cygnus.com> - - * mpw.h (HAVE_VPRINTF): Add and define to have the value 1. - -Fri Dec 29 14:40:46 1995 Stan Shebs <shebs@andros.cygnus.com> - - * mpw.h (HAVE_STDLIB_H, etc): Define to have the value 1. - (HAVE_FCNTL_H): Define. - -Mon Dec 11 15:39:06 1995 Stan Shebs <shebs@andros.cygnus.com> - - * mpw.h (open, access): Define as mpw_open and mpw_access. - -Thu Nov 9 15:38:37 1995 Stan Shebs <shebs@andros.cygnus.com> - - * mpw.h: Include unix.h if USE_MW_HEADERS, otherwise include - various original MPW include files (ioctl.h, etc). - (EIO): Define if not defined. - * sys/ioctl.h: Remove, not needed. - -Wed Oct 25 12:30:44 1995 Stan Shebs <shebs@andros.cygnus.com> - - * mpw.h: Don't include errno.h or ioctl.h. - (ENOENT, EACCES, ENOSYS): Define if not defined. - (fdopen): Declare if __STDC__. - (R_OK, W_OK, X_OK): Define if not defined. - -Tue Sep 26 14:57:21 1995 Stan Shebs <shebs@andros.cygnus.com> - - * mpw.h: New file, universally useful MPW host definitions. - Many of these used to live in bfd/hosts/mpw.h. - * grp.h: Remove RCS comment. - * sys/ioctl.h: Add a comment line. - -Wed Dec 14 13:12:14 1994 Stan Shebs <shebs@andros.cygnus.com> - - * spin.h: New file, cursor spinning for progress. - -Thu Jun 30 15:32:07 1994 Stan Shebs (shebs@andros.cygnus.com) - - * fcntl.h (open): Allow optional third arg. - -Thu Apr 14 12:54:51 1994 Stan Shebs (shebs@andros.cygnus.com) - - * dir.h, dirent.h, fcntl.h, grp.h, pwd.h, stat.h: New files. - * sys/ioctl.h: New file. - -Mon Feb 21 09:44:45 1994 Stan Shebs (shebs@andros.cygnus.com) - - * sys/stat.h (struct stat): New field st_rsize. - (S_IFMT, etc): Use different bit positions. - (fstat): Add parameter names to prototype. - -Mon Jan 31 19:30:16 1994 Stan Shebs (shebs@andros.cygnus.com) - - * README: New file. - * utime.h, varargs.h: New files, simulated Posix. - * sys/{file,param,resource,stat,time,types}.h: New files, more - simulated Posix. - - diff --git a/include/mpw/README b/include/mpw/README deleted file mode 100644 index 10e92de..0000000 --- a/include/mpw/README +++ /dev/null @@ -1 +0,0 @@ -This is a collection of include files that help imitate Posix in MPW. diff --git a/include/mpw/dir.h b/include/mpw/dir.h deleted file mode 100644 index e6ccd2d..0000000 --- a/include/mpw/dir.h +++ /dev/null @@ -1,23 +0,0 @@ -/* The <dir.h> header gives the layout of a directory. */ - -#pragma once - -#ifndef _DIR_H -#define _DIR_H - -#ifndef _TYPES_H /* not quite right */ -#include <sys/types.h> -#endif - -#define DIRBLKSIZ 512 /* size of directory block */ - -#ifndef DIRSIZ -#define DIRSIZ 14 -#endif - -struct direct { - ino_t d_ino; - char d_name[DIRSIZ]; -}; - -#endif /* _DIR_H */ diff --git a/include/mpw/dirent.h b/include/mpw/dirent.h deleted file mode 100644 index 38000b2..0000000 --- a/include/mpw/dirent.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef __dirent_h -#define __dirent_h - -#include "sys/dir.h" - -struct dirent { - long d_ino; /* inode number of entry */ - off_t d_off; /* offset of disk directory entry */ - unsigned short d_reclen; /* length of this record */ - char d_name[1]; /* name of file */ -}; - -/* -#define DIRENTBASESIZE \ - (((struct dirent *) 0)->d_name - (char *) 0) -#define DIRENTSIZE(namelen) \ - ((DIRENTBASESIZE + (namelen) + NBPW) & ~(NBPW - 1)) -*/ - -/* from Mips posix/dirent.h */ - -/* -#undef rewinddir -*/ - -extern DIR *opendir(); -extern struct dirent *readdir(); -extern void rewinddir(); -extern int closedir(); - -#endif /* ! __dirent_h */ diff --git a/include/mpw/fcntl.h b/include/mpw/fcntl.h deleted file mode 100644 index 30999b4..0000000 --- a/include/mpw/fcntl.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * FCntl.h -- faccess(), fcntl(), and open() mode flags - * - * Portions copyright American Telephone & Telegraph - * Used with permission, Apple Computer Inc. (1985,1988,1990,1992) - * All rights reserved. - */ - -#ifndef __FCNTL__ -#define __FCNTL__ - -#ifndef __TYPES__ -#include <Types.h> -#endif - -/* - * For use by lseek(): - */ - -#ifndef __STDIO__ /* these defns exactly paralled in StdIO.h for fseek() */ -#define SEEK_CUR 1 -#define SEEK_END 2 -#define SEEK_SET 0 -#endif - -/* - * faccess() commands; for general use - */ - /* 'd' => "directory" ops */ -#define F_DELETE (('d'<<8)|0x01) -#define F_RENAME (('d'<<8)|0x02) - -/* - * more faccess() commands; for use only by MPW tools - */ - -#define F_OPEN (('d'<<8)|0x00) /* reserved for operating system use */ - /* 'e' => "editor" ops */ -#define F_GTABINFO (('e'<<8)|0x00) /* get tab offset for file */ -#define F_STABINFO (('e'<<8)|0x01) /* set " " " " */ -#define F_GFONTINFO (('e'<<8)|0x02) /* get font number and size for file */ -#define F_SFONTINFO (('e'<<8)|0x03) /* set " " " " " " */ -#define F_GPRINTREC (('e'<<8)|0x04) /* get print record for file */ -#define F_SPRINTREC (('e'<<8)|0x05) /* set " " " " */ -#define F_GSELINFO (('e'<<8)|0x06) /* get selection information for file */ -#define F_SSELINFO (('e'<<8)|0x07) /* set " " " " */ -#define F_GWININFO (('e'<<8)|0x08) /* get current window position */ -#define F_SWININFO (('e'<<8)|0x09) /* set " " " */ -#define F_GSCROLLINFO (('e'<<8)|0x0A) /* get scroll information */ -#define F_SSCROLLINFO (('e'<<8)|0x0B) /* set " " */ -#define F_GMARKER (('e'<<8)|0x0D) /* Get Marker */ -#define F_SMARKER (('e'<<8)|0x0C) /* Set " */ -#define F_GSAVEONCLOSE (('e'<<8)|0x0F) /* Get Save on close */ -#define F_SSAVEONCLOSE (('e'<<8)|0x0E) /* Set " " " */ - -/* - * argument structures used by various faccess() commands - */ - -struct MarkElement { - int start; /* start position of mark */ - int end; /* end position */ - unsigned char charCount; /* number of chars in mark name */ - char name[64]; /* mark name */ -} ; /* note: marker names may be up to 64 characters long */ - -#ifndef __cplusplus -typedef struct MarkElement MarkElement; -#endif - -struct SelectionRecord { - long startingPos; - long endingPos; - long displayTop; -}; - -#ifndef __cplusplus -typedef struct SelectionRecord SelectionRecord; -#endif - - -/* - * Mode values accessible to open() - */ -#define O_RDONLY 0 /* Bits 0 and 1 are used internally */ -#define O_WRONLY 1 /* Values 0..2 are historical */ -#define O_RDWR 2 /* NOTE: it goes 0, 1, 2, *!* 8, 16, 32, ... */ -#define O_APPEND (1<< 3) /* append (writes guaranteed at the end) */ -#define O_RSRC (1<< 4) /* Open the resource fork */ -#define O_ALIAS (1<< 5) /* Open alias file */ -#define O_CREAT (1<< 8) /* Open with file create */ -#define O_TRUNC (1<< 9) /* Open with truncation */ -#define O_EXCL (1<<10) /* w/ O_CREAT: Exclusive "create-only" */ -#define O_BINARY (1<<11) /* Open as a binary stream */ -#define O_NRESOLVE (1<<14) /* Don't resolve any aliases */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * function prototypes - */ -int close(int); -int creat(const char*); -int dup(int filedes); /* OBSOLETE: fcntl(filedes, F_DUPFD, 0) is preferred */ -int faccess(char*, unsigned int, long*); -int fcntl(int, unsigned int, int); -long lseek(int, long, int); -int open(const char*, int, ...); -int read(int, char*, unsigned); -int unlink(char*); -int write(int, const char*, unsigned); - -#ifdef __cplusplus -} -#endif - -/* - * fcntl() commands - */ -#define F_DUPFD 0 /* Duplicate files (file descriptor) */ - -#endif __FCNTL__ diff --git a/include/mpw/grp.h b/include/mpw/grp.h deleted file mode 100644 index faf2c6a..0000000 --- a/include/mpw/grp.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include "sys/types.h" - -struct group { - char *gr_name; - gid_t gr_gid; - char *gr_passwd; - char **gr_mem; -}; diff --git a/include/mpw/mpw.h b/include/mpw/mpw.h deleted file mode 100644 index 58702e7..0000000 --- a/include/mpw/mpw.h +++ /dev/null @@ -1,130 +0,0 @@ -/* Mac MPW host-specific definitions. */ - -#ifndef __INCLUDE_MPW_H -#define __INCLUDE_MPW_H - -#ifndef MPW -#define MPW -#endif - -/* MPW C is basically ANSI, but doesn't actually enable __STDC__, - nor does it allow __STDC__ to be #defined. */ - -#ifndef ALMOST_STDC -#define ALMOST_STDC -#endif - -#include <stdio.h> -#include <ctype.h> -#include <errno.h> - -#define HAVE_TIME_T_IN_TIME_H 1 - -#define HAVE_STDLIB_H 1 - -#define HAVE_ERRNO_H 1 - -#define HAVE_STDDEF_H 1 - -#define HAVE_STRING_H 1 - -#define HAVE_STDARG_H 1 - -#define HAVE_VPRINTF 1 - -#ifdef USE_MW_HEADERS - -#include <unix.h> - -#else - -#include <fcntl.h> -#include <ioctl.h> -#include <sys/stat.h> - -#define HAVE_FCNTL_H 1 - -#ifndef O_ACCMODE -#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) -#endif - -#ifndef fileno -#define fileno(fp) ((fp)->_file) -#endif - -/* stdio.h does not define this if __STDC__, so define here. */ - -#ifdef __STDC__ -FILE *fdopen(int fildes, const char *mode); -#endif - -#endif /* USE_MW_HEADERS */ - -/* Add ersatz definitions, for systems that lack them. */ - -#ifndef EIO -#define EIO 96 -#endif -#ifndef ENOENT -#define ENOENT 97 -#endif -#ifndef EACCES -#define EACCES 98 -#endif -#ifndef ENOSYS -#define ENOSYS 99 -#endif - -#ifndef R_OK -#define R_OK 4 -#define W_OK 2 -#define X_OK 1 -#endif - -/* Binary files have different characteristics; for instance, no cr/nl - translation. */ - -#define USE_BINARY_FOPEN - -#include <spin.h> - -#ifdef MPW_C -#undef __PTR_TO_INT -#define __PTR_TO_INT(P) ((int)(P)) -#undef __INT_TO_PTR -#define __INT_TO_PTR(P) ((char *)(P)) -#endif /* MPW_C */ - -#define NO_FCNTL - -int fstat (); - -FILE *mpw_fopen (); -int mpw_fseek (); -int mpw_fread (); -int mpw_fwrite (); -int mpw_access (); -int mpw_open (); -int mpw_creat (); -void mpw_abort (void); - -/* Map these standard functions to improved versions in libiberty. */ - -#define fopen mpw_fopen -#define fseek mpw_fseek -#define fread mpw_fread -#define fwrite mpw_fwrite -#define open mpw_open -#define access mpw_access -#define creat mpw_creat -#define abort mpw_abort - -#define POSIX_UTIME - -#define LOSING_TOTALLY - -/* Define this so that files will be closed before being unlinked. */ - -#define CLOSE_BEFORE_UNLINK - -#endif /* __INCLUDE_MPW_H */ diff --git a/include/mpw/pwd.h b/include/mpw/pwd.h deleted file mode 100644 index 2d4fb70..0000000 --- a/include/mpw/pwd.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef __pwd_h -#define __pwd_h - -#include <sys/types.h> - -struct passwd { - char *pw_name; - uid_t pw_uid; - gid_t pw_gid; - char *pw_dir; - char *pw_shell; - char *pw_passwd; -}; - -#endif /* ! __pwd_h */ diff --git a/include/mpw/spin.h b/include/mpw/spin.h deleted file mode 100644 index 674b00a..0000000 --- a/include/mpw/spin.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Progress macros that use SpinCursor in MPW. - Copyright 1994 Free Software Foundation, Inc. - -This program 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 of the License, or -(at your option) any later version. - -This program 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 program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifndef _SPIN_H -#define _SPIN_H - -/* For MPW, progress macros just need to "spin the cursor" frequently, - preferably several times per second on a 68K Mac. */ - -/* In order to determine if we're meeting the goal, define this macro - and information about frequency of spinning will be collected and - displayed. */ - -#define SPIN_MEASUREMENT - -#include <CursorCtl.h> - -/* Programs use this macro to indicate the start of a lengthy - activity. STR identifies the particular activity, while N - indicates the expected duration, in unspecified units. If N is - zero, then the expected time to completion is unknown. */ - -#undef START_PROGRESS -#define START_PROGRESS(STR,N) mpw_start_progress (STR, N, __FILE__, __LINE__); - -/* Programs use this macro to indicate that progress has been made on a - lengthy activity. */ - -#undef PROGRESS -#ifdef SPIN_MEASUREMENT -#define PROGRESS(X) mpw_progress_measured (X, __FILE__, __LINE__); -#else -#define PROGRESS(X) mpw_progress (X); -#endif - -/* Programs use this macro to indicate the end of a lengthy activity. - STR must match a STR passed to START_PROGRESS previously. */ - -#undef END_PROGRESS -#define END_PROGRESS(STR) mpw_end_progress (STR, __FILE__, __LINE__); - -extern void mpw_start_progress (char *, int, char *, int); - -extern void mpw_progress (int); - -extern void mpw_progress_measured (int, char *, int); - -extern void mpw_end_progress (char *, char *, int); - -#endif /* _SPIN_H */ diff --git a/include/mpw/stat.h b/include/mpw/stat.h deleted file mode 100644 index 057b8d5..0000000 --- a/include/mpw/stat.h +++ /dev/null @@ -1,75 +0,0 @@ -/* The <sys/stat.h> header defines a struct that is used in the stat() and - * fstat functions. The information in this struct comes from the i-node of - * some file. These calls are the only approved way to inspect i-nodes. - */ - -#ifndef _STAT_H -#define _STAT_H - -#ifndef _TYPES_H /* not quite right */ -#include <sys/types.h> -#endif - -struct stat { - dev_t st_dev; /* major/minor device number */ - ino_t st_ino; /* i-node number */ - mode_t st_mode; /* file mode, protection bits, etc. */ - short int st_nlink; /* # links; TEMPORARY HACK: should be nlink_t*/ - uid_t st_uid; /* uid of the file's owner */ - short int st_gid; /* gid; TEMPORARY HACK: should be gid_t */ - dev_t st_rdev; - off_t st_size; /* file size */ - time_t st_atime; /* time of last access */ - time_t st_mtime; /* time of last data modification */ - time_t st_ctime; /* time of last file status change */ -}; - -/* Traditional mask definitions for st_mode. */ -#define S_IFMT 0170000 /* type of file */ -#define S_IFREG 0100000 /* regular */ -#define S_IFBLK 0060000 /* block special */ -#define S_IFDIR 0040000 /* directory */ -#define S_IFCHR 0020000 /* character special */ -#define S_IFIFO 0010000 /* this is a FIFO */ -#define S_ISUID 0004000 /* set user id on execution */ -#define S_ISGID 0002000 /* set group id on execution */ - /* next is reserved for future use */ -#define S_ISVTX 01000 /* save swapped text even after use */ - -/* POSIX masks for st_mode. */ -#define S_IRWXU 00700 /* owner: rwx------ */ -#define S_IRUSR 00400 /* owner: r-------- */ -#define S_IWUSR 00200 /* owner: -w------- */ -#define S_IXUSR 00100 /* owner: --x------ */ - -#define S_IRWXG 00070 /* group: ---rwx--- */ -#define S_IRGRP 00040 /* group: ---r----- */ -#define S_IWGRP 00020 /* group: ----w---- */ -#define S_IXGRP 00010 /* group: -----x--- */ - -#define S_IRWXO 00007 /* others: ------rwx */ -#define S_IROTH 00004 /* others: ------r-- */ -#define S_IWOTH 00002 /* others: -------w- */ -#define S_IXOTH 00001 /* others: --------x */ - -/* The following macros test st_mode (from POSIX Sec. 5.6.1.1. */ -#define S_ISREG(m) ((m & S_IFMT) == S_IFREG) /* is a reg file */ -#define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) /* is a directory */ -#define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR) /* is a char spec */ -#define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK) /* is a block spec */ -#define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO) /* is a pipe/FIFO */ - - -/* Function Prototypes. */ -#ifndef _ANSI_H -#include <ansi.h> -#endif - -_PROTOTYPE( int chmod, (const char *_path, int _mode) ); -_PROTOTYPE( int fstat, (int _fildes, struct stat *_buf) ); -_PROTOTYPE( int mkdir, (const char *_path, int _mode) ); -_PROTOTYPE( int mkfifo, (const char *_path, int _mode) ); -_PROTOTYPE( int stat , (const char *_path, struct stat *_buf) ); -_PROTOTYPE( mode_t umask, (int _cmask) ); - -#endif /* _STAT_H */ diff --git a/include/mpw/sys/file.h b/include/mpw/sys/file.h deleted file mode 100644 index 40a8c17..0000000 --- a/include/mpw/sys/file.h +++ /dev/null @@ -1 +0,0 @@ -/* empty */ diff --git a/include/mpw/sys/param.h b/include/mpw/sys/param.h deleted file mode 100644 index 40a8c17..0000000 --- a/include/mpw/sys/param.h +++ /dev/null @@ -1 +0,0 @@ -/* empty */ diff --git a/include/mpw/sys/resource.h b/include/mpw/sys/resource.h deleted file mode 100644 index d39439d..0000000 --- a/include/mpw/sys/resource.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __SYS_RESOURCE_H__ -#define __SYS_RESOURCE_H__ - -struct rusage { - struct timeval ru_utime; - struct timeval ru_stime; -}; - -#endif /* __SYS_RESOURCE_H__ */ diff --git a/include/mpw/sys/stat.h b/include/mpw/sys/stat.h deleted file mode 100644 index b65c72e..0000000 --- a/include/mpw/sys/stat.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Imitation sys/stat.h. */ - -#ifndef __SYS_STAT_H__ -#define __SYS_STAT_H__ - -#include <sys/types.h> -#include <time.h> - -struct stat { - dev_t st_dev; - ino_t st_ino; - mode_t st_mode; - short st_nlink; - uid_t st_uid; - gid_t st_gid; - dev_t st_rdev; - off_t st_size; - off_t st_rsize; - time_t st_atime; - int st_spare1; - time_t st_mtime; - int st_spare2; - time_t st_ctime; - int st_spare3; - long st_blksize; - long st_blocks; - long st_spare4[2]; -}; - -#define S_IFMT 0170000L -#define S_IFDIR 0040000L -#define S_IFREG 0100000L -#define S_IREAD 0400 -#define S_IWRITE 0200 -#define S_IEXEC 0100 - -#define S_IFIFO 010000 /* FIFO special */ -#define S_IFCHR 020000 /* character special */ -#define S_IFBLK 030000 /* block special */ - -int stat (char *path, struct stat *buf); -int fstat (int fd, struct stat *buf); - -#endif /* __SYS_STAT_H___ */ diff --git a/include/mpw/sys/time.h b/include/mpw/sys/time.h deleted file mode 100644 index f9e4852..0000000 --- a/include/mpw/sys/time.h +++ /dev/null @@ -1,13 +0,0 @@ -/* Imitation sys/time.h. */ - -#ifndef __SYS_TIME_H__ -#define __SYS_TIME_H__ - -#include <time.h> - -struct timeval { - long tv_sec; - long tv_usec; -}; - -#endif /* __SYS_TIME_H__ */ diff --git a/include/mpw/sys/types.h b/include/mpw/sys/types.h deleted file mode 100644 index d7d9c9f..0000000 --- a/include/mpw/sys/types.h +++ /dev/null @@ -1,15 +0,0 @@ -/* Imitation sys/types.h. */ - -#ifndef __SYS_TYPES_H__ -#define __SYS_TYPES_H__ - -#include <Types.h> - -typedef short dev_t; -typedef short ino_t; -typedef unsigned short mode_t; -typedef unsigned short uid_t; -typedef unsigned short gid_t; -typedef long off_t; - -#endif /* __SYS_TYPES_H__ */ diff --git a/include/mpw/utime.h b/include/mpw/utime.h deleted file mode 100644 index e8bf66f..0000000 --- a/include/mpw/utime.h +++ /dev/null @@ -1,7 +0,0 @@ - -struct utimbuf { - time_t actime; - time_t modtime; -}; - -int utime (char *, struct utimbuf *); diff --git a/include/mpw/varargs.h b/include/mpw/varargs.h deleted file mode 100644 index acb9e45..0000000 --- a/include/mpw/varargs.h +++ /dev/null @@ -1,9 +0,0 @@ -/* varargs.h. */ -#ifndef __va_list__ -#define __va_list__ -typedef char *va_list; -#endif -#define va_dcl int va_alist; -#define va_start(list) list = (char *) &va_alist -#define va_end(list) -#define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1] diff --git a/include/splay-tree.h b/include/splay-tree.h index 86707fc..e05aeb5 100644 --- a/include/splay-tree.h +++ b/include/splay-tree.h @@ -81,21 +81,21 @@ typedef void (*splay_tree_deallocate_fn) PARAMS((void *, void *)); struct splay_tree_node_s GTY(()) { /* The key. */ - splay_tree_key GTY ((use_param1 (""))) key; + splay_tree_key GTY ((use_param1)) key; /* The value. */ - splay_tree_value GTY ((use_param2 (""))) value; + splay_tree_value GTY ((use_param2)) value; /* The left and right children, respectively. */ - splay_tree_node GTY ((use_params (""))) left; - splay_tree_node GTY ((use_params (""))) right; + splay_tree_node GTY ((use_params)) left; + splay_tree_node GTY ((use_params)) right; }; /* The splay tree itself. */ struct splay_tree_s GTY(()) { /* The root of the tree. */ - splay_tree_node GTY ((use_params (""))) root; + splay_tree_node GTY ((use_params)) root; /* The comparision function. */ splay_tree_compare_fn comp; @@ -109,7 +109,7 @@ struct splay_tree_s GTY(()) /* Allocate/free functions, and a data pointer to pass to them. */ splay_tree_allocate_fn allocate; splay_tree_deallocate_fn deallocate; - PTR GTY((skip (""))) allocate_data; + PTR GTY((skip)) allocate_data; }; typedef struct splay_tree_s *splay_tree; diff --git a/mpw-README b/mpw-README deleted file mode 100644 index 767140b..0000000 --- a/mpw-README +++ /dev/null @@ -1,376 +0,0 @@ -This is basic information about the Macintosh(tm) MPW(tm) port of the -GNU tools. The information below applies to both native and cross -compilers. - -(Please note that there are two versions of this file; "mpw-README" -is the source form, and "Read Me for MPW" is the distribution form. -"Read Me for MPW" has 8-bit chars such as \Option-d embedded in it.) - -INSTALLING GNU TOOLS - -* System Requirements - -To use these tools, you will need a Mac with a 68020 or better or else -any PowerMac, System 7.1 or later, and MPW 3.3 or 3.4. You will *not* -need any other MPW compiler unless you want to rebuild from sources, -nor even any include files, unless you are building actual Mac -applications. For PowerMac native you will need PPCLink, however; -also the executables are PowerPC-only. - -* Automated Installation - -The simplest way to install GNU tools is to run the Install script. -The script will copy things to where you want to keep them, will build -a UserStartup file with settings corresponding to where things were -copied, and offer to put that UserStartup file in your MPW folder. - -The Install script does not alter anything in the System Folder, and -it does not take any action without confirmation. - -The Install script will be at the top level of the binary -distribution, or at the top level of the object directory if -rebuilding from source. (The sources include a file called -"mpw-install" at the top level, but it is the source to the Install -script and cannot be run directly.) - -* Manual Installation - -If you don't want to run the Install script, you can do installation -manually; this section describes the steps involved. - -The GNU tools can go in any directory that is in your {Commands} list. -We generally put all the tools somewhere like {Boot}Cygnus:latest:bin, -and then add to a UserStartup file: - - set Commands "{Boot}Cygnus:latest:bin:,{Commands}" - -However, the cpp and cc1 programs of GCC are not normally stored here. -Instead, they will be in a "lib" directory that is alongside "bin", -and organized by target and version underneath, with names like - - :lib:gcc-lib:<target>:cygnus-<version>: - -If you build and install everything yourself according to the build -instructions below, then you will not have any problems. However, you -may discover that GCC seems unable to find the right cpp and cc1; -usually this will be because directory names have changed. (Even -renaming your hard disk will make this happen.) In such cases, you -have several choices. One is just to add this directory to -{Commands}, but then you will not be able to get any other cpp or cc1, -such as those used by a different target or version. Another way is -to rename your disk and directories to match the prefix used when the -tools were compiled. Finally, you can set the variable -GCC_EXEC_PREFIX to point to the library directory: - - set GCC_EXEC_PREFIX MyDisk:Stuff:lib:gcc-lib: - export GCC_EXEC_PREFIX - -You may also want to edit MPW's HEXA 128 resource. When GCC is built -using a native GCC, it is compiled to use a special stack allocator -function alloca(). While this is very efficient, it means that GCC -will need considerable stack space to run, especially when compiling -large programs with optimization turned on. You give MPW more stack -by editing the HEXA 128 resource of the MPW Shell. A value of "0008 -0000" gives 512K of stack size, which is usually sufficient. - -USING GNU TOOLS - -* Using Native PowerMac GCC - -Using a native PowerMac GCC to produce MPW tools or MacOS applications -is more complicated than just "gC foo.c", although no more complicated -than with other Mac compilers. - -To build a native PowerMac MPW tool, use this sequence, where hello.c -is the usual "hello world" program, and genericcfrg.r is the Rez file -with the code fragment resource: - -gC -I{CIncludes} -fno-builtin -Dpascal= -c -g hello.c -PPCLink hello.o -o hello \Option-d - "{PPCLibraries}"StdCRuntime.o \Option-d - "{SharedLibraries}"InterfaceLib \Option-d - "{SharedLibraries}"StdCLib \Option-d - "{PPCLibraries}"PPCToolLibs.o \Option-d - "{PPCLibraries}"PPCCRuntime.o \Option-d - "{GCCPPCLibraries}"libgcc.xcoff -rez -d APPNAME='"'hello'"' GenericCFRG.r -o hello -setfile -t 'MPST' -c 'MPS ' hello - -The same sequence works to build a MacOS application, but you set the file -type to 'APPL' and don't link in PPCToolLibs.o. For further details on -using MPW to build Mac applications, see the general MPW documentation. - -Recent versions of PPCLink have an option to generate the code -fragment resource and automatically set creator and file type; -here is what GenericCFRG.r should look like if you have an older -PPCLink or are using GNU ld: - -#include "CodeFragmentTypes.r" - -resource 'cfrg' (0) { - { - kPowerPC, - kFullLib, - kNoVersionNum,kNoVersionNum, - 0,0, - kIsApp,kOnDiskFlat,kZeroOffset,kWholeFork, - APPNAME // must be defined on Rez command line with -d option - } -}; - -In general this port of GCC supports the same option syntax and -behavior as its Unix counterpart. It also has similar compilation -rules, so it will run the assembler on .s files and so forth. - -The GCC manual includes full information on the available options. -One option that may be especially useful is "-v", which shows you what -tools and options are being used; unlike most Mac C compilers, GCC -directs assembly and linking in addition to compilation. - -MPW GCC does feature two extensions to the option syntax; '-d macro=name' -works just as '-Dmacro=name' does in Unix, and '-i directory' works the -same as '-Idirectory'. - -MPW GCC supports the usual Pascal-style strings and alignment pragmas. - -To find standard include files you can set the variable GCCIncludes: - - set GCCIncludes MyDisk:MyIncludes: - export GCCIncludes - -GCCIncludes is similar to MPW's CIncludes or CW's MWCIncludes. In -order to use MPW's usual include files, just say: - - set GCCIncludes "{CIncludes}" - export GCCIncludes - -* Using GCC as a Cross-Compiler - -If you have a cross-compiler, and you have all of the correct -target-side crt0 and libraries available, then to compile and link a -file "foo.c", you can say just - - gC foo.c - -The output file will be an MPW binary file named "a.out"; the format -of the contents will depend on which target is in use, so for instance -a MIPS-targeting GCC will produce ECOFF or ELF executables. - -Note that using MPW include files with a cross-compiler is somewhat -dangerous. - -* Using the Assembler and Friends - -The assembler ("as") and linker ("ld") are faithful ports of their -Unix counterparts. Similarly, the binutils "ar", "cplusfilt", "nm", -"objcopy", "objdump", "ranlib", "size", "strings", and "strip" are all -like they are under Unix. (Note that "cplusfilt" is usually called -"c++filt" under Unix.) - -* Using GDB - -There are two flavors of GDB. "gdb" is an MPW tool that works very -much like it does in Unix; put a command into the MPW worksheet and -type the <enter> key to send it to GDB. While "gdb" is running, you -cannot do anything else in MPW, although you can switch to other -Mac applications and use them. - -"SiowGDB" is also a Mac application, but it is GDB using the SIOW -package to provide console emulation. Commands are exactly as for the -MPW tool, but since this is its own application, you can switch -between it and MPW. - -BUILDING GNU TOOLS - -This port of the GNU tools uses a configure script similar to -that used for GNU tools under Unix, but rewritten for MPW. As with -Unix configuration, there is an "object" directory that may be -different from the "source" directory. In the example commands below, -we will assume that we are currently in the object directory, and that -the source directory is "{Boot}Cygnus:src:". - -* Requirements for Building - -In addition to the sources, you will need a set of tools that the -configure and build scripts assume to be available. These tools -(and their versions, if relevant) are as follows: - - byacc tool - flex (2.3.7) tool (and Flex.skel file) - forward-include script - MoveIfChange script - mpw-touch script - mpw-true script - NewFolderRecursive script - null-command script - open-brace script - sed (1.13) tool - tr-7to8 script - true script - -The scripts are in the sources, under utils:mpw:. You must arrange to -get the other tools yourself (they are readily available from the -"usual" net sites, and are also on many CDROMS). In addition, there -will usually be a set of these available at ftp.cygnus.com, in pub/mac. - -You may put the build tools in your usual Tools or Scripts -directories, or keep them in a separate directories. We prefer to -make a directory called "buildtools" and we put this in one of our -UserStartup files: - - set Commands "{Boot}Cygnus:buildtools:,{Commands}" - -Flex uses an environment variable FLEX_SKELETON to locate its skeleton -file, so you need to do something like this, preferably in a UserStartup: - - Set FLEX_SKELETON "{Boot}"Cygnus:buildtools:Flex.skel - Export FLEX_SKELETON - -* Configuring - -Before you can build anything, you must configure. You do this by -creating an directory where object files will be stored, setdirectory -to that directory and do a configure command: - - {Boot}Cygnus:src:mpw-configure --target <name> --cc <compiler> --srcdir {Boot}Cygnus:src: --prefix <whatever> - -If the source directory is not in your {Commands} list, then you must -supply a full pathname to mpw-configure, since mpw-configure invokes -itself after switching into each subdirectory. Using a relative -pathname, even something like ':mpw-configure', will therefore not work. - -<name> must be a known target. Valid ones include "m68k-apple-macos", -"powerpc-apple-macos", "i386-unknown-go32", "mips-idt-ecoff", and -"sh-hitachi-hms". Not all target types are accepted for all of the -tools yet. - -<compiler> must be the name of the compiler to use. It defaults to "mpwc". - - (m68k) - mpwc MPW C - sc68k Symantec C - mwc68k Metrowerks C (Codewarrior) - gcc68k GCC - - (powerpc) - ppcc PPCC - mrc Macintosh on RisC (Mister C, aka(?) Frankenstein) - scppc Symantec C - mwcppc Metrowerks C (Codewarrior) - gccppc GCC - -Not all compilers will compile all tools equally well! For m68k Macs, -MPW C has the best record so far (it has problems, but they can be -worked around), while for PowerMacs, CodeWarrior is the only compiler -that has successfully compiled everything into running code. - -<prefix> is the path that "gcc" will prepend when looking for tools -to execute. GCC_EXEC_PREFIX overrides this value, so you need not -include it if you plan to use GCC_EXEC_PREFIX. - -As an example, here is the configure line that you could use to build -native PowerMac GCC: - -"{Boot}"Cygnus:src:mpw-configure --cc mwcppc --target powerpc-apple-macos --srcdir "{Boot}"Cygnus:src: --prefix "{Boot}"GNUTools: - -* Building - -If you use CodeWarrior, you *must* first set MWCIncludes to -{CIncludes}. This is because you will be building MPW tools, and -their standard I/O works by making references to data that is part of -the MPW Shell, which means that the code must be compiled and linked -with macros that refer to that data, and those macros are in -{CIncludes}, not the default {MWCIncludes}. Without this change, you -will encounter problems compiling libiberty/mpw.c, but tweaking that -file only masks the real problem, and does not fix it. - -The command - - mpw-build - -will build everything. Building will take over an hour on a Quadra 800 -or PowerMac 8100/110, longer if the sources are on a shared volume. - -You may see some warnings; these are mostly likely benign, typically -disagreements about declarations of library and system functions. - -* Installing - -To install the just-built tools, use the command - - mpw-build install - -This part of the installation procedure just copies files to the -location specified at configure time by <prefix>, and, in some cases, -renames them from temporary internal names to their usual names. This -install process is *not* the same as what the Install script does; -Install can copy tools from the installation location chosen at -configuration time to a user-chosen place, and sets up a UserStartup -file. Note that while the Install script is optional, the install -build action performs some tasks would be very hard to replicate -manually, so you should always do it before using the tools. - -* Known Problems With Using Various Compilers to Build - -Most versions of MPW C have problems with compiling GNU software. - -MPW C 3.2.x has preprocessing bugs that render it incapable of -compiling the BFD library, so it can't be used at all for building BFD. - -MPW C 3.3, 3.3.1, and 3.3.2 will spontaneously claim to have found -errors in the source code, but in fact the code is perfectly fine. If -this happens, just set the working directory back to the top-level -objdir (where the configure command above was performed), and type -"mpw-build all" again. If it goes on through the supposed error, then -you got one of the spurious errors. A full build may require a number -of these restarts. - -MPW C 3.3.3 seems to work OK, at least with the aid of a number of -workarounds that are in the sources (look for #ifdef MPW_C). - -Versions of MPW Make earlier than 4.0d2 have exhibited bizarre behavior, -failure to substitute variables and the like. - -Metrowerks CW6 PPC linker (MWLinkPPC) seems to do bad things with memory -if the "Modern Memory Manager" is turned on (in the Memory control panel), -but works OK if it is turned off. - -Metrowerks CW6 loses bigtime compiling opcodes:ppc-opc.c, which has -some deeply nested macros. (CW7 is OK.) There is a way to patch the -file, by substituting constant values. If you need to do this, -contact shebs@cygnus.com for details. - -<Gestalt.h> is missing from {CIncludes} in the MPW version that comes -with CW7. You can just copy the one in CW7's {MWCIncludes}. - -CW8 and later have changes to headers and such that will require changes -to the source in order to be able to use them to rebuild. - -KNOWN BUGS - -The declarations for memcpy and memcmp in some versions of header files -may conflict with GCC's builtin definition. Either use -fno-builtin -or ignore the warnings. - -This is not a bug, but - watch out for cr/nl translation! For instance, -if config/mpw-mh-mpw is not properly translated because it has been -copied or updated separately, then everything will almost build, but -you will get puzzling error messages from make or the compiler. - -'/' or ' ' embedded in any device, directory, or file name may or may -not work. - -objcopy -O srec foo.o makes random output filenames. - -Mac-x-mips requires -mgas but Unix hosts don't. - -GDB will frequently require a '/' on the front of a device name in order -to recognize it as an absolute rather than a relative pathname. - -GDB doesn't seem to use the printer port correctly, although it tries. - -The cursor doesn't always spin as much as it should. To get elaborate -statistics and warnings about spin rates, add this to UserStartup: - - set MEASURE_SPIN all - export MEASURE_SPIN diff --git a/mpw-build.in b/mpw-build.in deleted file mode 100644 index 86d9530..0000000 --- a/mpw-build.in +++ /dev/null @@ -1,204 +0,0 @@ -# Top-level script fragment to build everything for MPW. - -Set savedir "`Directory`" - -#Set Echo 1 - -Set ThisScript "{0}" - -Set objdir ":" - -Set verify 0 - -Set BuildTarget "none" - -# Parse arguments. - -Loop - Break If {#} == 0 - If "{BuildTarget}" =~ /none/ - Set BuildTarget "{1}" - Else - Echo Only one build target allowed, ignoring "{1}" - End If - Shift 1 -End Loop - -If "{BuildTarget}" =~ /none/ - Set BuildTarget "all" -End If - -If {verify} == 1 - Echo "#" Doing "{ThisScript}" "{BuildTarget}" in "`Directory`" ... -End If - -Set ranmake 0 - -If "`Exists Makefile`" != "" - Echo "Set Echo 1" >{BuildTarget}.makeout - Make -f Makefile {BuildTarget} >>{BuildTarget}.makeout - {BuildTarget}.makeout - Delete {BuildTarget}.makeout - Set ranmake 1 -End If - -If "`Exists Makefile.PPC`" != "" - Echo "Set Echo 1" >{BuildTarget}.makeout.ppc - Make -f Makefile.PPC {BuildTarget} >>{BuildTarget}.makeout.ppc - {BuildTarget}.makeout.ppc - Delete {BuildTarget}.makeout.ppc - Set ranmake 1 -End If - -If {ranmake} == 1 - Exit -End If - -# Dispatch on various pseudo-targets. - -If "{BuildTarget}" =~ /all/ - Echo Started `Date` - "{ThisScript}" all-gcc - "{ThisScript}" all-gdb - Echo Finished `Date` -Else If "{BuildTarget}" =~ /all-libiberty/ - "{ThisScript}" do-libiberty -Else If "{BuildTarget}" =~ /all-bfd/ - "{ThisScript}" do-bfd -Else If "{BuildTarget}" =~ /all-opcodes/ - "{ThisScript}" do-opcodes -Else If "{BuildTarget}" =~ /all-byacc/ - "{ThisScript}" do-byacc -Else If "{BuildTarget}" =~ /all-flex/ - "{ThisScript}" all-libiberty - "{ThisScript}" do-flex -Else If "{BuildTarget}" =~ /all-binutils/ - "{ThisScript}" all-libiberty - "{ThisScript}" all-bfd - "{ThisScript}" all-opcodes - "{ThisScript}" do-binutils -Else If "{BuildTarget}" =~ /all-gas/ - "{ThisScript}" all-libiberty - "{ThisScript}" all-bfd - "{ThisScript}" all-opcodes - "{ThisScript}" do-gas -Else If "{BuildTarget}" =~ /all-gcc/ - "{ThisScript}" all-libiberty - "{ThisScript}" all-gas - "{ThisScript}" all-binutils - "{ThisScript}" all-ld - "{ThisScript}" do-gcc -Else If "{BuildTarget}" =~ /all-gdb/ - "{ThisScript}" all-libiberty - "{ThisScript}" all-bfd - "{ThisScript}" all-opcodes - "{ThisScript}" do-gdb -Else If "{BuildTarget}" =~ /all-grez/ - "{ThisScript}" all-libiberty - "{ThisScript}" all-bfd - "{ThisScript}" do-grez -Else If "{BuildTarget}" =~ /all-ld/ - "{ThisScript}" all-libiberty - "{ThisScript}" all-bfd - "{ThisScript}" all-opcodes - "{ThisScript}" do-ld -Else If "{BuildTarget}" =~ /do-byacc/ - SetDirectory :byacc: - ::mpw-build all -Else If "{BuildTarget}" =~ /do-flex/ - SetDirectory :flex: - ::mpw-build _bootstrap - ::mpw-build all -Else If "{BuildTarget}" =~ /do-bfd/ - SetDirectory :bfd: - ::mpw-build all -Else If "{BuildTarget}" =~ /do-libiberty/ - SetDirectory :libiberty: - ::mpw-build all -Else If "{BuildTarget}" =~ /do-opcodes/ - SetDirectory :opcodes: - ::mpw-build all -Else If "{BuildTarget}" =~ /do-binutils/ - SetDirectory :binutils: - ::mpw-build stamps - ::mpw-build all -Else If "{BuildTarget}" =~ /do-gas/ - SetDirectory :gas: - ::mpw-build stamps - ::mpw-build all -Else If "{BuildTarget}" =~ /do-gcc/ - SetDirectory :gcc: - :mpw-build all -Else If "{BuildTarget}" =~ /do-gdb/ - SetDirectory :gdb: - ::mpw-build all -Else If "{BuildTarget}" =~ /do-grez/ - SetDirectory :grez: - ::mpw-build all -Else If "{BuildTarget}" =~ /do-ld/ - SetDirectory :ld: - ::mpw-build all -Else If "{BuildTarget}" =~ /do-newlib/ - SetDirectory :newlib: - ::mpw-build all -Else If "{BuildTarget}" =~ /install/ - "{ThisScript}" install-only-top - "{ThisScript}" install-binutils - "{ThisScript}" install-gas - "{ThisScript}" install-gcc - "{ThisScript}" install-ld - "{ThisScript}" install-gdb -Else If "{BuildTarget}" =~ /install-binutils/ - SetDirectory :binutils: - ::mpw-build install -Else If "{BuildTarget}" =~ /install-gas/ - SetDirectory :gas: - ::mpw-build install -Else If "{BuildTarget}" =~ /install-gcc/ - SetDirectory :gcc: - :mpw-build install -Else If "{BuildTarget}" =~ /install-gdb/ - SetDirectory :gdb: - ::mpw-build install -Else If "{BuildTarget}" =~ /install-grez/ - SetDirectory :grez: - ::mpw-build install -Else If "{BuildTarget}" =~ /install-ld/ - SetDirectory :ld: - ::mpw-build install -Else If "{BuildTarget}" =~ /install-only/ - "{ThisScript}" install-only-top - "{ThisScript}" install-only-binutils - "{ThisScript}" install-only-gas - "{ThisScript}" install-only-gcc - "{ThisScript}" install-only-gdb - "{ThisScript}" install-only-ld -Else If "{BuildTarget}" =~ /install-only-binutils/ - SetDirectory :binutils: - ::mpw-build install-only -Else If "{BuildTarget}" =~ /install-only-gas/ - SetDirectory :gas: - ::mpw-build install-only -Else If "{BuildTarget}" =~ /install-only-gcc/ - SetDirectory :gcc: - :mpw-build install-only -Else If "{BuildTarget}" =~ /install-only-gdb/ - SetDirectory :gdb: - ::mpw-build install-only -Else If "{BuildTarget}" =~ /install-only-grez/ - SetDirectory :grez: - ::mpw-build install-only -Else If "{BuildTarget}" =~ /install-only-ld/ - SetDirectory :ld: - ::mpw-build install-only -Else If "{BuildTarget}" =~ /install-only-top/ - NewFolderRecursive "{prefix}" - If "{prefix}" != "`Directory`" - Duplicate -y 'Read Me for MPW' "{prefix}"'Read Me for MPW' - Duplicate -y Install "{prefix}"Install - End If -Else - Echo {BuildTarget} not understood, ignoring -End If - -SetDirectory "{savedir}" diff --git a/mpw-config.in b/mpw-config.in deleted file mode 100644 index 8028737..0000000 --- a/mpw-config.in +++ /dev/null @@ -1,113 +0,0 @@ -# Configuration fragment for Cygnus source tree. - -# Check that we can find all the special tools that we will need. -# The test for sed is semi-pointless, because it's already been invoked -# by the calculation of target_cpu in the main configure script, but -# the test will also show which one is being used. - -Set Exit 0 -Echo byacc is `Which byacc` -Echo flex is `Which flex` -Echo forward-include is `Which forward-include` -Echo MoveIfChange is `Which MoveIfChange` -Echo mpw-touch is `Which mpw-touch` -Echo mpw-true is `Which mpw-true` -Echo NewFolderRecursive is `Which NewFolderRecursive` -Echo null-command is `Which null-command` -Echo open-brace is `Which open-brace` -Echo sed is `Which sed` -Echo 'tr-7to8' is `Which tr-7to8` -Echo true is `Which true` -Set Exit 1 - -Set host_libs "mmalloc libiberty opcodes bfd readline gash tcl tk tclX" - -Set host_tools "texinfo byacc flex bison binutils ld gas gcc gdb make patch \Option-d - prms send-pr gprof gdbtest tgas etc expect dejagnu sim bash \Option-d - m4 autoconf ispell grep diff rcs cvs fileutils shellutils time \Option-d - textutils wdiff find emacs emacs19 uudecode hello tar gzip indent \Option-d - recode release sed utils guile perl apache inet gawk" - -Set target_libs "newlib" - -Set target_tools "examples" - -# Configure the resource compiler if targeting Macs. -If {target_os} =~ /macos/ || {target_os} =~ /mpw/ - Set host_tools "{host_tools} grez" -End If - -Set configdirs "{host_libs} {host_tools} {target_libs} {target_tools}" -Export configdirs - -# Make up a special include directory that tools will share. - -If "`Exists "{objdir}"extra-include`" == "" - NewFolder "{objdir}"extra-include -End If - -Set edir "{objdir}extra-include:" - -forward-include "{srcdir}"include:mpw:sys:file.h "{edir}"'sys/file.h' -forward-include "{srcdir}"include:mpw:sys:ioctl.h "{edir}"'sys/ioctl.h' -forward-include "{srcdir}"include:mpw:sys:param.h "{edir}"'sys/param.h' -forward-include "{srcdir}"include:mpw:sys:resource.h "{edir}"'sys/resource.h' -forward-include "{srcdir}"include:mpw:sys:stat.h "{edir}"'sys/stat.h' -forward-include "{srcdir}"include:mpw:sys:time.h "{edir}"'sys/time.h' -forward-include "{srcdir}"include:mpw:sys:types.h "{edir}"'sys/types.h' - -forward-include "{srcroot}"include:aout:aout64.h "{edir}"'aout/aout64.h' -forward-include "{srcroot}"include:aout:ar.h "{edir}"'aout/ar.h' -forward-include "{srcroot}"include:aout:ranlib.h "{edir}"'aout/ranlib.h' -forward-include "{srcroot}"include:aout:reloc.h "{edir}"'aout/reloc.h' -forward-include "{srcroot}"include:aout:stab.def "{edir}"'aout/stab.def' -forward-include "{srcroot}"include:aout:stab_gnu.h "{edir}"'aout/stab_gnu.h' - -If "`Exists "{srcroot}"include:aout:"{target_cpu}".h`" != "" - forward-include "{srcroot}"include:aout:"{target_cpu}".h "{edir}"'aout/'"{target_cpu}"'.h' -End If - -forward-include "{srcroot}"include:coff:ecoff.h "{edir}"'coff/ecoff.h' -forward-include "{srcroot}"include:coff:internal.h "{edir}"'coff/internal.h' -forward-include "{srcroot}"include:coff:sym.h "{edir}"'coff/sym.h' -forward-include "{srcroot}"include:coff:symconst.h "{edir}"'coff/symconst.h' - -If "`Exists "{srcroot}"include:coff:"{target_cpu}".h`" != "" - forward-include "{srcroot}"include:coff:"{target_cpu}".h "{edir}"'coff/'"{target_cpu}"'.h' -End If -If "{target_cpu}" =~ /powerpc/ - forward-include "{srcroot}"include:coff:rs6000.h "{edir}"'coff/rs6000.h' -End If - -forward-include "{srcroot}"include:elf:common.h "{edir}"'elf/common.h' -forward-include "{srcroot}"include:elf:dwarf.h "{edir}"'elf/dwarf.h' -forward-include "{srcroot}"include:elf:dwarf2.h "{edir}"'elf/dwarf2.h' -forward-include "{srcroot}"include:elf:external.h "{edir}"'elf/external.h' -forward-include "{srcroot}"include:elf:internal.h "{edir}"'elf/internal.h' - -# Believe it or not, GDB needs this for all targets. -forward-include "{srcroot}"include:elf:mips.h "{edir}"'elf/mips.h' - -If "`Exists "{srcroot}"include:elf:"{target_cpu}".h`" != "" - forward-include "{srcroot}"include:elf:"{target_cpu}".h "{edir}"'elf/'"{target_cpu}"'.h' -End If -If "{target_cpu}" =~ /powerpc/ - forward-include "{srcroot}"include:elf:ppc.h "{edir}"'elf/ppc.h' -End If - -If "`Exists "{srcroot}"include:opcode:"{target_cpu}".h`" != "" - forward-include "{srcroot}"include:opcode:"{target_cpu}".h "{edir}"'opcode/'"{target_cpu}"'.h' -End If -If "{target_cpu}" =~ /powerpc/ - forward-include "{srcroot}"include:opcode:ppc.h "{edir}"'opcode/ppc.h' -End If - -# Add some bfd includes that get mentioned outside the bfd dir. - -forward-include "{srcroot}"bfd:libcoff.h "{edir}"'bfd/libcoff.h' -forward-include "{srcroot}"bfd:libecoff.h "{edir}"'bfd/libecoff.h' - -# Translate random files into MPW-only character set. - -tr-7to8 "{srcdir}"mpw-README > "{objdir}Read Me for MPW" -tr-7to8 "{srcdir}"mpw-install > "{objdir}"Install diff --git a/mpw-configure b/mpw-configure deleted file mode 100644 index cf45148..0000000 --- a/mpw-configure +++ /dev/null @@ -1,448 +0,0 @@ -# Configuration script -# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. - -# This program 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 of the License, or -# (at your option) any later version. -# -# This program 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 program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -### WARNING -### This script must NOT use any 8-bit chars! -### WARNING - -# This is an MPW Shell script that sets everything up for compilation, -# mainly creating directories, and editing copies of files. - -Set savedir "`Directory`" - -#Set Echo 1 - -Set ThisScript "{0}" - -Set srcroot "--------" - -Set srcdir ":" - -Set objdir ":" - -Set prefix "{MPW}":GNUTools: - -Set exec_prefix "" - -Set bindir "" - -Set host_alias "m68k-apple-mpw" - -Set target_alias {host_alias} - -Set host_cc "mpwc" - -Set with_gnu_ld 0 - -Set helpoutput 0 - -Set recurse 1 - -Set verify 0 -Set verifystr "" - -Set enable_options "" -Set disable_options "" - -# Parse arguments. - -Loop - Break If {#} == 0 - If "{1}" =~ /--cc/ - Set host_cc "{2}" - Shift 1 - Else If "{1}" =~ /--bindir/ - Set bindir "{2}" - Shift 1 - Else If "{1}" =~ /--disable-?+/ - Set `Echo {1} | sed -e 's/--disable-/enable_/'` no - Set disable_options "{disable_options} '{1}'" - Else If "{1}" =~ /--enable-?+/ - Set `Echo {1} | sed -e 's/--enable-/enable_/'` yes - Set enable_options "{enable_options} '{1}'" - Else If "{1}" =~ /--exec-prefix/ - Set exec_prefix "{2}" - Shift 1 - Else If "{1}" =~ /--help/ - Set helpoutput 1 - Else If "{1}" =~ /--host/ - Set host_alias "{2}" - Shift 1 - Else If "{1}" =~ /--norecursion/ - Set recurse 0 - Else If "{1}" =~ /--prefix/ - Set prefix "{2}" - Shift 1 - Else If "{1}" =~ /--srcdir/ - Set srcdir "{2}" - Shift 1 - Else If "{1}" =~ /--srcroot/ - Set srcroot "{2}" - Shift 1 - Else If "{1}" =~ /--target/ - Set target_alias "{2}" - Shift 1 - Else If "{1}" =~ /-v/ - Set verify 1 - Set verifystr "-v" - Else If "{1}" =~ /--with-gnu-ld/ - Set with_gnu_ld 1 - Else - Echo -n 'mpw-configure: Unrecognized option: "' - Echo -n "{1}" - Echo '"; use --help for usage.' - Exit 1 - End If - Shift 1 -End Loop - -If {helpoutput} == 1 - Echo "Usage: mpw-configure [OPTIONS]" - Echo "" - Echo "Options: [defaults in brackets]" - Echo "--bindir DIR directory for binaries []" - Echo "--cc CC use C compiler CC [mpwc]" - Echo "--disable-FOO do not include feature FOO" - Echo "--enable-FOO include feature FOO" - Echo "--exec-prefix DIR install host-dependent files into DIR []" - Echo "--help print this message" - Echo "--host HOST configure for HOST [m68k-apple-mpw]" - Echo "--norecursion configure this directory only [recurse]" - Echo "--prefix DIR install into DIR [{MPW}:GNUTools:]" - Echo "--srcdir DIR find the sources in DIR [:]" - Echo "--srcroot DIR find the toplevel sources in DIR [:]" - Echo "--target TARGET configure for TARGET [TARGET=HOST]" - Echo "-v verbose" - Echo "--with-gnu-ld link using GNU ld [no]" - Exit 0 -End If - -Set Exit 0 - -# Default exec_prefix from prefix. - -If "{exec_prefix}" == "" - Set exec_prefix "{prefix}" -End If - -If "{bindir}" == "" - Set bindir "{prefix}"bin: -End If - -# Point to the correct set of tools to use with the chosen compiler. - -If "{host_cc}" =~ /mpwc/ - Set host_alias "m68k-apple-mpw" - Set cc_name '{CC_MPW_C}' - Set segment_flag '-s ' - Set ar_name '{AR_LIB}' - Set ranlib_name '{RANLIB_NULL}' - Set cc_ld_name '{CC_LD_LINK}' - Set prog_ext_name '{PROG_EXT_68K}' - Set extralibs_name '{EXTRALIBS_C}' - Set makepef_name '{MAKEPEF_NULL}' - Set rez_name '{REZ_68K}' -Else If "{host_cc}" =~ /sc68k/ - Set host_alias "m68k-apple-mpw" - Set cc_name '{CC_SC}' - Set segment_flag '-s ' - Set ar_name '{AR_LIB}' - Set ranlib_name '{RANLIB_NULL}' - Set cc_ld_name '{CC_LD_LINK}' - Set prog_ext_name '{PROG_EXT_68K}' - Set extralibs_name '{EXTRALIBS_C}' - Set makepef_name '{MAKEPEF_NULL}' - Set rez_name '{REZ_68K}' -Else If "{host_cc}" =~ /mwc68k/ - Set host_alias "m68k-apple-mpw" - Set cc_name '{CC_MWC68K}' - Set segment_flag '-s ' - Set ar_name '{AR_MWLINK68K}' - Set ranlib_name '{RANLIB_NULL}' - Set cc_ld_name '{CC_LD_MWLINK68K}' - Set prog_ext_name '{PROG_EXT_68K}' - Set extralibs_name '{EXTRALIBS_MWC68K}' - Set makepef_name '{MAKEPEF_NULL}' - Set rez_name '{REZ_68K}' -Else If "{host_cc}" =~ /gcc68k/ - Set host_alias "m68k-apple-mpw" - Set cc_name '{CC_68K_GCC}' - Set segment_flag '-s ' - Set ar_name '{AR_68K_AR}' - Set ranlib_name '{RANLIB_RANLIB}' - Set cc_ld_name '{CC_68K_GCC}' - Set prog_ext_name '{PROG_EXT_68K}' - Set extralibs_name '{EXTRALIBS_C}' - Set makepef_name '{MAKEPEF_NULL}' - Set rez_name '{REZ_68K}' -Else If "{host_cc}" =~ /ppcc/ - Set host_alias "powerpc-apple-mpw" - Set cc_name '{CC_PPCC}' - Set segment_flag '-d ___s_e_g___=' - Set ar_name '{AR_PPCLINK}' - Set ranlib_name '{RANLIB_NULL}' - Set cc_ld_name '{CC_LD_PPCLINK}' - Set prog_ext_name '{PROG_EXT_XCOFF}' - Set extralibs_name '{EXTRALIBS_PPC}' - Set makepef_name '{MAKEPEF_PPC}' - Set rez_name '{REZ_PPC}' -Else If "{host_cc}" =~ /mrc/ - Set host_alias "powerpc-apple-mpw" - Set cc_name '{CC_MRC}' - Set segment_flag '-d ___s_e_g___=' - Set ar_name '{AR_PPCLINK}' - Set ranlib_name '{RANLIB_NULL}' - Set cc_ld_name '{CC_LD_PPCLINK}' - Set prog_ext_name '{PROG_EXT_XCOFF}' - Set extralibs_name '{EXTRALIBS_PPC}' - Set makepef_name '{MAKEPEF_PPC}' - Set rez_name '{REZ_PPC}' -Else If "{host_cc}" =~ /scppc/ - Set host_alias "powerpc-apple-mpw" - Set cc_name '{CC_SC}' - Set segment_flag '-d ___s_e_g___=' - Set ar_name '{AR_PPCLINK}' - Set ranlib_name '{RANLIB_NULL}' - Set cc_ld_name '{CC_LD_PPCLINK}' - Set prog_ext_name '{PROG_EXT_XCOFF}' - Set extralibs_name '{EXTRALIBS_PPC}' - Set makepef_name '{MAKEPEF_PPC}' - Set rez_name '{REZ_PPC}' -Else If "{host_cc}" =~ /mwcppc/ - Set host_alias "powerpc-apple-mpw" - Set cc_name '{CC_MWCPPC}' - Set segment_flag '-d ___s_e_g___=' - Set ar_name '{AR_MWLINKPPC}' - Set ranlib_name '{RANLIB_NULL}' - Set cc_ld_name '{CC_LD_MWLINKPPC}' - # Misleading, but we don't need a PEF step. - Set prog_ext_name '{PROG_EXT_68K}' - Set extralibs_name '{EXTRALIBS_MWCPPC}' - Set makepef_name '{MAKEPEF_NULL}' - Set rez_name '{REZ_PPC}' -Else If "{host_cc}" =~ /gccppc/ - Set host_alias "powerpc-apple-mpw" - Set cc_name '{CC_PPC_GCC}' - Set segment_flag '-d ___s_e_g___=' - Set ar_name '{AR_PPCLINK}' - If {with_gnu_ld} == 1 - Set ranlib_name '{RANLIB_RANLIB}' - Set cc_ld_name '{CC_LD_GLD}' - Else - Set ranlib_name '{RANLIB_NULL}' - Set cc_ld_name '{CC_LD_PPCLINK}' - End If - Set prog_ext_name '{PROG_EXT_XCOFF}' - Set extralibs_name '{EXTRALIBS_PPC}' - Set makepef_name '{MAKEPEF_PPC}' - Set rez_name '{REZ_PPC}' -Else - Echo "{host_cc}" is not a known MPW compiler type -End If - -Set dash_c_flag '' -If "{host_cc}" =~ /gcc68k/ - Set dash_c_flag '-c' -Else If "{host_cc}" =~ /gccppc/ - Set dash_c_flag '-c' -End If - -# (should interpret aliases if not in canonical form) - -Set host_canonical "{host_alias}" - -Set target_canonical "{target_alias}" - -Set configdirs "" - -If "{srcroot}" =~ /--------/ - Set srcroot "{srcdir}" -End If -If "`Exists "{srcdir}"`" == "" - Echo Source directory {srcdir} does not exist! - Exit 1 -End If -If "`Exists "{srcroot}"`" == "" - Echo Top-level source directory {srcroot} does not exist! - Exit 1 -End If - -Set target_cpu "`echo {target_canonical} | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`" -Set target_vendor "`echo {target_canonical} | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`" -Set target_os "`echo {target_canonical} | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`" - -# Create a file that is guaranteed to be older than any other here. - -If "`Exists "{objdir}"_oldest`" == "" - mpw-touch _oldest -End If - -# Record this before creating any files, makefiles sometimes mention -# dependencies on config.status. - -Echo "# This directory was configured as follows:" >config.new -Echo "{ThisScript} --host {host_alias} --target {target_alias} --srcdir {srcdir} --srcroot {srcroot} --prefix {prefix} --cc {host_cc} {verifystr} {enable_options} {disable_options} --norecursion" >>config.new -MoveIfChange config.new config.status - -If "`Exists "{srcdir}"mpw-config.in`" != "" - tr-7to8 "{srcdir}"mpw-config.in >"{objdir}"mpw-config.in - Execute "{objdir}"mpw-config.in -End If - -# Start Makefile construction by defining all the variables chosen by -# configuration. - -Echo "# This Makefile produced by mpw-configure. Changes may get lost!" > "{objdir}"Makefile.tem -Echo "srcroot = " {srcroot} >> "{objdir}"Makefile.tem -Echo "topsrcdir = " {srcroot} >> "{objdir}"Makefile.tem -Echo "srcdir = " {srcdir} >> "{objdir}"Makefile.tem -Echo "mpw_prefix = " {prefix} >> "{objdir}"Makefile.tem -Echo "mpw_exec_prefix = " {exec_prefix} >> "{objdir}"Makefile.tem -Echo "mpw_bindir = " {bindir} >> "{objdir}"Makefile.tem -Echo "host_alias = " {host_alias} >> "{objdir}"Makefile.tem -Echo "target_alias = " {target_alias} >> "{objdir}"Makefile.tem -Echo "target_cpu = " {target_cpu} >> "{objdir}"Makefile.tem -Echo "target_vendor = " {target_vendor} >> "{objdir}"Makefile.tem -Echo "target_os = " {target_os} >> "{objdir}"Makefile.tem -Echo "target_canonical = " {target_canonical} >> "{objdir}"Makefile.tem -Echo "host_makefile_frag = " >> "{objdir}"Makefile.tem -Echo "target_makefile_frag = " >> "{objdir}"Makefile.tem -Echo "CC = " {cc_name} >> "{objdir}"Makefile.tem -Echo "AR = " {ar_name} >> "{objdir}"Makefile.tem -Echo "RANLIB = " {ranlib_name} >> "{objdir}"Makefile.tem -Echo "CC_LD = " {cc_ld_name} >> "{objdir}"Makefile.tem -Echo "PROG_EXT = " {prog_ext_name} >> "{objdir}"Makefile.tem -Echo "EXTRALIBS = " {extralibs_name} >> "{objdir}"Makefile.tem -Echo "MAKEPEF = " {makepef_name} >> "{objdir}"Makefile.tem -Echo "REZ = " {rez_name} >> "{objdir}"Makefile.tem - -If {host_cc} =~ /gccppc/ - Echo -n "dq =\Option-d\Option-d\Option-d" > "{objdir}"Makefile.tem0 - Echo '"' >> "{objdir}"Makefile.tem0 - tr-7to8 "{objdir}"Makefile.tem0 >>"{objdir}"Makefile.tem -Else - Echo -n "dq ='" >> "{objdir}"Makefile.tem - Echo -n '"' >> "{objdir}"Makefile.tem - Echo "'" >> "{objdir}"Makefile.tem -End If - -# Append the master set of definitions for the various compilers. - -If "`Exists "{srcdir}"config:mpw-mh-mpw`" != "" - tr-7to8 "{srcdir}"config:mpw-mh-mpw >>"{objdir}"Makefile.tem -Else If "`Exists "{srcroot}"config:mpw-mh-mpw`" != "" - tr-7to8 "{srcroot}"config:mpw-mh-mpw >>"{objdir}"Makefile.tem -Else - Echo "can't find a host config file!" - Exit 0 -End If - -# Append anything produced by the directory's mpw-config.in. - -If "`Exists "{objdir}"mk.tmp`" != "" - Catenate "{objdir}"mk.tmp >>"{objdir}"Makefile.tem - # An mpw-config.in might change so as not to create this - # anymore, so get rid of it now to be safe. - Delete -i -y "{objdir}"mk.tmp -End If - -# If there are sed scripts to edit the Unix Makefile.in, use them; otherwise -# use an mpw-make.in if present. - -If "`Exists "{srcdir}"mpw-make.sed`" != "" - If "`Exists "{objdir}"hacked_Makefile.in`" != "" - Set MakefileIn "{objdir}"hacked_Makefile.in - Else - Set MakefileIn "{srcdir}"Makefile.in - End If - # Find the generic makefile editing script. - If "`Exists "{srcroot}"config:mpw:g-mpw-make.sed`" != "" - sed -f "{srcroot}"config:mpw:g-mpw-make.sed "{MakefileIn}" >"{objdir}"Makefile.tem1 - Else If "`Exists "{srcroot}"utils:mpw:g-mpw-make.sed`" != "" - sed -f "{srcroot}"utils:mpw:g-mpw-make.sed "{MakefileIn}" >"{objdir}"Makefile.tem1 - Else If "`Exists "{srcdir}"g-mpw-make.sed`" != "" - sed -f "{srcdir}"g-mpw-make.sed "{MakefileIn}" >"{objdir}"Makefile.tem1 - Else - Echo Warning: g-mpw-make.sed not found, copying "{MakefileIn}" verbatim... - Catenate "{MakefileIn}" >"{objdir}"Makefile.tem1 - End If - sed -f "{srcdir}"mpw-make.sed "{objdir}"Makefile.tem1 >"{objdir}"Makefile.tem2 - sed -e 's/^prefix = .*$/prefix = {mpw_prefix}/g' -e 's/^exec_prefix = .*$/exec_prefix = {mpw_exec_prefix}/g' -e 's/^bindir = @bindir@/bindir = {mpw_bindir}/g' "{objdir}"Makefile.tem2 >"{objdir}"Makefile.tem3 - sed -e "s/@DASH_C_FLAG@/{dash_c_flag}/" -e "s/@SEGMENT_FLAG(\([^)]*\))@/{segment_flag}\1/" "{objdir}"Makefile.tem3 >"{objdir}"mpw-make.in - tr-7to8 "{objdir}"mpw-make.in >>"{objdir}"Makefile.tem - If "`Exists "{objdir}"mk.sed`" != "" - sed -f "{objdir}"mk.sed "{objdir}"Makefile.tem >"{objdir}"Makefile.tem2 - Rename -y "{objdir}"Makefile.tem2 "{objdir}"Makefile.tem - End If - MoveIfChange "{objdir}"Makefile.tem "{objdir}"Makefile - Delete -i -y "{objdir}"Makefile.tem[12] - If {verify} == 1 - Echo Created Makefile in "`Directory`" - End If -Else If "`Exists "{srcdir}"mpw-make.in`" != "" - sed -e 's/^prefix = .*$/prefix = {mpw_prefix}/g' "{srcdir}"mpw-make.in >"{objdir}"Makefile.tem1 - sed -e "s/@DASH_C_FLAG@/{dash_c_flag}/" -e "s/@SEGMENT_FLAG(\([^)]*\))@/{segment_flag}}\1/" "{objdir}"Makefile.tem1 >"{objdir}"Makefile.tem2 - tr-7to8 "{objdir}"Makefile.tem2 >>"{objdir}"Makefile.tem - If "`Exists "{objdir}"mk.sed`" != "" - sed -f "{objdir}"mk.sed "{objdir}"Makefile.tem >"{objdir}"Makefile.tem2 - Rename -y "{objdir}"Makefile.tem2 "{objdir}"Makefile.tem - End If - MoveIfChange "{objdir}"Makefile.tem "{objdir}"Makefile - Delete -i -y "{objdir}"Makefile.tem[12] - If {verify} == 1 - Echo Created Makefile in "`Directory`" - End If -End If - -# Produce a build script if the source is defined. - -If "`Exists "{srcdir}"mpw-build.in`" != "" - Echo "Set srcroot " {srcroot} > "{objdir}"mpw-build.tem - Echo "Set srcdir " {srcdir} >> "{objdir}"mpw-build.tem - Echo "Set target_canonical " {target_canonical} >> "{objdir}"mpw-build.tem - Echo "Set prefix " {prefix} >> "{objdir}"mpw-build.tem - tr-7to8 "{srcdir}"mpw-build.in >>"{objdir}"mpw-build.tem - MoveIfChange "{objdir}"mpw-build.tem "{objdir}"mpw-build - If {verify} == 1 - Echo Created mpw-build in "`Directory`" - End If -End If - -# Apply ourselves recursively to the list of subdirectories to configure. - -If {recurse} == 1 - For subdir In {configdirs} - Set savedir "`Directory`" - If "`Exists "{srcdir}{subdir}:"`" == "" - If {verify} == 1 - Echo No "{srcdir}{subdir}:" found, skipping - End If - Continue - End If - If {verify} == 1 - Echo Configuring {subdir}... - End If - If "`Exists "{objdir}{subdir}:"`" == "" - NewFolder "{objdir}{subdir}" - End If - SetDirectory "{objdir}{subdir}:" - "{ThisScript}" --target "{target_canonical}" --srcdir "{srcdir}{subdir}:" --srcroot "{srcroot}" --prefix "{prefix}" --cc "{host_cc}" {verifystr} {enable_options} {disable_options} - SetDirectory "{savedir}" - End For -End If - -SetDirectory "{savedir}" diff --git a/mpw-install b/mpw-install deleted file mode 100644 index 04c5aac..0000000 --- a/mpw-install +++ /dev/null @@ -1,122 +0,0 @@ -# GNU Install script for MPW. - -Set OldExit "{Exit}" -Set Exit 0 - -Set TempUserStartup "{TempFolder}"__temp__UserStartup - -Echo '# UserStartup generated by GNU Install script' > "{TempUserStartup}" -Echo '' >> "{TempUserStartup}" - -# (should) Check that disk space is sufficient for installation. - -# Assume that the install script is where everything else is. - -Set thisdir "`Directory`" - -# Copy the binaries to the desired place. - -Confirm -t "Copy the binaries to somewhere else?" -Set TmpStatus {Status} -If {TmpStatus} == 0 - Set bindest "`GetFileName -d -m "Where to install the binaries?"`" - If {Status} == 0 - If "`Exists "{thisdir}bin"`" != "" - For afile In "{thisdir}"bin:\Option-x - Duplicate -y "{afile}" "{bindest}" - End For - Else - Echo "bin directory not found, exiting" - Exit 1 - End If - Else - Echo "No destination supplied, exiting" - Exit 1 - End If -Else If {TmpStatus} == 4 - # Use the existing directory. - Set bindest "{thisdir}bin:" -Else - # Cancelled from confirmation, escape altogether. - Exit 1 -End If - -# Copy the libraries to the desired place. - -Confirm -t "Copy the libraries to somewhere else?" -Set TmpStatus {Status} -If {TmpStatus} == 0 - Set libdest "`GetFileName -d -m "Where to install the libraries?"`" - If {Status} == 0 - If "`Exists "{thisdir}lib:"`" != "" - For afile In "{thisdir}"lib:\Option-x - Duplicate -y "{afile}" "{libdest}" - End For - Else - Echo "lib directory not found, exiting" - Exit 1 - End If - Else - Echo "No destination supplied, exiting" - Exit 1 - End If -Else If {TmpStatus} == 4 - # Use the existing directory. - Set libdest "{thisdir}lib:" -Else - # Cancelled from confirmation, escape altogether. - Exit 1 -End If - - -# Add the location of the binaries to the command path. - -Echo -n 'Set Commands "' >> "{TempUserStartup}" -Echo -n "{bindest}" >> "{TempUserStartup}" -Echo ',{Commands}"' >> "{TempUserStartup}" -Echo '' >> "{TempUserStartup}" - -# Set up GCC exec prefix. - -Set gcclibdir "{libdest}"gcc-lib: - -Echo -n 'Set GCC_EXEC_PREFIX "' >> "{TempUserStartup}" -Echo -n "{gcclibdir}" >> "{TempUserStartup}" -Echo '"' >> "{TempUserStartup}" -Echo "Export GCC_EXEC_PREFIX" >> "{TempUserStartup}" -Echo '' >> "{TempUserStartup}" - -# Set up path to libgcc.xcoff etc. - -Echo -n 'Set GCCPPCLibraries "' >> "{TempUserStartup}" -Echo -n "{libdest}" >> "{TempUserStartup}" -Echo '"' >> "{TempUserStartup}" -Echo "Export GCCPPCLibraries" >> "{TempUserStartup}" -Echo '' >> "{TempUserStartup}" - -# Display contents of UserStartup, confirm installation. - -Set UserStartupName "UserStartup\Option-8GNU" - -Echo "Contents of" {UserStartupName} "will be:" -Catenate "{TempUserStartup}" - -Confirm "Install {UserStartupName} into the MPW folder {MPW} ?" -If {Status} == 0 - Duplicate "{TempUserStartup}" "{MPW}{UserStartupName}" - Delete -y "{TempUserStartup}" -Else - Echo "{UserStartupName} file not installed" -End If - -# (should) Check HEXA resource, warn if low. - -# (should) Check for spaces in pathnames, warn if found. - -Echo "Installation was successful." -Echo "" -Echo "Be sure to review the usage notes in 'Read Me for MPW' before proceeding!" - -# Restore previous settings. - -Set Exit "{OldExit}" diff --git a/src-release b/src-release index 4fec631..42d5c20 100644 --- a/src-release +++ b/src-release @@ -45,7 +45,6 @@ PWD = $${PWDCMD-pwd} # distribution (perhaps it would be better to include it anyway). DEVO_SUPPORT= README Makefile.in configure configure.in \ config.guess config.if config.sub config move-if-change \ - mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \ COPYING COPYING.LIB install-sh config-ml.in symlink-tree \ mkinstalldirs ltconfig ltmain.sh missing ylwrap \ libtool.m4 gettext.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh \ |