diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..6164ec30 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +* text=auto +* eol=lf diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..7fdc741a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,66 @@ +name: Deploy PPA + +on: + push: + branches: djgpp-ppa + +jobs: + check: + runs-on: ubuntu-latest + outputs: + good: ${{ steps.docheck.outputs.good }} + steps: + - uses: actions/checkout@v3 + - id: docheck + name: Check release state + run: | + echo "good=$([ -z "$(head -n 1 debian/changelog | grep 'UNRELEASED')" ] && echo 'true' || echo 'false')" >> "$GITHUB_OUTPUT" + + build: + runs-on: ubuntu-latest + needs: check + if: needs.check.outputs.good == 'true' + strategy: + matrix: + ubuntu-version: [ bionic, focal, jammy, lunar, mantic, noble ] + + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install curl git debhelper devscripts dput gpg + + - name: Setup package files + env: + UBUNTU_VERSION: ${{ matrix.ubuntu-version }} + run: | + mv debian/pgp-secret.asc /tmp/ + sed -i "s/) unstable/~$UBUNTU_VERSION) $UBUNTU_VERSION/g" debian/changelog + + - name: Make source package + run: | + debuild -S --no-sign -d + + - name: Import signing key + env: + DECRYPT_KEY: ${{ secrets.DECRYPT_KEY }} + run: | + gpg --batch -k > /dev/null + gpg --batch --quiet --passphrase "$DECRYPT_KEY" -d /tmp/pgp-secret.asc | gpg --batch --import + rm -f /tmp/pgp-secret.asc + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 197C3D6E652B6B1C2B7F9EDF84089D0351487AB8 + + - name: Sign package + run: | + debsign -k197C3D6E652B6B1C2B7F9EDF84089D0351487AB8 ../*.changes + + - name: Delete key + if: always() + run: | + sudo shred -fu $(gpgconf --list-dirs | grep homedir | sed 's/homedir://')/priv*/* + + - name: Upload package + run: | + dput ppa:jwt27/djgpp-toolchain ../*.changes diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..e55ce9f2 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,139 @@ +name: Test builds + +on: + push: + branches-ignore: djgpp-ppa + pull_request: + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, macos-latest ] + build-type: [ clean ] + env: + - + TARGET: i386-pc-msdosdjgpp + PACKAGES: binutils gcc djgpp-2.05 watt32 + - + TARGET: i386-pc-msdosdjgpp + PACKAGES: binutils gcc djgpp-cvs watt32 + - + TARGET: i386-pc-msdosdjgpp + PACKAGES: gdb + - + TARGET: arm-eabi + PACKAGES: binutils gcc newlib + - + TARGET: arm-eabi + PACKAGES: gdb + - + TARGET: avr + PACKAGES: binutils gcc avr-libc + - + TARGET: avr + PACKAGES: gdb avarice simulavr avrdude + - + TARGET: ia16-elf + PACKAGES: binutils gcc newlib + + steps: + - uses: actions/checkout@v3 + + - name: Clear brew package cache + if: contains(matrix.os, 'macos') + run: | + rm -rf $(brew --cache) + + - name: Cache brew package cache + uses: jwt27/cache@dist + if: contains(matrix.os, 'macos') + with: + path: ~/Library/Caches/Homebrew + key: testbuild-brew-cache-${{ github.sha }} + restore-keys: | + testbuild-brew-cache- + + - name: Install dependencies (ubuntu) + if: contains(matrix.os, 'ubuntu') + run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt-get update + sudo apt-get install bison flex curl make texinfo zlib1g-dev tar bzip2 gzip xz-utils unzip dos2unix libtool-bin gcc-11 g++-11 cmake help2man python2-dev nasm libslang2-dev ccache + echo "CC=gcc-12" >> $GITHUB_ENV + echo "CXX=g++-12" >> $GITHUB_ENV + mkdir -p ~/.ccache + echo "CCACHE_DIR=~/.ccache" >> $GITHUB_ENV + echo "/usr/lib/ccache" >> $GITHUB_PATH + + - name: Install dependencies (macos) + if: contains(matrix.os, 'macos') + run: | + brew update + brew install bash bison flex curl make texinfo zlib bzip2 gzip xz unzip dos2unix libtool cmake help2man nasm s-lang ccache + mkdir -p ~/.ccache + echo "CCACHE_DIR=~/.ccache" >> $GITHUB_ENV + echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH + + - name: Cache sources + uses: actions/cache@v3 + with: + path: download + key: testbuild-sources-${{ matrix.os }}-${{ matrix.env.TARGET }}-${{ matrix.env.PACKAGES }}-${{ github.sha }} + restore-keys: | + testbuild-sources-${{ matrix.os }}-${{ matrix.env.TARGET }}-${{ matrix.env.PACKAGES }}- + + - name: Cache ccache + uses: actions/cache@v3 + with: + path: ~/.ccache + key: testbuild-ccache-${{ matrix.os }}-${{ matrix.env.TARGET }}-${{ matrix.env.PACKAGES }}-${{ github.sha }} + restore-keys: | + testbuild-ccache-${{ matrix.os }}-${{ matrix.env.TARGET }}-${{ matrix.env.PACKAGES }}- + + - name: Download sources + env: + TARGET: ${{ matrix.env.TARGET }} + PACKAGES: ${{ matrix.env.PACKAGES }} + run: ./script/select-script.sh --only-download + + - name: Cache build output + uses: actions/cache@v3 + if: matrix.build-type == 'rebuild' + id: cache-build + with: + path: build + key: testbuild-build-${{ matrix.os }}-${{ matrix.env.TARGET }}-${{ matrix.env.PACKAGES }}-${{ github.sha }} + restore-keys: | + testbuild-build-${{ matrix.os }}-${{ matrix.env.TARGET }}-${{ matrix.env.PACKAGES }}- + + - name: Clean build + if: matrix.build-type == 'clean' + env: + TARGET: ${{ matrix.env.TARGET }} + run: ./script/select-script.sh --no-download --prefix=${{ github.workspace }}-${{ github.sha }} ${{ matrix.env.PACKAGES }} + + - name: Rebuild + if: matrix.build-type == 'rebuild' + env: + TARGET: ${{ matrix.env.TARGET }} + run: ./script/select-script.sh --no-download --prefix=${{ github.workspace }} ${{ matrix.env.PACKAGES }} + + - name: Rebuild if uncached + if: matrix.build-type == 'rebuild' && steps.cache-build.outputs.cache-hit != 'true' + env: + TARGET: ${{ matrix.env.TARGET }} + run: ./script/select-script.sh --no-download --prefix=${{ github.workspace }} ${{ matrix.env.PACKAGES }} + + - name: Clear and pack git sources before caching + if: matrix.build-type == 'clean' + run: | + find download/*/* ! -wholename '*/.git/*' -delete || true + cd download + for DIR in */; do + DIR=${DIR%/} + tar -c -f $DIR-git.tar $DIR + done + rm -rf */ diff --git a/.gitignore b/.gitignore index c5e82040..b55146bc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,13 @@ build/ download/ +install/ +/Makefile +debian/*/* +debian/*.log +debian/*.substvars +debian/files +debian/debhelper-build-stamp +debian/*copyright +!debian/source/ +!debian/djgpp-dev.copyright +!debian/gcc-djgpp.copyright diff --git a/README.md b/README.md index f9983fb8..fbc3a4ad 100644 --- a/README.md +++ b/README.md @@ -1,155 +1,207 @@ -## Building DJGPP cross compiler on Windows, Mac OSX, Linux and FreeBSD. +## Build gcc cross compiler on Windows, Mac OSX, Linux and FreeBSD. -build-djgpp : Build DJGPP cross compiler and binutils on Windows (MinGW/Cygwin), Mac OSX, Linux and FreeBSD. +### Upgrade notes: -### Prebuilt binary files +* 2020-02-13: default target for djgpp has changed to `i386-pc-msdosdjgpp`. +If you require compatibility with distributions that use `i586`, you can either: + - run `sudo i386-pc-msdosdjgpp-link-i586` after installing, or + - build with `./build-djgpp.sh --target=i586-pc-msdosdjgpp`. +* 2020-02-07: setenv script is now installed to `$PREFIX/bin/$TARGET-setenv`. +* 2019-06-06: `master` is now the default branch again. -If you don't want build DJGPP by yourself, you can download prebuilt DJGPP binary files for MinGW, OSX and Linux from GitHub Release page. +### Current package versions, as of 2024-05-30: -### Requirement +* gcc 12.2.0 +* binutils 2.42 +* gdb 14.2 +* djgpp 2.05 / cvs +* watt-32 git +* newlib 4.3.0.20230120 +* avr-libc 2.1.0 +* avrdude 7.0 +* avarice 2.14 +* simulavr git -Before running this script, you need to install these programs first : +### Tested targets: + +* i386-pc-msdosdjgpp +* ia16 +* arm-eabi +* avr + +See the [Actions tab](https://github.com/jwt27/build-gcc/actions?query=workflow%3A"Test+builds"+branch%3Amaster) on Github for a detailed status of individual targets. + +### Requirements + +Before running this script, you need to install these programs first: * g++ * gcc * unzip +* tar +* bzip2 +* gzip +* xz * bison * flex * make (or gmake for FreeBSD) * makeinfo * patch * zlib header/library -* curl (for Cygwin/OSX/Linux/FreeBSD) -* wget (for MinGW) +* curl or wget * bash (for FreeBSD) +* python2 headers (for gdb) +* python3 headers (for gdb >= 9.0) +* m4 +* dos2unix +* nasm Depending on your system, installation procedure maybe different. On Debian/Ubuntu, you can install these programs by : -``` -sudo apt-get update -sudo apt-get install bison flex curl gcc g++ make texinfo zlib1g-dev g++ unzip +```console +$ sudo apt-get update +$ sudo apt-get install bison flex curl gcc g++ make texinfo zlib1g-dev tar bzip2 gzip xz-utils unzip python{2,3}-dev m4 dos2unix nasm ``` Fedora : -``` -sudo yum install gcc-c++ bison flex texinfo patch zlib-devel +```console +$ sudo yum install gcc-c++ which bison flex texinfo patch zlib-devel tar bzip2 gzip xz unzip python-devel m4 dos2unix nasm ``` -MinGW : +mingw-w64 (msys2) : -``` -mingw-get update -mingw-get install msys-unzip libz-dev msys-wget msys-bison msys-flex msys-patch +```console +$ pacman -Syuu base-devel mingw-w64-x86_64-{toolchain,curl,zlib,python{2,3}} compression m4 dos2unix nasm ``` ### Configuration -Default install location is /usr/local/djgpp. You can change install location by setting environment variable *DJGPP_PREFIX* : - -``` -DJGPP_PREFIX=/usr/local/my-djgpp +The following command line options are recognized: +```sh + --prefix=... # Install location (default: /usr/local/cross) + --target=... # Target name + --enable-languages=... # Comma-separated list of languages to build compilers for (default: c,c++) + --no-download # Do not download any files + --only-download # Download source files, then exit + --ignore-dependencies # Do not check package dependencies + --batch # Run in batch mode (will not prompt or delay to confirm settings) ``` -Default support language is C and C++. You can change supported languages by setting environment variable *ENABLE_LANGUAGES* : - +Several environment variables also control the build process: +```sh +GCC_CONFIGURE_OPTIONS= # Extra options to pass to gcc's ./configure +BINUTILS_CONFIGURE_OPTIONS= # Same, for binutils +GDB_CONFIGURE_OPTIONS= # Same, for gdb +NEWLIB_CONFIGURE_OPTIONS= # Same, for newlib +AVRLIBC_CONFIGURE_OPTIONS= # Same, for avr-libc +GLOBAL_CONFIGURE_OPTIONS= # Extra options added to all variables listed above +MAKE_JOBS= # Number of parallel build threads (auto-detected) +CFLAGS_FOR_TARGET= # CFLAGS used to build target libraries +HOST= # The platform you are building for, when building a cross-cross compiler +BUILD= # The platform you are building on (auto-detected) +MAKE_CHECK= # Run test suites on built programs. +MAKE_CHECK_GCC= # Run gcc test suites. ``` -ENABLE_LANGUAGES=c,c++,f95,objc,obj-c++ -``` - -### Building DJGPP compiler - -To build DJGPP, just run : -./build-djgpp.sh *djgpp-version* +### Building -Currently supported djgpp-version : - -* 4.7.3 -* 4.8.4 -* 4.8.5 -* 4.9.2 -* 4.9.3 -* 4.9.4 -* 5.1.0 -* 5.2.0 -* 5.3.0 -* 5.4.0 -* 5.5.0 -* 6.1.0 -* 6.2.0 -* 6.3.0 -* 6.4.0 -* 7.1.0 -* 7.2.0 +Pick the script you want to use: +```sh +build-djgpp.sh # builds a toolchain targeting djgpp (default TARGET: i386-pc-msdosdjgpp) +build-newlib.sh # builds a toolchain with the newlib C library +build-ia16.sh # builds a toolchain targeting 8086 processors, with the newlib C library (fixed TARGET: ia16-elf) +build-avr.sh # builds a toolchain targeting AVR microcontrollers (fixed TARGET: avr) +``` -For example, to build DJGPP for gcc 7.2.0 : +To build DJGPP, just run: +```console +$ ./build-djgpp.sh [options...] [packages...] +``` +Run with no arguments to see a list of supported packages and versions. +For example, to build gcc 9.2.0 with the latest djgpp C library from CVS and latest binutils: +```console +$ ./build-djgpp.sh --prefix=/usr/local djgpp-cvs binutils gcc-9.2.0 ``` -./build-djgpp.sh 7.2.0 + +To install or upgrade all packages: +```console +$ ./build-djgpp.sh --prefix=/usr/local all ``` -It will download all necessary files, build DJGPP compiler and binutils, and install it. +It will download all necessary files, build DJGPP compiler, binutils, and gdb, and install it. -### Using DJGPP compiler +### Using -There are 2 methods to run the compiler (*BASE_DIR* is your DJGPP install location). +(In the following examples, it is assumed that you built the toolchain with +options `--prefix=/home/me/.local` and `--target=i386-pc-msdosdjgpp`. +Substitute as necessary for your configuration.) -* Use compiler full name : +To use your new compiler, you must add its `bin` directory to your `PATH`. +You can then access the toolchain through its target-prefixed name: -``` -BASE_DIR/bin/i586-pc-msdosdjgpp-g++ hello.cpp +```console +$ PATH="/home/me/.local/bin:$PATH" +$ i386-pc-msdosdjgpp-g++ hello.cpp ``` -* Or, use compiler short name, you have to change environment variables. +A `setenv` script will also be installed. This sets up environment variables +so that you can use the toolchain as if you were working on the target machine. +The toolchain utilities are then accessible through their short names (`gcc`, +`ld`, etc), and you can access target-specific documentation and locate target +libraries (via `man`/`info` and `pkg-config`, respectively). -If you are using Linux : -``` -export PATH=BASE_DIR/i586-pc-msdosdjgpp/bin/:$PATH -export GCC_EXEC_PREFIX=BASE_DIR/lib/gcc/ -g++ hello.cpp -``` -Or, run : +This script can be used either with no arguments, to start a new shell: -``` -source BASE_DIR/setenv +```console +$ i386-pc-msdosdjgpp-setenv +Entering new shell for target environment: i386-pc-msdosdjgpp +$ which gcc +/home/me/.local/i386-pc-msdosdjgpp/bin//gcc +$ gcc -v 2>&1 | grep 'Target' +Target: i386-pc-msdosdjgpp ``` -If you are using Windows command prompt : +With a single command: -``` -PATH=BASE_DIR/i586-pc-msdosdjgpp/bin;%PATH% -set GCC_EXEC_PREFIX=BASE_DIR/lib/gcc/ -g++ hello.cpp +```console +$ i386-pc-msdosdjgpp-setenv info libc + # (shows documentation for djgpp's C library) ``` -Or, run : +Or `source`d into the current shell: (Bash only) +```console +$ which gcc +/usr/bin/gcc +$ source i386-pc-msdosdjgpp-setenv +Environment variables set up for target: i386-pc-msdosdjgpp +$ which gcc +/home/me/.local/i386-pc-msdosdjgpp/bin/gcc ``` -BASE_DIR/setenv.bat -``` -### Supported DJGPP Utilities +### Supported DJGPP utilities + * dxe3gen * dxe3res * dxegen * exe2coff * stubedit * stubify +* djasm -### Successful build +### Supported AVR utilities -* OSX 10.12.5 -* Debian 7 (32bit) -* Ubuntu 12 (64bit) -* FreeBSD-10.2 (64bit) -* Cygwin (32bit Windows XP) -* MinGW (32bit Windows XP) +* avrdude +* avarice +* simulavr ### Thanks -This script is based on spec file from DJGPP source rpm files by Andris Pavenis : - +These scripts are based on Andrew Wu's build-djgpp script: + +Which in turn is based on spec file from DJGPP source rpm files by Andris Pavenis: diff --git a/avr/all b/avr/all new file mode 100644 index 00000000..062a5da5 --- /dev/null +++ b/avr/all @@ -0,0 +1,5 @@ +source avr/minimal +source common/gdb +source avr/avrdude +source avr/avarice +source avr/simulavr diff --git a/avr/avarice b/avr/avarice new file mode 100644 index 00000000..5dc3becc --- /dev/null +++ b/avr/avarice @@ -0,0 +1 @@ +source avr/avarice-2.14 diff --git a/avr/avarice-2.13 b/avr/avarice-2.13 new file mode 100644 index 00000000..a16ab178 --- /dev/null +++ b/avr/avarice-2.13 @@ -0,0 +1,2 @@ +AVARICE_VERSION=2.13 +AVARICE_ARCHIVE=https://downloads.sourceforge.net/project/avarice/avarice/avarice-$AVARICE_VERSION/avarice-$AVARICE_VERSION.tar.bz2 diff --git a/avr/avarice-2.14 b/avr/avarice-2.14 new file mode 100644 index 00000000..9acd7412 --- /dev/null +++ b/avr/avarice-2.14 @@ -0,0 +1,2 @@ +AVARICE_VERSION=2.14 +AVARICE_ARCHIVE=https://downloads.sourceforge.net/project/avarice/avarice/avarice-$AVARICE_VERSION/avarice-$AVARICE_VERSION.tar.bz2 diff --git a/avr/avr-libc b/avr/avr-libc new file mode 100644 index 00000000..2f2dffe0 --- /dev/null +++ b/avr/avr-libc @@ -0,0 +1 @@ +source avr/avr-libc-2.1.0 diff --git a/avr/avr-libc-2.0.0 b/avr/avr-libc-2.0.0 new file mode 100644 index 00000000..fca0762e --- /dev/null +++ b/avr/avr-libc-2.0.0 @@ -0,0 +1,3 @@ +AVRLIBC_VERSION=2.0.0 +AVRLIBC_ARCHIVE=http://download.savannah.gnu.org/releases/avr-libc/avr-libc-$AVRLIBC_VERSION.tar.bz2 +AVRLIBC_DOC_ARCHIVE=http://download.savannah.gnu.org/releases/avr-libc/avr-libc-manpages-$AVRLIBC_VERSION.tar.bz2 diff --git a/avr/avr-libc-2.1.0 b/avr/avr-libc-2.1.0 new file mode 100644 index 00000000..c0ff9e47 --- /dev/null +++ b/avr/avr-libc-2.1.0 @@ -0,0 +1,3 @@ +AVRLIBC_VERSION=2.1.0 +AVRLIBC_ARCHIVE=http://download.savannah.gnu.org/releases/avr-libc/avr-libc-$AVRLIBC_VERSION.tar.bz2 +AVRLIBC_DOC_ARCHIVE=http://download.savannah.gnu.org/releases/avr-libc/avr-libc-manpages-$AVRLIBC_VERSION.tar.bz2 \ No newline at end of file diff --git a/avr/avrdude b/avr/avrdude new file mode 100644 index 00000000..d7ffd947 --- /dev/null +++ b/avr/avrdude @@ -0,0 +1 @@ +source avr/avrdude-7.0 diff --git a/avr/avrdude-6.3 b/avr/avrdude-6.3 new file mode 100644 index 00000000..a32245a3 --- /dev/null +++ b/avr/avrdude-6.3 @@ -0,0 +1,2 @@ +AVRDUDE_VERSION=6.3 +AVRDUDE_ARCHIVE=http://download.savannah.gnu.org/releases/avrdude/avrdude-$AVRDUDE_VERSION.tar.gz diff --git a/avr/avrdude-6.4 b/avr/avrdude-6.4 new file mode 100644 index 00000000..4772cd86 --- /dev/null +++ b/avr/avrdude-6.4 @@ -0,0 +1,2 @@ +AVRDUDE_VERSION=6.4 +AVRDUDE_ARCHIVE=http://download.savannah.gnu.org/releases/avrdude/avrdude-$AVRDUDE_VERSION.tar.gz diff --git a/avr/avrdude-7.0 b/avr/avrdude-7.0 new file mode 100644 index 00000000..cc0e8521 --- /dev/null +++ b/avr/avrdude-7.0 @@ -0,0 +1,2 @@ +AVRDUDE_VERSION=7.0 +AVRDUDE_ARCHIVE=http://download.savannah.gnu.org/releases/avrdude/avrdude-$AVRDUDE_VERSION.tar.gz diff --git a/avr/minimal b/avr/minimal new file mode 100644 index 00000000..99ce0bcd --- /dev/null +++ b/avr/minimal @@ -0,0 +1,3 @@ +source avr/avr-libc +source binutils/binutils +source common/gcc diff --git a/avr/simulavr b/avr/simulavr new file mode 100644 index 00000000..7ee9b9ff --- /dev/null +++ b/avr/simulavr @@ -0,0 +1 @@ +source avr/simulavr-git diff --git a/avr/simulavr-git b/avr/simulavr-git new file mode 100644 index 00000000..d665ec39 --- /dev/null +++ b/avr/simulavr-git @@ -0,0 +1,2 @@ +SIMULAVR_VERSION=git +SIMULAVR_GIT="https://git.savannah.nongnu.org/git/simulavr.git::master" diff --git a/binutils/binutils b/binutils/binutils new file mode 100644 index 00000000..b2012abb --- /dev/null +++ b/binutils/binutils @@ -0,0 +1 @@ +source binutils/binutils-2.42 diff --git a/binutils/binutils-2.29.1 b/binutils/binutils-2.29.1 new file mode 100644 index 00000000..2b369816 --- /dev/null +++ b/binutils/binutils-2.29.1 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.29.1 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.30 b/binutils/binutils-2.30 new file mode 100644 index 00000000..4e2678c0 --- /dev/null +++ b/binutils/binutils-2.30 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.30 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.31 b/binutils/binutils-2.31 new file mode 100644 index 00000000..cd4a4b2d --- /dev/null +++ b/binutils/binutils-2.31 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.31 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.31.1 b/binutils/binutils-2.31.1 new file mode 100644 index 00000000..ec5fb7c6 --- /dev/null +++ b/binutils/binutils-2.31.1 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.31.1 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.32 b/binutils/binutils-2.32 new file mode 100644 index 00000000..cf49825f --- /dev/null +++ b/binutils/binutils-2.32 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.32 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.33.1 b/binutils/binutils-2.33.1 new file mode 100644 index 00000000..a054e549 --- /dev/null +++ b/binutils/binutils-2.33.1 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.33.1 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.34 b/binutils/binutils-2.34 new file mode 100644 index 00000000..52172cf0 --- /dev/null +++ b/binutils/binutils-2.34 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.34 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.35 b/binutils/binutils-2.35 new file mode 100644 index 00000000..02b20b46 --- /dev/null +++ b/binutils/binutils-2.35 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.35 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.35.1 b/binutils/binutils-2.35.1 new file mode 100644 index 00000000..f685d213 --- /dev/null +++ b/binutils/binutils-2.35.1 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.35.1 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.35.2 b/binutils/binutils-2.35.2 new file mode 100644 index 00000000..e850354f --- /dev/null +++ b/binutils/binutils-2.35.2 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.35.2 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.36 b/binutils/binutils-2.36 new file mode 100644 index 00000000..237f7291 --- /dev/null +++ b/binutils/binutils-2.36 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.36 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.36.1 b/binutils/binutils-2.36.1 new file mode 100644 index 00000000..fc93d879 --- /dev/null +++ b/binutils/binutils-2.36.1 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.36.1 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.37 b/binutils/binutils-2.37 new file mode 100644 index 00000000..6d30a327 --- /dev/null +++ b/binutils/binutils-2.37 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.37 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.38 b/binutils/binutils-2.38 new file mode 100644 index 00000000..0ff41126 --- /dev/null +++ b/binutils/binutils-2.38 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.38 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.39 b/binutils/binutils-2.39 new file mode 100644 index 00000000..412728e9 --- /dev/null +++ b/binutils/binutils-2.39 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.39 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.40 b/binutils/binutils-2.40 new file mode 100644 index 00000000..c74dc478 --- /dev/null +++ b/binutils/binutils-2.40 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.40 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.41 b/binutils/binutils-2.41 new file mode 100644 index 00000000..a17e3ee4 --- /dev/null +++ b/binutils/binutils-2.41 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.41 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/binutils/binutils-2.42 b/binutils/binutils-2.42 new file mode 100644 index 00000000..65b0a311 --- /dev/null +++ b/binutils/binutils-2.42 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2.42 +BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" diff --git a/build-avr.sh b/build-avr.sh new file mode 100755 index 00000000..ef86c5a2 --- /dev/null +++ b/build-avr.sh @@ -0,0 +1,83 @@ +#!/usr/bin/env bash + +PACKAGE_SOURCES="avr binutils common" +source script/init.sh + +TARGET="avr" + +prepend BINUTILS_CONFIGURE_OPTIONS "--disable-werror + --disable-nls" + +prepend GCC_CONFIGURE_OPTIONS "--disable-nls + --enable-version-specific-runtime-libs + --enable-fat" + +prepend GDB_CONFIGURE_OPTIONS "--disable-werror + --disable-nls" + +prepend AVRLIBC_CONFIGURE_OPTIONS "--enable-device-lib" + +DEPS="" +[ ! -z ${GCC_VERSION} ] && DEPS+=" avr-libc binutils" +[ ! -z ${AVRLIBC_VERSION} ] && DEPS+=" gcc binutils" + +source ${BASE}/script/check-deps-and-confirm.sh +source ${BASE}/script/download.sh +source ${BASE}/script/build-tools.sh +source ${BASE}/script/unpack-build-binutils.sh +source ${BASE}/script/build-avr-gcc.sh + +cd ${BASE}/build/ + +if [ ! -z ${SIMULAVR_VERSION} ]; then + echo "Building simulavr" + cd simulavr/ || exit 1 + [ -e .git/shallow ] && git fetch --prune --unshallow + git fetch --tags + case `uname` in + MINGW*) sed -i 's/CMAKE_CONFIG_OPTS=/CMAKE_CONFIG_OPTS=-G "MSYS Makefiles" /' Makefile ;; + esac + sed -i "s@-DCMAKE_INSTALL_PREFIX=@-DCMAKE_INSTALL_PREFIX=${DST} #@" Makefile + sed -i 's/@make/$(MAKE)/g' Makefile + sed -i 's@/bin/@@' cmake/GetGitInfo.cmake + ${MAKE_J} build || exit 1 + ${MAKE_J} doc || exit 1 + [ ! -z $MAKE_CHECK ] && ${MAKE_J} -s check | tee ${BASE}/tests/simulavr.log + echo "Installing simulavr" + ${SUDO} ${MAKE} -C build install || exit 1 + cd ${BASE}/build/ || exit 1 +fi + +if [ ! -z ${AVARICE_VERSION} ]; then + echo "Building AVaRICE" + untar ${AVARICE_ARCHIVE} + cd avarice-${AVARICE_VERSION} + [ -e ${BASE}/patch/patch-avarice-${AVARICE_VERSION}.txt ] && ( patch -p1 -u < ${BASE}/patch/patch-avarice-${AVARICE_VERSION}.txt || exit 1 ) + mkdir -p build-avr/ + cd build-avr/ || exit 1 + rm -rf * + ../configure --prefix=${PREFIX} || exit 1 + ${MAKE_J} || exit 1 + [ ! -z $MAKE_CHECK ] && ${MAKE_J} -s check | tee ${BASE}/tests/avarice.log + echo "Installing AVaRICE" + ${SUDO} ${MAKE_J} install || exit 1 + cd ${BASE}/build/ || exit 1 +fi + +if [ ! -z ${AVRDUDE_VERSION} ]; then + echo "Building AVRDUDE" + untar ${AVRDUDE_ARCHIVE} + cd avrdude-${AVRDUDE_VERSION} + mkdir -p build-avr/ + cd build-avr/ || exit 1 + rm -rf * + ../configure --prefix=${PREFIX} || exit 1 + ${MAKE_J} || exit 1 + [ ! -z $MAKE_CHECK ] && ${MAKE_J} -s check | tee ${BASE}/tests/avrdude.log + echo "Installing AVRDUDE" + ${SUDO} ${MAKE_J} install || exit 1 + cd ${BASE}/build/ || exit 1 +fi + +source ${BASE}/script/build-gdb.sh +source ${BASE}/script/finalize.sh diff --git a/build-djgpp.sh b/build-djgpp.sh index 0ad29f4d..0ca92d0a 100755 --- a/build-djgpp.sh +++ b/build-djgpp.sh @@ -1,18 +1,372 @@ #!/usr/bin/env bash -BUILD_VER=$1 +DJGPP_DOWNLOAD_BASE="http://www.mirrorservice.org/sites/ftp.delorie.com/pub" +PACKAGE_SOURCES="djgpp binutils common" +source script/init.sh -if [ -z $BUILD_VER ]; then - echo "Usage : $0 djgpp-version" - echo "Supported djgpp-version :" - for F in `(cd script/;echo *)`; do echo " "$F; done - exit 1 +case $TARGET in +*-msdosdjgpp) ;; +*) TARGET="i386-pc-msdosdjgpp" ;; +esac + +prepend BINUTILS_CONFIGURE_OPTIONS "--disable-werror + --disable-nls" + +prepend GCC_CONFIGURE_OPTIONS "--disable-nls + --enable-libquadmath-support + --enable-version-specific-runtime-libs + --enable-fat + --enable-libstdcxx-filesystem-ts" + +prepend GDB_CONFIGURE_OPTIONS "--disable-werror + --disable-nls" + +DEPS="" +[ ! -z ${WATT32_VERSION} ] && DEPS+=" gcc djgpp binutils" +[ ! -z ${GCC_VERSION} ] && DEPS+=" djgpp binutils" +[ ! -z ${DJGPP_VERSION} ] && DEPS+=" binutils gcc" + +source ${BASE}/script/check-deps-and-confirm.sh +source ${BASE}/script/download.sh +source ${BASE}/script/build-tools.sh + +cd ${BASE}/build/ || exit 1 + +if [ ! -z ${BINUTILS_VERSION} ]; then + if echo ${BINUTILS_VERSION} | grep -q '\.'; then + source ${BASE}/script/unpack-build-binutils.sh + else + mkdir -p bnu${BINUTILS_VERSION}s + cd bnu${BINUTILS_VERSION}s + if [ ! -e binutils-unpacked ]; then + echo "Unpacking binutils..." + unzip -oq ../../download/bnu${BINUTILS_VERSION}s.zip || exit 1 + + pushd gnu/binutils-* || exit 1 + cat ${BASE}/patch/djgpp-binutils-${BINUTILS_VERSION}/* | patch -p1 -u || exit 1 + popd + + touch binutils-unpacked + fi + cd gnu/binutils-* || exit 1 + + # exec permission of some files are not set, fix it. + for EXEC_FILE in install-sh missing configure; do + echo "chmod a+x $EXEC_FILE" + chmod a+x $EXEC_FILE || exit 1 + done + + source ${BASE}/script/build-binutils.sh + fi +fi + +cd ${BASE}/build/ || exit 1 + +if [ ! -z ${WATT32_VERSION} ]; then + export WATT_ROOT=${BASE}/build/Watt-32 + cd ${WATT_ROOT} || exit 1 + patch -p1 -u < ../../patch/watt32.patch || exit 1 + cd util/ || exit 1 + case $(uname) in + MINGW*|MSYS*) WATT_UTILS=win32 ;; + Linux) WATT_UTILS=linux ;; + *) WATT_UTILS=linux + rm -f linux/* ;; + esac + case $(uname -m) in + x86_64) ;; + *) rm -f linux/* ;; + esac + ${MAKE_J} ${WATT_UTILS} + for i in mkmake mkdep bin2c; do + if ! [ -x ${WATT_UTILS}/$i ]; then + echo "Unable to build Watt-32 tool '$i'. Make sure you have S-Lang installed." + exit 1 + fi + done + cd ../src/ || exit 1 + if [ ! "`cat configure-options 2> /dev/null`" == "${CFLAGS_FOR_TARGET}" ]; then + ${MAKE_J} -f djgpp.mak clean + fi + ./configur.sh clean || exit 1 fi -if [ -x script/$BUILD_VER ]; then - echo "Building version : $BUILD_VER" - script/$BUILD_VER || exit 1 -else - echo "Unsupported version : $BUILD_VER" - exit 1 +cd ${BASE}/build/ || exit 1 + +if [ ! -z ${DJGPP_VERSION} ]; then + if [ "${DJGPP_VERSION}" == "cvs" ]; then + cd djgpp-cvs || exit 1 + else + echo "Unpacking djgpp..." + rm -rf djgpp-${DJGPP_VERSION}/ + mkdir -p djgpp-${DJGPP_VERSION}/ + cd djgpp-${DJGPP_VERSION}/ || exit 1 + unzip -uoq ../../download/djdev${DJGPP_VERSION}.zip || exit 1 + unzip -uoq ../../download/djlsr${DJGPP_VERSION}.zip || exit 1 + unzip -uoq ../../download/djcrx${DJGPP_VERSION}.zip || exit 1 + patch -p1 -u < ../../patch/patch-djcrx${DJGPP_VERSION}.txt || exit 1 + cat ../../patch/djlsr${DJGPP_VERSION}/* | patch -p1 -u || exit 1 + fi + + cd src + unset COMSPEC + sed -i "50cCROSS_PREFIX = ${TARGET}-" makefile.def + sed -i "61cGCC = ${CC} -g -O2 ${CFLAGS}" makefile.def + if [ ! -z ${GCC_VERSION} ] || [ ! "`cat configure-options 2> /dev/null`" == "${TARGET}:${DST}:${CFLAGS_FOR_TARGET}" ]; then + ${MAKE_J} clean + rm -f ../lib/*.{a,o} + fi + ${MAKE} misc.exe makemake.exe || exit 1 + mkdir -p ../hostbin + ${MAKE} -C djasm native || exit 1 + ${MAKE} -C stub native || exit 1 + cd .. + + case `uname` in + MINGW*) EXE=.exe ;; + MSYS*) EXE=.exe ;; + *) EXE= ;; + esac + + echo "Installing djgpp headers and utilities" + ${SUDO} mkdir -p ${DST}/${TARGET}/sys-include || exit 1 + install_files include/* ${DST}/${TARGET}/sys-include/ || exit 1 + ${SUDO} mkdir -p ${DST}/bin || exit 1 + install_files hostbin/stubify.exe ${DST}/bin/${TARGET}-stubify${EXE} || exit 1 + install_files hostbin/stubedit.exe ${DST}/bin/${TARGET}-stubedit${EXE} || exit 1 fi + +cd ${BASE}/build/ + +if [ ! -z ${GCC_VERSION} ]; then + # build gcc + untar ${DJCROSS_GCC_ARCHIVE} || exit 1 + cd djcross-gcc-${GCC_VERSION}/ + + BUILDDIR=`pwd` + export PATH="${BUILDDIR}/tmpinst/bin:$PATH" + + if [ ! -e ${BUILDDIR}/tmpinst/autoconf-${AUTOCONF_VERSION}-built ]; then + echo "Building autoconf" + cd $BUILDDIR + untar ${AUTOCONF_ARCHIVE} || exit 1 + cd autoconf-${AUTOCONF_VERSION}/ + ./configure --prefix=$BUILDDIR/tmpinst || exit 1 + ${MAKE_J} DESTDIR= all install || exit 1 + rm ${BUILDDIR}/tmpinst/autoconf-*-built + touch ${BUILDDIR}/tmpinst/autoconf-${AUTOCONF_VERSION}-built + else + echo "autoconf already built, skipping." + fi + + if [ ! -e ${BUILDDIR}/tmpinst/automake-${AUTOMAKE_VERSION}-built ]; then + echo "Building automake" + cd $BUILDDIR + untar ${AUTOMAKE_ARCHIVE} || exit 1 + cd automake-${AUTOMAKE_VERSION}/ + ./configure --prefix=$BUILDDIR/tmpinst || exit 1 + ${MAKE} DESTDIR= all install || exit 1 + rm ${BUILDDIR}/tmpinst/automake-*-built + touch ${BUILDDIR}/tmpinst/automake-${AUTOMAKE_VERSION}-built + else + echo "automake already built, skipping." + fi + + cd $BUILDDIR + + if [ ! -e gcc-unpacked ]; then + rm -rf $BUILDDIR/gnu/ + + if [ `uname` = "FreeBSD" ]; then + # The --verbose option is not recognized by BSD patch + sed -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 + fi + + case ${GCC_VERSION} in + 4.7.3) UNPACK_PATCH=patch-unpack-gcc-4.7.3.txt ;; + 4.8.0) ;& + 4.8.1) ;& + 4.8.2) UNPACK_PATCH=patch-unpack-gcc-4.8.0.txt ;; + *) UNPACK_PATCH=patch-unpack-gcc.txt ;; + esac + + patch -p1 -u < ${BASE}/patch/${UNPACK_PATCH} || exit 1 + + echo "Unpacking gcc..." + mkdir gnu/ + cd gnu/ || exit 1 + untar ${GCC_ARCHIVE} + cd .. + + echo "Running unpack-gcc.sh" + sh unpack-gcc.sh --no-djgpp-source || exit 1 + + # patch gnu/gcc-X.XX/gcc/doc/gcc.texi + echo "Patch gcc/doc/gcc.texi" + cd gnu/gcc-*/gcc/doc || exit 1 + sed -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 + cd - + + cd $BUILDDIR/ + + pushd gnu/gcc-${GCC_VERSION} || exit 1 + + if [ ! -z ${BUILD_DEB} ]; then + echo "Unpacking gcc dependencies" + for URL in $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE $ISL_ARCHIVE; do + FILE=`basename $URL` + untar ${FILE} + mv ${FILE%.*.*} ${FILE%%-*} || exit 1 + done + else + echo "Downloading gcc dependencies" + sed -i 's/ftp/http/g' contrib/download_prerequisites + ./contrib/download_prerequisites || exit 1 + fi + + # apply extra patches if necessary + cat ${BASE}/patch/djgpp-gcc-${GCC_VERSION}/* | patch -p1 -u || exit 1 + popd + + touch gcc-unpacked + else + echo "gcc already unpacked, skipping." + fi + + echo "Building gcc (stage 1)" + + mkdir -p djcross + cd djcross || exit 1 + + TEMP_CFLAGS="$CFLAGS" + TEMP_CXXFLAGS="$CXXFLAGS" + export CFLAGS="$CFLAGS $GCC_EXTRA_CFLAGS" + export CXXFLAGS="$CXXFLAGS $GCC_EXTRA_CXXFLAGS" + + GCC_CONFIGURE_OPTIONS+=" --target=${TARGET} --prefix=${PREFIX} ${HOST_FLAG} ${BUILD_FLAG} + --enable-languages=${ENABLE_LANGUAGES}" + strip_whitespace GCC_CONFIGURE_OPTIONS + + if [ ! -e configure-prefix ] || [ ! "`cat configure-prefix`" == "${GCC_CONFIGURE_OPTIONS}" ]; then + rm -rf * + eval "../gnu/gcc-${GCC_VERSION}/configure ${GCC_CONFIGURE_OPTIONS}" || exit 1 + echo ${GCC_CONFIGURE_OPTIONS} > configure-prefix + else + echo "Note: gcc already configured. To force a rebuild, use: rm -rf $(pwd)" + sleep 5 + fi + + cp ${DST}/bin/${TARGET}-stubify ${BUILDDIR}/tmpinst/bin/stubify || exit 1 + + ${MAKE_J} all-gcc || exit 1 + echo "Installing gcc (stage 1)" + ${SUDO} ${MAKE_J} install-gcc || exit 1 + + CFLAGS="$TEMP_CFLAGS" + CXXFLAGS="$TEMP_CXXFLAGS" +fi + +if [ ! -z ${DJGPP_VERSION} ]; then + echo "Building djgpp libc" + cd ${BASE}/build/djgpp-${DJGPP_VERSION}/src + TEMP_CFLAGS="$CFLAGS" + TEMP_LDFLAGS="$LDFLAGS" + export CFLAGS="$CFLAGS_FOR_TARGET" + export LDFLAGS="$LDFLAGS_FOR_TARGET" + sed -i 's/Werror/Wno-error/' makefile.cfg + ${MAKE} config || exit 1 + echo "${TARGET}:${DST}:${CFLAGS_FOR_TARGET}" > configure-options + ${MAKE_J} -C mkdoc || exit 1 + ${MAKE_J} -C libc || exit 1 + + echo "Installing djgpp libc" + ${SUDO} mkdir -p ${DST}/${TARGET}/lib + install_files ../lib/* ${DST}/${TARGET}/lib || exit 1 + LDFLAGS="$TEMP_LDFLAGS" + CFLAGS="$TEMP_CFLAGS" +fi + +cd ${BASE}/build/ || exit 1 + +if [ ! -z ${WATT32_VERSION} ]; then + echo "Building Watt-32" + cd ${WATT_ROOT}/src || exit 1 + DJGPP_PREFIX=${TARGET} ./configur.sh djgpp || exit 1 + cp ${BASE}/patch/watt32-djgpp-$(get_version djgpp)/djgpp.err ../inc/sys/djgpp.err || exit 1 + cp ${BASE}/patch/watt32-djgpp-$(get_version djgpp)/syserr.c build/djgpp/syserr.c || exit 1 + + echo "${CFLAGS_FOR_TARGET}" > configure-options + + export TARGET CFLAGS_FOR_TARGET + ${MAKE_J} -f djgpp.mak || exit 1 + + echo "Installing Watt-32" + ${SUDO} mkdir -p ${DST}/${TARGET}/watt/inc || exit 1 + ${SUDO} mkdir -p ${DST}/${TARGET}/watt/lib || exit 1 + install_files ../lib/libwatt.a ${DST}/${TARGET}/watt/lib/ || exit 1 + ${SUDO} ln -fs ../watt/lib/libwatt.a ${DST}/${TARGET}/lib/libwatt.a || exit 1 + ${SUDO} ln -fs libwatt.a ${DST}/${TARGET}/lib/libsocket.a || exit 1 + install_files ../inc/* ${DST}/${TARGET}/watt/inc/ || exit 1 + + set_version watt32 +fi + +if [ ! -z ${GCC_VERSION} ]; then + echo "Building gcc (stage 2)" + cd $BUILDDIR/djcross || exit 1 + + TEMP_CFLAGS="$CFLAGS" + TEMP_CXXFLAGS="$CXXFLAGS" + export CFLAGS="$CFLAGS $GCC_EXTRA_CFLAGS" + export CXXFLAGS="$CXXFLAGS $GCC_EXTRA_CXXFLAGS" + + export STAGE_CC_WRAPPER="${BASE}/script/destdir-hack.sh ${DST}/${TARGET}" + ${MAKE_J} || exit 1 + [ ! -z $MAKE_CHECK_GCC ] && ${MAKE_J} -s check-gcc | tee ${BASE}/tests/gcc.log + echo "Installing gcc (stage 2)" + ${SUDO} ${MAKE_J} install-strip || \ + ${SUDO} ${MAKE_J} install-strip || exit 1 + ${SUDO} ${MAKE_J} -C mpfr install DESTDIR=${BASE}/build/tmpinst + + CFLAGS="$TEMP_CFLAGS" + CXXFLAGS="$TEMP_CXXFLAGS" + + set_version gcc +fi + +if [ ! -z ${DJGPP_VERSION} ]; then + echo "Building djgpp libraries" + cd ${BASE}/build/djgpp-${DJGPP_VERSION}/src + TEMP_CFLAGS="$CFLAGS" + TEMP_LDFLAGS="$LDFLAGS" + export CFLAGS="$CFLAGS_FOR_TARGET" + export LDFLAGS="$LDFLAGS_FOR_TARGET" + ${MAKE_J} -C utils native || exit 1 + ${MAKE_J} -C dxe native || exit 1 + ${MAKE_J} -C debug || exit 1 + ${MAKE_J} -C libemu || exit 1 + ${MAKE_J} -C libm || exit 1 + ${MAKE_J} -C docs || exit 1 + ${MAKE_J} -C ../zoneinfo/src + ${MAKE_J} -f makempty || exit 1 + LDFLAGS="$TEMP_LDFLAGS" + CFLAGS="$TEMP_CFLAGS" + cd .. + + echo "Installing djgpp libraries and utilities" + install_files lib/* ${DST}/${TARGET}/lib || exit 1 + ${SUDO} mkdir -p ${DST}/${TARGET}/share/info + install_files info/* ${DST}/${TARGET}/share/info + install_files hostbin/exe2coff.exe ${DST}/bin/${TARGET}-exe2coff${EXE} || exit 1 + install_files hostbin/djasm.exe ${DST}/bin/${TARGET}-djasm${EXE} || exit 1 + install_files hostbin/dxegen.exe ${DST}/bin/${TARGET}-dxegen${EXE} || exit 1 + install_files hostbin/dxegen.exe ${DST}/bin/${TARGET}-dxe3gen${EXE} || exit 1 + install_files hostbin/dxe3res.exe ${DST}/bin/${TARGET}-dxe3res${EXE} || exit 1 + + set_version djgpp +fi + +cd ${BASE}/build + +source ${BASE}/script/build-gdb.sh +source ${BASE}/script/finalize.sh diff --git a/build-ia16.sh b/build-ia16.sh new file mode 100755 index 00000000..050b38b5 --- /dev/null +++ b/build-ia16.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +PACKAGE_SOURCES="ia16 binutils" +source script/init.sh + +TARGET="ia16-elf" + +prepend BINUTILS_CONFIGURE_OPTIONS "--disable-werror + --disable-nls + --disable-gdb + --disable-sim + --enable-x86-hpa-segelf=yes + --enable-ld=default + --enable-gold=yes" + +prepend GCC_CONFIGURE_OPTIONS "--disable-nls + --enable-fat + --disable-libstdcxx-dual-abi + --disable-extern-template + --disable-wchar_t + --disable-libstdcxx-verbose" + +prepend GDB_CONFIGURE_OPTIONS "--disable-werror + --disable-nls" + +prepend NEWLIB_CONFIGURE_OPTIONS "--enable-newlib-elix-level=2 --disable-elks-libc + --disable-newlib-wide-orient --enable-newlib-nano-malloc + --disable-newlib-multithread --enable-newlib-global-atexit + --enable-newlib-reent-small --disable-newlib-fseek-optimization + --disable-newlib-unbuf-stream-opt --enable-target-optspace + --enable-newlib-io-c99-formats --enable-newlib-mb --enable-newlib-iconv + --enable-newlib-iconv-encodings=utf_8,utf_16,cp850,cp852,koi8_uni" + +DEPS="" +[ ! -z ${GCC_VERSION} ] && DEPS+=" newlib binutils" +[ ! -z ${NEWLIB_VERSION} ] && DEPS+=" gcc binutils" + +source ${BASE}/script/check-deps-and-confirm.sh +source ${BASE}/script/download.sh +source ${BASE}/script/build-tools.sh + +cd ${BASE}/build/ || exit 1 +if [ "$BINUTILS_VERSION" = "ia16" ]; then + cd binutils-${BINUTILS_VERSION} || exit 1 + source ${BASE}/script/build-binutils.sh +else + source ${BASE}/script/unpack-build-binutils.sh +fi + +if [ ! -z ${GCC_VERSION} ]; then + cd ${BASE}/build/gcc-ia16/ + patch -p1 -u < ../../patch/patch-gcc-ia16.txt || exit 1 + cd - +fi + +source ${BASE}/script/build-newlib-gcc.sh +source ${BASE}/script/build-gdb.sh +source ${BASE}/script/finalize.sh diff --git a/build-newlib.sh b/build-newlib.sh new file mode 100755 index 00000000..3d8119d4 --- /dev/null +++ b/build-newlib.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +PACKAGE_SOURCES="newlib binutils common" +source script/init.sh + +prepend BINUTILS_CONFIGURE_OPTIONS "--disable-werror + --disable-nls" + +prepend GCC_CONFIGURE_OPTIONS "--disable-nls + --enable-libquadmath-support + --enable-version-specific-runtime-libs + --enable-fat" + +prepend GDB_CONFIGURE_OPTIONS "--disable-werror + --disable-nls" + +DEPS="" +[ ! -z ${GCC_VERSION} ] && DEPS+=" newlib binutils" +[ ! -z ${NEWLIB_VERSION} ] && DEPS+=" gcc binutils" + +source ${BASE}/script/check-deps-and-confirm.sh +source ${BASE}/script/download.sh +source ${BASE}/script/build-tools.sh +source ${BASE}/script/unpack-build-binutils.sh +source ${BASE}/script/build-newlib-gcc.sh +source ${BASE}/script/build-gdb.sh +source ${BASE}/script/finalize.sh diff --git a/common/gcc b/common/gcc new file mode 100644 index 00000000..5fcb86e2 --- /dev/null +++ b/common/gcc @@ -0,0 +1 @@ +source common/gcc-12.2.0 diff --git a/common/gcc-10.1.0 b/common/gcc-10.1.0 new file mode 100644 index 00000000..f704af28 --- /dev/null +++ b/common/gcc-10.1.0 @@ -0,0 +1,12 @@ +GCC_VERSION=10.1.0 +GCC_VERSION_SHORT=10.10 +AUTOCONF_VERSION=2.69 +AUTOMAKE_VERSION=1.15.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-10.2.0 b/common/gcc-10.2.0 new file mode 100644 index 00000000..34d3f3c0 --- /dev/null +++ b/common/gcc-10.2.0 @@ -0,0 +1,12 @@ +GCC_VERSION=10.2.0 +GCC_VERSION_SHORT=10.20 +AUTOCONF_VERSION=2.69 +AUTOMAKE_VERSION=1.15.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-10.3.0 b/common/gcc-10.3.0 new file mode 100644 index 00000000..ac4bff05 --- /dev/null +++ b/common/gcc-10.3.0 @@ -0,0 +1,12 @@ +GCC_VERSION=10.3.0 +GCC_VERSION_SHORT=10.30 +AUTOCONF_VERSION=2.69 +AUTOMAKE_VERSION=1.15.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-11.1.0 b/common/gcc-11.1.0 new file mode 100644 index 00000000..ecb6c701 --- /dev/null +++ b/common/gcc-11.1.0 @@ -0,0 +1,12 @@ +GCC_VERSION=11.1.0 +GCC_VERSION_SHORT=11.10 +AUTOCONF_VERSION=2.69 +AUTOMAKE_VERSION=1.15.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-11.2.0 b/common/gcc-11.2.0 new file mode 100644 index 00000000..abeeae5f --- /dev/null +++ b/common/gcc-11.2.0 @@ -0,0 +1,12 @@ +GCC_VERSION=11.2.0 +GCC_VERSION_SHORT=11.20 +AUTOCONF_VERSION=2.69 +AUTOMAKE_VERSION=1.15.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-12.1.0 b/common/gcc-12.1.0 new file mode 100644 index 00000000..6d0a4145 --- /dev/null +++ b/common/gcc-12.1.0 @@ -0,0 +1,12 @@ +GCC_VERSION=12.1.0 +GCC_VERSION_SHORT=12.10 +AUTOCONF_VERSION=2.69 +AUTOMAKE_VERSION=1.15.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-12.2.0 b/common/gcc-12.2.0 new file mode 100644 index 00000000..e7e02694 --- /dev/null +++ b/common/gcc-12.2.0 @@ -0,0 +1,12 @@ +GCC_VERSION=12.2.0 +GCC_VERSION_SHORT=12.20 +AUTOCONF_VERSION=2.69 +AUTOMAKE_VERSION=1.15.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-4.7.3 b/common/gcc-4.7.3 new file mode 100644 index 00000000..d62a732d --- /dev/null +++ b/common/gcc-4.7.3 @@ -0,0 +1,12 @@ +GCC_VERSION=4.7.3 +GCC_VERSION_SHORT=4.73 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" + +GCC_CONFIGURE_OPTIONS="${GCC_CONFIGURE_OPTIONS}" + +GCC_EXTRA_CFLAGS="-std=gnu90" diff --git a/common/gcc-4.8.4 b/common/gcc-4.8.4 new file mode 100644 index 00000000..c3c3f473 --- /dev/null +++ b/common/gcc-4.8.4 @@ -0,0 +1,13 @@ +GCC_VERSION=4.8.4 +GCC_VERSION_SHORT=4.84 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" + +GCC_CONFIGURE_OPTIONS="--enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" + +GCC_EXTRA_CFLAGS="-std=gnu90" diff --git a/common/gcc-4.8.5 b/common/gcc-4.8.5 new file mode 100644 index 00000000..f8fb77d7 --- /dev/null +++ b/common/gcc-4.8.5 @@ -0,0 +1,13 @@ +GCC_VERSION=4.8.5 +GCC_VERSION_SHORT=4.85 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" + +GCC_CONFIGURE_OPTIONS="--enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" + +GCC_EXTRA_CFLAGS="-std=gnu90" diff --git a/common/gcc-4.9.2 b/common/gcc-4.9.2 new file mode 100644 index 00000000..9469adad --- /dev/null +++ b/common/gcc-4.9.2 @@ -0,0 +1,13 @@ +GCC_VERSION=4.9.2 +GCC_VERSION_SHORT=4.92 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" + +GCC_CONFIGURE_OPTIONS="--enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" + +GCC_EXTRA_CFLAGS="-std=gnu90" diff --git a/common/gcc-4.9.3 b/common/gcc-4.9.3 new file mode 100644 index 00000000..469da59e --- /dev/null +++ b/common/gcc-4.9.3 @@ -0,0 +1,13 @@ +GCC_VERSION=4.9.3 +GCC_VERSION_SHORT=4.93 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" + +GCC_CONFIGURE_OPTIONS="--enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" + +GCC_EXTRA_CFLAGS="-std=gnu90" diff --git a/common/gcc-4.9.4 b/common/gcc-4.9.4 new file mode 100644 index 00000000..ee7fc3f9 --- /dev/null +++ b/common/gcc-4.9.4 @@ -0,0 +1,13 @@ +GCC_VERSION=4.9.4 +GCC_VERSION_SHORT=4.94 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" + +GCC_CONFIGURE_OPTIONS="--enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" + +GCC_EXTRA_CFLAGS="-std=gnu90" diff --git a/common/gcc-5.1.0 b/common/gcc-5.1.0 new file mode 100644 index 00000000..5bd7dfbb --- /dev/null +++ b/common/gcc-5.1.0 @@ -0,0 +1,12 @@ +GCC_VERSION=5.1.0 +GCC_VERSION_SHORT=5.10 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-5.2.0 b/common/gcc-5.2.0 new file mode 100644 index 00000000..06faec19 --- /dev/null +++ b/common/gcc-5.2.0 @@ -0,0 +1,12 @@ +GCC_VERSION=5.2.0 +GCC_VERSION_SHORT=5.20 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-5.3.0 b/common/gcc-5.3.0 new file mode 100644 index 00000000..be570a3f --- /dev/null +++ b/common/gcc-5.3.0 @@ -0,0 +1,12 @@ +GCC_VERSION=5.3.0 +GCC_VERSION_SHORT=5.30 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-5.4.0 b/common/gcc-5.4.0 new file mode 100644 index 00000000..3316b20d --- /dev/null +++ b/common/gcc-5.4.0 @@ -0,0 +1,12 @@ +GCC_VERSION=5.4.0 +GCC_VERSION_SHORT=5.40 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-5.5.0 b/common/gcc-5.5.0 new file mode 100644 index 00000000..d60b0c95 --- /dev/null +++ b/common/gcc-5.5.0 @@ -0,0 +1,12 @@ +GCC_VERSION=5.5.0 +GCC_VERSION_SHORT=5.50 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-6.1.0 b/common/gcc-6.1.0 new file mode 100644 index 00000000..9b4ea93b --- /dev/null +++ b/common/gcc-6.1.0 @@ -0,0 +1,12 @@ +GCC_VERSION=6.1.0 +GCC_VERSION_SHORT=6.10 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.6 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-6.2.0 b/common/gcc-6.2.0 new file mode 100644 index 00000000..9ef84198 --- /dev/null +++ b/common/gcc-6.2.0 @@ -0,0 +1,12 @@ +GCC_VERSION=6.2.0 +GCC_VERSION_SHORT=6.20 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.6 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-6.3.0 b/common/gcc-6.3.0 new file mode 100644 index 00000000..ee648cc2 --- /dev/null +++ b/common/gcc-6.3.0 @@ -0,0 +1,12 @@ +GCC_VERSION=6.3.0 +GCC_VERSION_SHORT=6.30 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.6 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-6.4.0 b/common/gcc-6.4.0 new file mode 100644 index 00000000..cbd4b642 --- /dev/null +++ b/common/gcc-6.4.0 @@ -0,0 +1,13 @@ +GCC_VERSION=6.4.0 +GCC_VERSION_SHORT=6.40 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.6 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + --enable-libstdcxx-filesystem-ts \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-7.1.0 b/common/gcc-7.1.0 new file mode 100644 index 00000000..d19a21e5 --- /dev/null +++ b/common/gcc-7.1.0 @@ -0,0 +1,13 @@ +GCC_VERSION=7.1.0 +GCC_VERSION_SHORT=7.10 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.6 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + --enable-libstdcxx-filesystem-ts \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-7.2.0 b/common/gcc-7.2.0 new file mode 100644 index 00000000..06114f2d --- /dev/null +++ b/common/gcc-7.2.0 @@ -0,0 +1,13 @@ +GCC_VERSION=7.2.0 +GCC_VERSION_SHORT=7.20 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.6 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + --enable-libstdcxx-filesystem-ts \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-7.3.0 b/common/gcc-7.3.0 new file mode 100644 index 00000000..b4679c0c --- /dev/null +++ b/common/gcc-7.3.0 @@ -0,0 +1,13 @@ +GCC_VERSION=7.3.0 +GCC_VERSION_SHORT=7.30 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.6 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + --enable-libstdcxx-filesystem-ts \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-8.1.0 b/common/gcc-8.1.0 new file mode 100644 index 00000000..72c1409b --- /dev/null +++ b/common/gcc-8.1.0 @@ -0,0 +1,13 @@ +GCC_VERSION=8.1.0 +GCC_VERSION_SHORT=8.10 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.6 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + --enable-libstdcxx-filesystem-ts \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-8.2.0 b/common/gcc-8.2.0 new file mode 100644 index 00000000..72aa7c64 --- /dev/null +++ b/common/gcc-8.2.0 @@ -0,0 +1,15 @@ +GCC_VERSION=8.2.0 +GCC_VERSION_SHORT=8.20 +AUTOCONF_VERSION=2.64 +AUTOMAKE_VERSION=1.11.6 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +DJCROSS_GCC_ARCHIVE="http://ap1.pp.fi/djgpp/gcc/${GCC_VERSION}/rpm/djcross-gcc-${GCC_VERSION}.tar.bz2" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + --enable-libstdcxx-filesystem-ts \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-8.3.0 b/common/gcc-8.3.0 new file mode 100644 index 00000000..e9902b1a --- /dev/null +++ b/common/gcc-8.3.0 @@ -0,0 +1,13 @@ +GCC_VERSION=8.3.0 +GCC_VERSION_SHORT=8.30 +AUTOCONF_VERSION=2.69 +AUTOMAKE_VERSION=1.15.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + --enable-libstdcxx-filesystem-ts \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-9.1.0 b/common/gcc-9.1.0 new file mode 100644 index 00000000..b277f194 --- /dev/null +++ b/common/gcc-9.1.0 @@ -0,0 +1,12 @@ +GCC_VERSION=9.1.0 +GCC_VERSION_SHORT=9.10 +AUTOCONF_VERSION=2.69 +AUTOMAKE_VERSION=1.15.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-9.2.0 b/common/gcc-9.2.0 new file mode 100644 index 00000000..429971c4 --- /dev/null +++ b/common/gcc-9.2.0 @@ -0,0 +1,12 @@ +GCC_VERSION=9.2.0 +GCC_VERSION_SHORT=9.20 +AUTOCONF_VERSION=2.69 +AUTOMAKE_VERSION=1.15.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gcc-9.3.0 b/common/gcc-9.3.0 new file mode 100644 index 00000000..b1e5a35d --- /dev/null +++ b/common/gcc-9.3.0 @@ -0,0 +1,12 @@ +GCC_VERSION=9.3.0 +GCC_VERSION_SHORT=9.30 +AUTOCONF_VERSION=2.69 +AUTOMAKE_VERSION=1.15.1 + +GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" +AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" +AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" + +GCC_CONFIGURE_OPTIONS="--disable-plugin \ + --enable-lto \ + ${GCC_CONFIGURE_OPTIONS}" diff --git a/common/gdb b/common/gdb new file mode 100644 index 00000000..d926d3a4 --- /dev/null +++ b/common/gdb @@ -0,0 +1 @@ +source common/gdb-14.2 diff --git a/common/gdb-10.1 b/common/gdb-10.1 new file mode 100644 index 00000000..2335d407 --- /dev/null +++ b/common/gdb-10.1 @@ -0,0 +1,2 @@ +GDB_VERSION=10.1 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-10.2 b/common/gdb-10.2 new file mode 100644 index 00000000..bb2f5d6a --- /dev/null +++ b/common/gdb-10.2 @@ -0,0 +1,2 @@ +GDB_VERSION=10.2 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-11.1 b/common/gdb-11.1 new file mode 100644 index 00000000..14f89a37 --- /dev/null +++ b/common/gdb-11.1 @@ -0,0 +1,2 @@ +GDB_VERSION=11.1 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-11.2 b/common/gdb-11.2 new file mode 100644 index 00000000..b70465cd --- /dev/null +++ b/common/gdb-11.2 @@ -0,0 +1,2 @@ +GDB_VERSION=11.2 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-12.1 b/common/gdb-12.1 new file mode 100644 index 00000000..0025bbec --- /dev/null +++ b/common/gdb-12.1 @@ -0,0 +1,2 @@ +GDB_VERSION=12.1 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-13.1 b/common/gdb-13.1 new file mode 100644 index 00000000..26d4922f --- /dev/null +++ b/common/gdb-13.1 @@ -0,0 +1,2 @@ +GDB_VERSION=13.1 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-13.2 b/common/gdb-13.2 new file mode 100644 index 00000000..68ec0c89 --- /dev/null +++ b/common/gdb-13.2 @@ -0,0 +1,2 @@ +GDB_VERSION=13.2 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-14.1 b/common/gdb-14.1 new file mode 100644 index 00000000..27d549f3 --- /dev/null +++ b/common/gdb-14.1 @@ -0,0 +1,2 @@ +GDB_VERSION=14.1 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-14.2 b/common/gdb-14.2 new file mode 100644 index 00000000..aec973f3 --- /dev/null +++ b/common/gdb-14.2 @@ -0,0 +1,2 @@ +GDB_VERSION=14.2 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-7.12.1 b/common/gdb-7.12.1 new file mode 100644 index 00000000..06ce0e10 --- /dev/null +++ b/common/gdb-7.12.1 @@ -0,0 +1,2 @@ +GDB_VERSION=7.12.1 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-8.0 b/common/gdb-8.0 new file mode 100644 index 00000000..0d51a64e --- /dev/null +++ b/common/gdb-8.0 @@ -0,0 +1,2 @@ +GDB_VERSION=8.0 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-8.0.1 b/common/gdb-8.0.1 new file mode 100644 index 00000000..9358015c --- /dev/null +++ b/common/gdb-8.0.1 @@ -0,0 +1,2 @@ +GDB_VERSION=8.0.1 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-8.1 b/common/gdb-8.1 new file mode 100644 index 00000000..fd87a764 --- /dev/null +++ b/common/gdb-8.1 @@ -0,0 +1,2 @@ +GDB_VERSION=8.1 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-8.1.1 b/common/gdb-8.1.1 new file mode 100644 index 00000000..9d305b4f --- /dev/null +++ b/common/gdb-8.1.1 @@ -0,0 +1,2 @@ +GDB_VERSION=8.1.1 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-8.2 b/common/gdb-8.2 new file mode 100644 index 00000000..7355d25c --- /dev/null +++ b/common/gdb-8.2 @@ -0,0 +1,2 @@ +GDB_VERSION=8.2 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-8.2.1 b/common/gdb-8.2.1 new file mode 100644 index 00000000..26e0cac3 --- /dev/null +++ b/common/gdb-8.2.1 @@ -0,0 +1,2 @@ +GDB_VERSION=8.2.1 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-8.3 b/common/gdb-8.3 new file mode 100644 index 00000000..789a86b9 --- /dev/null +++ b/common/gdb-8.3 @@ -0,0 +1,2 @@ +GDB_VERSION=8.3 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-8.3.1 b/common/gdb-8.3.1 new file mode 100644 index 00000000..2970fae7 --- /dev/null +++ b/common/gdb-8.3.1 @@ -0,0 +1,2 @@ +GDB_VERSION=8.3.1 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-9.1 b/common/gdb-9.1 new file mode 100644 index 00000000..964392aa --- /dev/null +++ b/common/gdb-9.1 @@ -0,0 +1,2 @@ +GDB_VERSION=9.1 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/common/gdb-9.2 b/common/gdb-9.2 new file mode 100644 index 00000000..41b73663 --- /dev/null +++ b/common/gdb-9.2 @@ -0,0 +1,2 @@ +GDB_VERSION=9.2 +GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" diff --git a/debian/binutils-djgpp-doc.install b/debian/binutils-djgpp-doc.install new file mode 100644 index 00000000..ec0fcc92 --- /dev/null +++ b/debian/binutils-djgpp-doc.install @@ -0,0 +1,5 @@ +usr/i386-pc-msdosdjgpp/share/info/gprof.info +usr/i386-pc-msdosdjgpp/share/info/binutils.info +usr/i386-pc-msdosdjgpp/share/info/as.info +usr/i386-pc-msdosdjgpp/share/info/ld.info +usr/i386-pc-msdosdjgpp/share/info/bfd.info diff --git a/debian/binutils-djgpp.install b/debian/binutils-djgpp.install new file mode 100644 index 00000000..1211c9bd --- /dev/null +++ b/debian/binutils-djgpp.install @@ -0,0 +1,33 @@ +usr/i*86-pc-msdosdjgpp/lib/ldscripts/* +usr/i*86-pc-msdosdjgpp/bin/strings +usr/i*86-pc-msdosdjgpp/bin/ld +usr/i*86-pc-msdosdjgpp/bin/readelf +usr/i*86-pc-msdosdjgpp/bin/ld.bfd +usr/i*86-pc-msdosdjgpp/bin/size +usr/i*86-pc-msdosdjgpp/bin/addr2line +usr/i*86-pc-msdosdjgpp/bin/strip +usr/i*86-pc-msdosdjgpp/bin/objcopy +usr/i*86-pc-msdosdjgpp/bin/c++filt +usr/i*86-pc-msdosdjgpp/bin/ar +usr/i*86-pc-msdosdjgpp/bin/gprof +usr/i*86-pc-msdosdjgpp/bin/ranlib +usr/i*86-pc-msdosdjgpp/bin/as +usr/i*86-pc-msdosdjgpp/bin/nm +usr/i*86-pc-msdosdjgpp/bin/elfedit +usr/i*86-pc-msdosdjgpp/bin/objdump +usr/bin/i*86-pc-msdosdjgpp-strings +usr/bin/i*86-pc-msdosdjgpp-ld +usr/bin/i*86-pc-msdosdjgpp-readelf +usr/bin/i*86-pc-msdosdjgpp-ld.bfd +usr/bin/i*86-pc-msdosdjgpp-size +usr/bin/i*86-pc-msdosdjgpp-addr2line +usr/bin/i*86-pc-msdosdjgpp-strip +usr/bin/i*86-pc-msdosdjgpp-objcopy +usr/bin/i*86-pc-msdosdjgpp-c++filt +usr/bin/i*86-pc-msdosdjgpp-ar +usr/bin/i*86-pc-msdosdjgpp-gprof +usr/bin/i*86-pc-msdosdjgpp-ranlib +usr/bin/i*86-pc-msdosdjgpp-as +usr/bin/i*86-pc-msdosdjgpp-nm +usr/bin/i*86-pc-msdosdjgpp-elfedit +usr/bin/i*86-pc-msdosdjgpp-objdump diff --git a/debian/binutils-djgpp.manpages b/debian/binutils-djgpp.manpages new file mode 100644 index 00000000..15db6d90 --- /dev/null +++ b/debian/binutils-djgpp.manpages @@ -0,0 +1,18 @@ +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gprof.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-ar.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-ranlib.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-windmc.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-objdump.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-c++filt.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-strings.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-readelf.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-ld.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-size.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-objcopy.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-as.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-strip.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-dlltool.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-addr2line.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-nm.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-elfedit.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-windres.1 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..0ca17b2a --- /dev/null +++ b/debian/changelog @@ -0,0 +1,191 @@ +djgpp-toolchain (12) UNRELEASED; urgency=medium + + * Set 'Architecture: all' for library packages. + * binutils version 2.42. + + -- jwt27 Thu, 30 May 2024 19:31:25 +0200 + +djgpp-toolchain (11) unstable; urgency=medium + + * Add wrapper script for pkg-config: i386-pc-msdosdjgpp-pkg-config + * Fix libc bug in ioctl()/fcntl() that prevented arguments from being passed + through to fsext handlers (socket library). + * binutils version 2.41. + + -- jwt27 Sun, 29 Oct 2023 14:26:37 +0100 + +djgpp-toolchain (10) unstable; urgency=medium + + * dxe3gen version 1.0.5. This now uses gcc to invoke the assembler and + linker. As a result, it is no longer necessary to set any environment + variables before use. + * binutils version 2.40. + + -- jwt27 Thu, 18 May 2023 14:32:45 +0200 + +djgpp-toolchain (9) unstable; urgency=medium + + * Update go32 stub in binutils to match libc version. + + -- jwt27 Sun, 20 Nov 2022 23:02:05 +0100 + +djgpp-toolchain (8) unstable; urgency=low + + * Add virtual packages for gcc and libc. + * Set architecture for doc packages to 'all'. + + -- jwt27 Wed, 28 Sep 2022 18:54:18 +0200 + +djgpp-toolchain (7.1) unstable; urgency=low + + * Move meta-packages to new repository. + * The compiler now looks for locally-installed libraries in + /usr/i386-pc-msdosdjgpp/local/. + + -- jwt27 Sun, 25 Sep 2022 02:21:08 +0200 + +djgpp-toolchain (6) unstable; urgency=low + + * Improve Debian package system. + * Compile target libraries with '-ffunction-sections -fdata-sections'. + * Configure gcc with '--libexecdir=/usr/lib'. + * Add convenience packages 'djgpp' and 'djgpp-doc'. + * Install documentation in exec-prefix (/usr/i386-pc-msdosdjgpp/). + * Drop 'extra' packages and install their contents in exec-prefix. + + -- jwt27 Mon, 19 Sep 2022 19:20:38 +0200 + +djgpp-toolchain (5) unstable; urgency=low + + * gcc version 12.2.0 + * binutils version 2.39 + + -- jwt27 Tue, 23 Aug 2022 22:48:50 +0200 + +djgpp-toolchain (4) unstable; urgency=low + + * Enhanced setenv script. It now has the ability to start a new shell or + execute an single command in the target environment. + + -- jwt27 Tue, 16 Aug 2022 18:51:10 +0200 + +djgpp-toolchain (3) unstable; urgency=low + + * Keep ubuntu release name in binary package version numbers. + + -- jwt27 Mon, 15 Aug 2022 17:21:34 +0200 + +djgpp-toolchain (2) unstable; urgency=low + + * Correct bash path in rules script. + + -- jwt27 Mon, 15 Aug 2022 16:41:32 +0200 + +djgpp-toolchain (1) unstable; urgency=low + + * Binary packages for each component now have correct version numbers, and + the source package version is changed to just a single number. + * As a result of the above change, binutils-djgpp from this package now + overrides the one that comes with Debian. + * Target libraries are no longer stripped. + * Package 'djgpp' has been split into 'djgpp-dev' and 'djgpp-utils'. + + -- jwt27 Mon, 15 Aug 2022 16:24:08 +0200 + +djgpp-toolchain (0.20220523.0+gcc12.1.0+bnu2.38.0+gdb8.2.1+djcvs) unstable; urgency=low + + * gcc version 12.1.0 + + -- jwt27 Mon, 23 May 2022 16:43:08 +0200 + +djgpp-toolchain (0.20220317.0+gcc10.3.0+bnu2.38.0+gdb8.2.1+djcvs) unstable; urgency=low + + * fix build on i386. + + -- jwt27 Thu, 17 Mar 2022 00:53:38 +0100 + +djgpp-toolchain (0.20220316.2+gcc10.3.0+bnu2.38.0+gdb8.2.1+djcvs) unstable; urgency=low + + * new package: libwatt-djgpp-dev + + -- jwt27 Wed, 16 Mar 2022 19:08:24 +0100 + +djgpp-toolchain (0.20220215.0+gcc10.3.0+bnu2.38.0+gdb8.2.1+djcvs) unstable; urgency=low + + * binutils version 2.38. + + -- jwt27 Tue, 15 Feb 2022 17:49:47 +0100 + +djgpp-toolchain (0.20211110.0+gcc10.3.0+bnu2.37.0+gdb8.2.1+djcvs) unstable; urgency=low + + * gcc version 10.3.0. + * binutils version 2.37. + + -- jwt27 Wed, 10 Nov 2021 11:35:08 +0100 + +djgpp-toolchain (0.20210430.0+gcc10.2.0+bnu2.36.1+gdb8.2.1+djcvs) unstable; urgency=low + + * binutils version 2.36.1. + + -- jwt27 Fri, 30 Apr 2021 20:55:58 +0200 + +djgpp-toolchain (0.20210203.0+gcc10.2.0+bnu2.36.0+gdb8.2.1+djcvs) unstable; urgency=low + + * binutils version 2.36. + + -- jwt27 Wed, 03 Feb 2021 00:14:56 +0100 + +djgpp-toolchain (0.20201102.0+gcc10.2.0+bnu2.35.1+gdb8.2.1+djcvs) unstable; urgency=low + + * binutils version 2.35.1. + + -- jwt27 Mon, 02 Nov 2020 21:11:19 +0100 + +djgpp-toolchain (0.20200730.0+gcc10.2.0+bnu2.34.0+gdb8.2.1+djcvs) unstable; urgency=low + + * gcc version 10.2.0. + + -- jwt27 Thu, 30 Jul 2020 12:36:44 +0200 + +djgpp-toolchain (0.20200509.0+gcc10.1.0+bnu2.34.0+gdb8.2.1+djcvs) unstable; urgency=low + + * gcc version 10.1.0. + + -- jwt27 Sat, 09 May 2020 17:36:20 +0200 + +djgpp-toolchain (0.20200505.0+gcc9.3.0+bnu2.34.0+gdb8.2.1+djcvs) unstable; urgency=low + + * gcc version 9.3.0. + * patch binutils and gcc to use "b" flag for bss sections. + + -- jwt27 Tue, 05 May 2020 16:35:24 +0200 + +djgpp-toolchain (0.20200310.0+gcc9.2.0+bnu2.34.0+gdb8.2.1+djcvs) unstable; urgency=low + + * binutils version 2.34. + + -- jwt27 Tue, 10 Mar 2020 21:31:14 +0100 + +djgpp-toolchain (0.20200229.0+gcc9.2.0+bnu2.33.1+gdb8.2.1+djcvs) unstable; urgency=low + + * make gcc-djgpp in focal depend on 2.34-3ubuntu1+1.4 + + -- jwt27 Sat, 29 Feb 2020 16:37:17 +0100 + +djgpp-toolchain (0.20200213.2+gcc9.2.0+bnu2.33.1+gdb8.2.1+djcvs) unstable; urgency=low + + * remove binutils-djgpp and binutils-djgpp-doc for focal and require upstream binutils-djgpp. + + -- jwt27 Thu, 13 Feb 2020 21:51:35 +0100 + +djgpp-toolchain (0.20200213.1+gcc9.2.0+bnu2.33.1+gdb8.2.1+djcvs) unstable; urgency=low + + * fix package names in control file. + + -- jwt27 Thu, 13 Feb 2020 16:27:55 +0100 + +djgpp-toolchain (0.20200213.0+gcc9.2.0+bnu2.33.1+gdb8.2.1+djcvs) unstable; urgency=medium + + * Initial Release. + + -- jwt27 Thu, 13 Feb 2020 02:40:22 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..b4de3947 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +11 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..726af891 --- /dev/null +++ b/debian/control @@ -0,0 +1,117 @@ +Source: djgpp-toolchain +Section: devel +Priority: optional +Maintainer: jwt27 +Build-Depends: + git, + bash, + make, + unzip, + wget, + bison, + flex, + texinfo, + patch, + tar, + xz-utils, + bzip2, + gzip, + dos2unix, + zlib1g-dev, + nasm, + libslang2-dev, + pkg-config, + debhelper (>= 11) +Standards-Version: 4.1.2 +Homepage: https://github.com/jwt27/build-gcc + +Package: djgpp-dev +Architecture: all +Depends: ${misc:Depends} +Recommends: binutils-djgpp, gcc-djgpp, djgpp-utils +Suggests: djgpp-dev-doc +Provides: libc-djgpp-dev (= ${binary:Version}) +Conflicts: libc-djgpp-dev +Description: DJGPP development kit -- libraries + +Package: djgpp-utils +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: binutils-djgpp, gcc-djgpp, djgpp-dev +Description: DJGPP development kit -- utilities + Various utilities used to develop djgpp applications: + * djasm + * dxegen + * dxe3gen + * dxe3res + * exe2coff + * setenv + * stubedit + * stubify + +Package: djgpp-dev-doc +Architecture: all +Depends: ${misc:Depends} +Suggests: djgpp-dev +Description: DJGPP development kit -- documentation + +Package: gcc-djgpp +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, + djgpp-utils, + binutils-djgpp (>= 2.35.2) +Recommends: djgpp-dev +Suggests: gcc-djgpp-doc +Provides: + gcc-i386-pc-msdosdjgpp (= ${binary:Version}), + g++-i386-pc-msdosdjgpp (= ${binary:Version}), + g++-djgpp (= ${binary:Version}), + libstdc++-djgpp-dev (= ${binary:Version}) +Conflicts: + gcc-i386-pc-msdosdjgpp, + g++-i386-pc-msdosdjgpp, + g++-djgpp, + libstdc++-djgpp-dev +Description: GNU Compiler Collection + Cross-compiler targeting djgpp. This package contains both gcc, g++, and + libstdc++. + If you need compiler support for other languages, please let me know. + +Package: gcc-djgpp-doc +Architecture: all +Depends: ${misc:Depends} +Suggests: gcc-djgpp +Description: GNU Compiler Collection -- documentation + +Package: binutils-djgpp +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: djgpp-utils +Suggests: binutils-djgpp-doc +Description: GNU Binutils + Linker, assembler and other binary utilities targeting djgpp. + +Package: binutils-djgpp-doc +Architecture: all +Depends: ${misc:Depends} +Suggests: binutils-djgpp +Description: GNU Binutils -- documentation + +Package: gdb-djgpp +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: gdb-djgpp-doc +Description: GNU Debugger + Used to debug djgpp programs over a serial connection. + +Package: gdb-djgpp-doc +Architecture: all +Depends: ${misc:Depends} +Suggests: gdb-djgpp +Description: GNU Debugger -- documentation + +Package: libwatt-djgpp-dev +Architecture: all +Depends: ${misc:Depends} +Recommends: djgpp-dev, gcc-djgpp +Description: Watt-32 TCP socket library for DJGPP diff --git a/debian/djgpp-dev-doc.install b/debian/djgpp-dev-doc.install new file mode 100644 index 00000000..41e03f79 --- /dev/null +++ b/debian/djgpp-dev-doc.install @@ -0,0 +1,3 @@ +usr/i386-pc-msdosdjgpp/share/info/libm.info +usr/i386-pc-msdosdjgpp/share/info/libc.info +usr/i386-pc-msdosdjgpp/share/info/kb.info diff --git a/debian/djgpp-dev.copyright b/debian/djgpp-dev.copyright new file mode 100644 index 00000000..ffbbf511 --- /dev/null +++ b/debian/djgpp-dev.copyright @@ -0,0 +1,893 @@ +This is the file "copying.dj". It does NOT apply to any sources or +binaries copyrighted by UCB Berkeley, the Free Software Foundation, or +any other agency besides DJ Delorie and others who have agreed to +allow their sources to be distributed under these terms. + + Copyright Information for sources and executables that are marked + Copyright (C) DJ Delorie + 334 North Rd + Deerfield NH 03037-1110 + +This document is Copyright (C) DJ Delorie and may be distributed +verbatim, but changing it is not allowed. + +Source code copyright DJ Delorie is distributed under the terms of the +GNU General Public Licence, with the following exceptions: + +* Sources used to build crt0.o, gcrt0.o, libc.a, libdbg.a, and + libemu.a are distributed under the terms of the GNU Library General + Public License, rather than the GNU GPL. + +* Any existing copyright or authorship information in any given source + file must remain intact. If you modify a source file, a notice to that + effect must be added to the authorship information in the source file. + +* Runtime binaries, as provided by DJ in DJGPP, may be distributed + without sources ONLY if the recipient is given sufficient information + to obtain a copy of djgpp themselves. This primarily applies to + go32-v2.exe, emu387.dxe, and stubedit.exe. + +* Runtime objects and libraries, as provided by DJ in DJGPP, when + linked into an application, may be distributed without sources ONLY + if the recipient is given sufficient information to obtain a copy of + djgpp themselves. This primarily applies to crt0.o and libc.a. + +----- + +Changes to source code copyright BSD, FSF, or others, by DJ Delorie +fall under the terms of the original copyright. Such files usually +have multiple copyright notices in them. + +A copy of the files "COPYING" and "COPYING.LIB" are included with this +document. If you did not receive a copy of these files, you may +obtain one from whence this document was obtained, or by writing: + + Free Software Foundation + 51 Franklin Street, Fifth Floor + Boston, MA 02110-1301 + USA + +----------------------------------------------------------------------------- + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. + +----------------------------------------------------------------------------- + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/debian/djgpp-dev.install b/debian/djgpp-dev.install new file mode 100644 index 00000000..61c801a0 --- /dev/null +++ b/debian/djgpp-dev.install @@ -0,0 +1,11 @@ +usr/i*86-pc-msdosdjgpp/lib/libg.a +usr/i*86-pc-msdosdjgpp/lib/libm.a +usr/i*86-pc-msdosdjgpp/lib/libemu.a +usr/i*86-pc-msdosdjgpp/lib/libpc.a +usr/i*86-pc-msdosdjgpp/lib/crt0.o +usr/i*86-pc-msdosdjgpp/lib/djgpp.djl +usr/i*86-pc-msdosdjgpp/lib/gcrt0.o +usr/i*86-pc-msdosdjgpp/lib/libc.a +usr/i*86-pc-msdosdjgpp/lib/libdbg.a +usr/i*86-pc-msdosdjgpp/lib/libtz.a +usr/i*86-pc-msdosdjgpp/sys-include/* diff --git a/debian/djgpp-utils.install b/debian/djgpp-utils.install new file mode 100644 index 00000000..1936b72e --- /dev/null +++ b/debian/djgpp-utils.install @@ -0,0 +1,17 @@ +usr/i*86-pc-msdosdjgpp/lib/dxe.ld +usr/i*86-pc-msdosdjgpp/bin/stubedit +usr/i*86-pc-msdosdjgpp/bin/dxe3gen +usr/i*86-pc-msdosdjgpp/bin/dxe3res +usr/i*86-pc-msdosdjgpp/bin/djasm +usr/i*86-pc-msdosdjgpp/bin/stubify +usr/i*86-pc-msdosdjgpp/bin/dxegen +usr/i*86-pc-msdosdjgpp/bin/exe2coff +usr/bin/i*86-pc-msdosdjgpp-djasm +usr/bin/i*86-pc-msdosdjgpp-dxe3gen +usr/bin/i*86-pc-msdosdjgpp-exe2coff +usr/bin/i*86-pc-msdosdjgpp-stubify +usr/bin/i*86-pc-msdosdjgpp-dxegen +usr/bin/i*86-pc-msdosdjgpp-stubedit +usr/bin/i*86-pc-msdosdjgpp-dxe3res +usr/bin/i*86-pc-msdosdjgpp-setenv +usr/bin/i*86-pc-msdosdjgpp-pkg-config diff --git a/debian/gcc-djgpp-doc.install b/debian/gcc-djgpp-doc.install new file mode 100644 index 00000000..fb93c7d5 --- /dev/null +++ b/debian/gcc-djgpp-doc.install @@ -0,0 +1,9 @@ +usr/i386-pc-msdosdjgpp/share/info/libquadmath.info +usr/i386-pc-msdosdjgpp/share/info/gccint.info +usr/i386-pc-msdosdjgpp/share/info/gcc.info +usr/i386-pc-msdosdjgpp/share/info/cpp.info +usr/i386-pc-msdosdjgpp/share/info/cppinternals.info +usr/i386-pc-msdosdjgpp/share/info/gccinstall.info +usr/i386-pc-msdosdjgpp/share/man/man7/fsf-funding.7 +usr/i386-pc-msdosdjgpp/share/man/man7/gpl.7 +usr/i386-pc-msdosdjgpp/share/man/man7/gfdl.7 diff --git a/debian/gcc-djgpp.copyright b/debian/gcc-djgpp.copyright new file mode 100644 index 00000000..b2baa64b --- /dev/null +++ b/debian/gcc-djgpp.copyright @@ -0,0 +1,1623 @@ +COPYRIGHT STATEMENTS AND LICENSING TERMS + + +GCC is Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, +1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 +Free Software Foundation, Inc. + +GCC 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 3, or (at your option) any later +version. + +GCC 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. + +Files that have exception clauses are licensed under the terms of the +GNU General Public License; either version 3, or (at your option) any +later version. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License is in `/usr/share/common-licenses/GPL', version 3 of this +license in `/usr/share/common-licenses/GPL-3'. + +The following runtime libraries are licensed under the terms of the +GNU General Public License (v3 or later) with version 3.1 of the GCC +Runtime Library Exception (included in this file): + + - libgcc (libgcc/, gcc/libgcc2.[ch], gcc/unwind*, gcc/gthr*, + gcc/coretypes.h, gcc/crtstuff.c, gcc/defaults.h, gcc/dwarf2.h, + gcc/emults.c, gcc/gbl-ctors.h, gcc/gcov-io.h, gcc/libgcov.c, + gcc/tsystem.h, gcc/typeclass.h). + - libatomic + - libdecnumber + - libgomp + - libitm + - libssp + - libstdc++-v3 + - libobjc + - libgfortran + - The libgnat-9 Ada support library and libgnatvsn library. + - Various config files in gcc/config/ used in runtime libraries. + - libvtv + +The libbacktrace library is licensed under the following terms: + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + (1) Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + (2) Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + (3) The name of the author may not be used to + endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +The libsanitizer libraries (libasan, liblsan, libtsan, libubsan) are +licensed under the following terms: + +Copyright (c) 2009-2014 by the LLVM contributors. + +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +The libffi library is licensed under the following terms: + + libffi - Copyright (c) 1996-2003 Red Hat, Inc. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + +The documentation is licensed under the GNU Free Documentation License (v1.2). +On Debian GNU/Linux systems, the complete text of this license is in +`/usr/share/common-licenses/GFDL-1.2'. + + +GCC RUNTIME LIBRARY EXCEPTION + +Version 3.1, 31 March 2009 + +Copyright (C) 2009 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +This GCC Runtime Library Exception ("Exception") is an additional +permission under section 7 of the GNU General Public License, version +3 ("GPLv3"). It applies to a given file (the "Runtime Library") that +bears a notice placed by the copyright holder of the file stating that +the file is governed by GPLv3 along with this Exception. + +When you use GCC to compile a program, GCC may combine portions of +certain GCC header files and runtime libraries with the compiled +program. The purpose of this Exception is to allow compilation of +non-GPL (including proprietary) programs to use, in this way, the +header files and runtime libraries covered by this Exception. + +0. Definitions. + +A file is an "Independent Module" if it either requires the Runtime +Library for execution after a Compilation Process, or makes use of an +interface provided by the Runtime Library, but is not otherwise based +on the Runtime Library. + +"GCC" means a version of the GNU Compiler Collection, with or without +modifications, governed by version 3 (or a specified later version) of +the GNU General Public License (GPL) with the option of using any +subsequent versions published by the FSF. + +"GPL-compatible Software" is software whose conditions of propagation, +modification and use would permit combination with GCC in accord with +the license of GCC. + +"Target Code" refers to output from any compiler for a real or virtual +target processor architecture, in executable form or suitable for +input to an assembler, loader, linker and/or execution +phase. Notwithstanding that, Target Code does not include data in any +format that is used as a compiler intermediate representation, or used +for producing a compiler intermediate representation. + +The "Compilation Process" transforms code entirely represented in +non-intermediate languages designed for human-written code, and/or in +Java Virtual Machine byte code, into Target Code. Thus, for example, +use of source code generators and preprocessors need not be considered +part of the Compilation Process, since the Compilation Process can be +understood as starting with the output of the generators or +preprocessors. + +A Compilation Process is "Eligible" if it is done using GCC, alone or +with other GPL-compatible software, or if it is done without using any +work based on GCC. For example, using non-GPL-compatible Software to +optimize any GCC intermediate representations would not qualify as an +Eligible Compilation Process. + +1. Grant of Additional Permission. + +You have permission to propagate a work of Target Code formed by +combining the Runtime Library with Independent Modules, even if such +propagation would otherwise violate the terms of GPLv3, provided that +all Target Code was generated by Eligible Compilation Processes. You +may then convey such a combination under terms of your choice, +consistent with the licensing of the Independent Modules. + +2. No Weakening of GCC Copyleft. + +The availability of this Exception does not imply any general +presumption that third-party software is unaffected by the copyleft +requirements of the license of GCC. + + +libquadmath/*.[hc]: + + Copyright (C) 2010 Free Software Foundation, Inc. + Written by Francois-Xavier Coudert + Written by Tobias Burnus + +This file is part of the libiberty library. +Libiberty is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +Libiberty 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 +Library General Public License for more details. + +libquadmath/math: + +atanq.c, expm1q.c, j0q.c, j1q.c, log1pq.c, logq.c: + Copyright 2001 by Stephen L. Moshier + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + +coshq.c, erfq.c, jnq.c, lgammaq.c, powq.c, roundq.c: + Changes for 128-bit __float128 are + Copyright (C) 2001 Stephen L. Moshier + and are incorporated herein by permission of the author. The author + reserves the right to distribute this material elsewhere under different + copying permissions. These modifications are distributed here under + the following terms: + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + +ldexpq.c: + * Conversion to long double by Ulrich Drepper, + * Cygnus Support, drepper@cygnus.com. + +cosq_kernel.c, expq.c, sincos_table.c, sincosq.c, sincosq_kernel.c, +sinq_kernel.c, truncq.c: + Copyright (C) 1997, 1999 Free Software Foundation, Inc. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library 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 + Lesser General Public License for more details. + +isinfq.c: + * Written by J.T. Conklin . + * Change for long double by Jakub Jelinek + * Public domain. + +llroundq.c, lroundq.c, tgammaq.c: + Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997 and + Jakub Jelinek , 1999. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library 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 + Lesser General Public License for more details. + +log10q.c: + Cephes Math Library Release 2.2: January, 1991 + Copyright 1984, 1991 by Stephen L. Moshier + Adapted for glibc November, 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + +remaining files: + + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + + +gcc/go/gofrontend, libgo: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +D: +gdc-9 GNU D Compiler +libphobos-9-dev D standard runtime library + +The D source package is made up of the following components. + +The D front-end for GCC: + - d/* + +Copyright (C) 2004-2007 David Friedman +Modified by Vincenzo Ampolo, Michael Parrot, Iain Buclaw, (C) 2009, 2010 + +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. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License is in `/usr/share/common-licenses/GPL', version 2 of this +license in `/usr/share/common-licenses/GPL-2'. + + +The DMD Compiler implementation of the D programming language: + - d/dmd/* + +Copyright (c) 1999-2010 by Digital Mars +All Rights Reserved +written by Walter Bright +http://www.digitalmars.com +License for redistribution is by either the Artistic License or +the GNU General Public License (v1). + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License is in `/usr/share/common-licenses/GPL', the Artistic +license in `/usr/share/common-licenses/Artistic'. + + +The Zlib data compression library: + - d/phobos/etc/c/zlib/* + + (C) 1995-2004 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + +The Phobos standard runtime library: + - d/phobos/* + +Unless otherwise marked within the file, each file in the source +is under the following licenses: + +Copyright (C) 2004-2005 by Digital Mars, www.digitalmars.com +Written by Walter Bright + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, in both source and binary form, subject to the following +restrictions: + + o The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + o Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + o This notice may not be removed or altered from any source + distribution. + +By plainly marking modifications, something along the lines of adding to each +file that has been changed a "Modified by Foo Bar" line +underneath the "Written by" line would be adequate. + +The libhsail-rt library is licensed under the following terms: + + Copyright (C) 2015-2017 Free Software Foundation, Inc. + Contributed by Pekka Jaaskelainen + for General Processor Tech. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + USE OR OTHER DEALINGS IN THE SOFTWARE. + +libhsail-rt/rt/fp16.c is licensed under the following terms: + + Copyright (C) 2008-2017 Free Software Foundation, Inc. + Contributed by CodeSourcery. + + This file 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 3, or (at your option) any + later version. + + This file 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. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . + +gcc/gm2: +Copyright (C) 2007-2019 Free Software Foundation, Inc. +Contributed by Gaius Mulley . + +This file is part of GNU Modula-2. + +GNU Modula-2 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 3, or (at your option) +any later version. + +GNU Modula-2 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. + +gcc/gm2/**/*.texi: +Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +2011, 2012, 2012, 2013 Free Software Foundation, Inc. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + +gcc/gm2/gm2-coroutines: +Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Free Software Foundation, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library 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 +Lesser General Public License for more details. + +gcc/gm2/ulm-lib-gm2: +Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Free Software Foundation, Inc. + +GNU Modula-2 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 3, or (at your option) any later +version. + +This file was originally part of the University of Ulm library + +Ulm's Modula-2 Library +Copyright (C) 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, +1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +by University of Ulm, SAI, D-89069 Ulm, Germany + +gcc/gm2/ulm-lib-gm2/std/M2RTS.mod: +gcc/gm2/ulm-lib-gm2/std/Storage.mod: +gcc/gm2/ulm-lib-gm2/std/RTExceptions.mod: + +Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library 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 +Lesser General Public License for more details. + +gcc/gm2/gm2-libs: +Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +Free Software Foundation, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library 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 +Lesser General Public License for more details. + +./gm2-libs/cbuiltin.def: +./gm2-libs/MathLib0.def: +./gm2-libs/SYSTEM.def: +./gm2-libs/sckt.def: +./gm2-libs/Indexing.def: +./gm2-libs/Builtins.mod: +./gm2-libs/SFIO.mod: +./gm2-libs/MathLib0.mod: +./gm2-libs/gdbif.mod: +./gm2-libs/M2EXCEPTION.mod: +./gm2-libs/SFIO.def: +./gm2-libs/StringConvert.mod: +./gm2-libs/StringConvert.def: +./gm2-libs/config-host.in: +./gm2-libs/Indexing.mod: +./gm2-libs/errno.def: + +Copyright (C) 2001-2019 Free Software Foundation, Inc. +Contributed by Gaius Mulley . + +GNU Modula-2 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 3, or (at your option) +any later version. + +GNU Modula-2 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. + +./gm2-libs/M2EXCEPTION.def: +Library module defined by the International Standard +Information technology - programming languages +BS ISO/IEC 10514-1:1996E Part 1: Modula-2, Base Language. + +Copyright ISO/IEC (International Organization for Standardization +and International Electrotechnical Commission) 1996, 1997, 1998, +1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + +gcc/gm2/gm2-libiberty/: +Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Free Software Foundation, Inc. + +GNU Modula-2 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 3, or (at your option) any later +version. + +GNU Modula-2 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. + +gcc/gm2/gm2-libs-iso/: +This has a mix of licenses, both LGPL-2.1 and GPL-3.0, plus the apparently +unmodified definition modules from ISO/IEC. + +gcc/gm2/gm2-libs-iso/*.def: + +Library module defined by the International Standard +Information technology - programming languages +BS ISO/IEC 10514-1:1996E Part 1: Modula-2, Base Language. + +Copyright ISO/IEC (International Organization for Standardization +and International Electrotechnical Commission) 1996, 1997, 1998, +1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + +gcc/gm2/gm2-libs-iso/*.def: + +Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. + +gcc/gm2/gm2-libs-iso/*.def: +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library 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 +Lesser General Public License for more details. + +gcc/gm2/gm2-libs-iso/*.mod: + +Copyright (C) 2012 Free Software Foundation, Inc. + +GNU Modula-2 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 3, or (at your option) any later +version. + +GNU Modula-2 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. + +gcc/gm2/gm2-libs-iso/*.mod: + +Copyright (C) 2009, 2010 Free Software Foundation, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library 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 +Lesser General Public License for more details. + +gcc/gm2/gm2-libs-min/*: +Copyright (C) 2001-2019 Free Software Foundation, Inc. +mix of GPL-3.0 and LGPL-3.0 + +gcc/gm2/gm2-libs-pim/*: +Copyright (C) 2001-2019 Free Software Foundation, Inc. +mix of GPL-3.0 and LGPL-2.1/3 + +gcc/gm2/gm2-libs-ch/*: +Copyright (C) 2001-2019 Free Software Foundation, Inc. +mix of GPL-3.0 and LGPL-2.1/3 + +gcc/gm2/examples: +Copyright (C) 2005-2015 Free Software Foundation, Inc. +Mix of LGPL-2.1 and GPL-3.0. + +gcc/gm2/images: +GPL-3+ + +gcc/gm2/el/gm2-mode.el: +;; Everyone is granted permission to copy, modify and redistribute +;; GNU Emacs, but only under the conditions described in the +;; GNU Emacs General Public License. A copy of this license is +;; supposed to have been given to you along with GNU Emacs so you +;; can know your rights and responsibilities. It should be in a +;; file named COPYING. Among other things, the copyright notice +;; and this notice must be preserved on all copies. + +gcc/gm2/mc-boot/: +Copyright (C) 2001-2018 Free Software Foundation, Inc. +Contributed by Gaius Mulley . +Mix of GPL-3 and LGPL-2.1. + +gcc/testsuite/gm2/: +Copyright (C) 2001-2019 Free Software Foundation, Inc. +Mix of GPL-2+ and GPL-3+ + +libgm2: + +libgm2/libiso/: +Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library 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 +Lesser General Public License for more details. + +libgm2/libpim/: +Copyright (C) 2005-2014 Free Software Foundation, Inc. +Mix of LGPL-2.1, LGPL-3 and GPL-3. + +libgm2/liblog/: +Copyright (C) 2005-2018 Free Software Foundation, Inc. +Mix of LGPL-2.1 and LGPL-3. + +libgm2/libpth/: +Copyright: (C) 1999-2006 Ralf S. Engelschall +License: LGPL-2.1+ + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + . + This library 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 + Library General Public License for more details. + +libgm2/libulm/: +Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Free Software Foundation, Inc. + +GNU Modula-2 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 3, or (at your option) any later +version. + +GNU Modula-2 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. + +libgm2/libcor/: +Copyright (C) 2005-2019 Free Software Foundation, Inc. +Contributed by Gaius Mulley . + +GNU Modula-2 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 3, or (at your option) +any later version. + +GNU Modula-2 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. + +libgm2/libmin/: +Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc. + +GNU Modula-2 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 3, or (at your option) any later +version. + +GNU Modula-2 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. + +libgm2/p2c/: +Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Free Software Foundation, Inc. + +GNU Modula-2 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 3, or (at your option) +any later version. + +GNU Modula-2 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. + +newlib-X.Y.Z/: + +Upstream Authors: +newlib@sources.redhat.com +Jeff Johnston +Tom Fitzsimmons + +The newlib subdirectory is a collection of software from several sources. +Each file may have its own copyright/license that is embedded in the source +file. + +This list documents those licenses which are more restrictive than +a BSD-like license or require the copyright notice +to be duplicated in documentation and/or other materials associated with +the distribution. Certain licenses documented here only apply to +specific targets. Certain clauses only apply if you are building the +code as part of your binary. + +Note that this list may omit certain licenses that +only pertain to the copying/modifying of the individual source code. +If you are distributing the source code, then you do not need to +worry about these omitted licenses, so long as you do not modify the +copyright information already in place. + +Parts of this work are licensed under the terms of the GNU General +Public License. On Debian systems, the complete text of this license +can be found in /usr/share/common-licenses/GPL. + +Parts of this work are licensed under the terms of the GNU Library +General Public License. On Debian systems, the complete text of this +license be found in /usr/share/common-licenses/LGPL. + +(1) University of California, Berkeley + +[1a] + +Copyright (c) 1990 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms are permitted +provided that the above copyright notice and this paragraph are +duplicated in all such forms and that any documentation, +and other materials related to such distribution and use +acknowledge that the software was developed +by the University of California, Berkeley. The name of the +University may not be used to endorse or promote products derived +from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +[1b] + +Copyright (c) 1990 The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms are permitted +provided that the above copyright notice and this paragraph are +duplicated in all such forms and that any documentation, +advertising materials, and other materials related to such +distribution and use acknowledge that the software was developed +by the University of California, Berkeley. The name of the +University may not be used to endorse or promote products derived +from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +[1c] + +Copyright (c) 1981, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 +The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by the University of + California, Berkeley and its contributors. +4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +[1d] + +Copyright (c) 1988, 1990, 1993 Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +[1e] + +Copyright (c) 1982, 1986, 1989, 1991, 1993, 1994 +The Regents of the University of California. All rights reserved. +(c) UNIX System Laboratories, Inc. +All or some portions of this file are derived from material licensed +to the University of California by American Telephone and Telegraph +Co. or Unix System Laboratories, Inc. and are reproduced herein with +the permission of UNIX System Laboratories, Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by the University of + California, Berkeley and its contributors. +4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +[1f] + +Copyright (c) 1987, 1988, 2000 Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms are permitted +provided that: (1) source distributions retain this entire copyright +notice and comment, and (2) distributions including binaries display +the following acknowledgement: ``This product includes software +developed by the University of California, Berkeley and its contributors'' +in the documentation or other materials provided with the distribution +and in all advertising materials mentioning features or use of this +software. Neither the name of the University nor the names of its +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +------------------------------------------------------------- + Please note that in some of the above alternate licenses, there is a + statement regarding that acknowledgement must be made in any + advertising materials for products using the code. This restriction + no longer applies due to the following license change: + + ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change + + In some cases the defunct clause has been removed in modified newlib code and + in some cases, the clause has been left as-is. +------------------------------------------------------------- + +(2) Cygwin (cygwin targets only) + +Copyright 2001 Red Hat, Inc. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. + +(3) David M. Gay at AT&T + +The author of this software is David M. Gay. + +Copyright (c) 1991 by AT&T. + +Permission to use, copy, modify, and distribute this software for any +purpose without fee is hereby granted, provided that this entire notice +is included in all copies of any software which is or includes a copy +or modification of this software and in all copies of the supporting +documentation for such software. + +THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED +WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY +REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY +OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + +(4) Advanced Micro Devices + +Copyright 1989, 1990 Advanced Micro Devices, Inc. + +This software is the property of Advanced Micro Devices, Inc (AMD) which +specifically grants the user the right to modify, use and distribute this +software provided this notice is not removed or altered. All other rights +are reserved by AMD. + +AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS +SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL +DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR +USE OF THIS SOFTWARE. + +So that all may benefit from your experience, please report any problems +or suggestions about this software to the 29K Technical Support Center at +800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or +0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118. + +Advanced Micro Devices, Inc. +29K Support Products +Mail Stop 573 +5900 E. Ben White Blvd. +Austin, TX 78741 +800-292-9263 + +(5) C.W. Sandmann + +Copyright (C) 1993 C.W. Sandmann + +This file may be freely distributed as long as the author's name remains. + +(6) Eric Backus + +(C) Copyright 1992 Eric Backus + +This software may be used freely so long as this copyright notice is +left intact. There is no warrantee on this software. + +(7) Sun Microsystems + +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + +(8) Hewlett Packard + +(c) Copyright 1986 HEWLETT-PACKARD COMPANY + +To anyone who acknowledges that this file is provided "AS IS" +without any express or implied warranty: + permission to use, copy, modify, and distribute this file +for any purpose is hereby granted without fee, provided that +the above copyright notice and this notice appears in all +copies, and that the name of Hewlett-Packard Company not be +used in advertising or publicity pertaining to distribution +of the software without specific, written prior permission. +Hewlett-Packard Company makes no representations about the +suitability of this software for any purpose. + +(9) Hans-Peter Nilsson + +Copyright (C) 2001 Hans-Peter Nilsson + +Permission to use, copy, modify, and distribute this software is +freely granted, provided that the above copyright notice, this notice +and the following disclaimer are preserved with no changes. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. + +(10) Stephane Carrez (m68hc11-elf/m68hc12-elf targets only) + +Copyright (C) 1999, 2000, 2001, 2002 Stephane Carrez (stcarrez@nerim.fr) + +The authors hereby grant permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, provided +that existing copyright notices are retained in all copies and that this +notice is included verbatim in any distributions. No written agreement, +license, or royalty fee is required for any of the authorized uses. +Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file where +they apply. + +(11) Christopher G. Demetriou + +Copyright (c) 2001 Christopher G. Demetriou +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +(12) SuperH, Inc. + +Copyright 2002 SuperH, Inc. All rights reserved + +This software is the property of SuperH, Inc (SuperH) which specifically +grants the user the right to modify, use and distribute this software +provided this notice is not removed or altered. All other rights are +reserved by SuperH. + +SUPERH MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO +THIS SOFTWARE. IN NO EVENT SHALL SUPERH BE LIABLE FOR INDIRECT, SPECIAL, +INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH OR ARISING FROM +THE FURNISHING, PERFORMANCE, OR USE OF THIS SOFTWARE. + +So that all may benefit from your experience, please report any problems +or suggestions about this software to the SuperH Support Center via +e-mail at softwaresupport@superh.com . + +SuperH, Inc. +405 River Oaks Parkway +San Jose +CA 95134 +USA + +(13) Royal Institute of Technology + +Copyright (c) 1999 Kungliga Tekniska Hgskolan +(Royal Institute of Technology, Stockholm, Sweden). +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of KTH nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +(14) Alexey Zelkin + +Copyright (c) 2000, 2001 Alexey Zelkin +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +(15) Andrey A. Chernov + +Copyright (C) 1997 by Andrey A. Chernov, Moscow, Russia. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +(16) FreeBSD + +Copyright (c) 1997-2002 FreeBSD Project. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +(17) S. L. Moshier + +Author: S. L. Moshier. + +Copyright (c) 1984,2000 S.L. Moshier + +Permission to use, copy, modify, and distribute this software for any +purpose without fee is hereby granted, provided that this entire notice +is included in all copies of any software which is or includes a copy +or modification of this software and in all copies of the supporting +documentation for such software. + +THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED +WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION +OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS +SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + +(18) Citrus Project + +Copyright (c)1999 Citrus Project, +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +(19) Todd C. Miller + +Copyright (c) 1998 Todd C. Miller +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +(20) DJ Delorie (i386) + +Copyright (C) 1991 DJ Delorie +All rights reserved. + +Redistribution and use in source and binary forms is permitted +provided that the above copyright notice and following paragraph are +duplicated in all such forms. + +This file is distributed WITHOUT ANY WARRANTY; without even the implied +warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +(21) Free Software Foundation LGPL License (*-linux* targets only) + + Copyright (C) 1990-1999, 2000, 2001 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Mark Kettenis , 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA + +(22) Xavier Leroy LGPL License (i[3456]86-*-linux* targets only) + +Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU Library 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 Library General Public License for more details. + +(23) Intel (i960) + +Copyright (c) 1993 Intel Corporation + +Intel hereby grants you permission to copy, modify, and distribute this +software and its documentation. Intel grants this permission provided +that the above copyright notice appears in all copies and that both the +copyright notice and this permission notice appear in supporting +documentation. In addition, Intel grants this permission provided that +you prominently mark as "not part of the original" any modifications +made to this software or documentation, and that the name of Intel +Corporation not be used in advertising or publicity pertaining to +distribution of the software or the documentation without specific, +written prior permission. + +Intel Corporation provides this AS IS, WITHOUT ANY WARRANTY, EXPRESS OR +IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY +OR FITNESS FOR A PARTICULAR PURPOSE. Intel makes no guarantee or +representations regarding the use of, or the results of the use of, +the software and documentation in terms of correctness, accuracy, +reliability, currentness, or otherwise; and you rely on the software, +documentation and results solely at your own risk. + +IN NO EVENT SHALL INTEL BE LIABLE FOR ANY LOSS OF USE, LOSS OF BUSINESS, +LOSS OF PROFITS, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES +OF ANY KIND. IN NO EVENT SHALL INTEL'S TOTAL LIABILITY EXCEED THE SUM +PAID TO INTEL FOR THE PRODUCT LICENSED HEREUNDER. + +(24) Hewlett-Packard (hppa targets only) + +(c) Copyright 1986 HEWLETT-PACKARD COMPANY + +To anyone who acknowledges that this file is provided "AS IS" +without any express or implied warranty: + permission to use, copy, modify, and distribute this file +for any purpose is hereby granted without fee, provided that +the above copyright notice and this notice appears in all +copies, and that the name of Hewlett-Packard Company not be +used in advertising or publicity pertaining to distribution +of the software without specific, written prior permission. +Hewlett-Packard Company makes no representations about the +suitability of this software for any purpose. + +(25) Henry Spencer (only *-linux targets) + +Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved. +This software is not subject to any license of the American Telephone +and Telegraph Company or of the Regents of the University of California. + +Permission is granted to anyone to use this software for any purpose on +any computer system, and to alter it and redistribute it, subject +to the following restrictions: + +1. The author is not responsible for the consequences of use of this + software, no matter how awful, even if they arise from flaws in it. + +2. The origin of this software must not be misrepresented, either by + explicit claim or by omission. Since few users ever read sources, + credits must appear in the documentation. + +3. Altered versions must be plainly marked as such, and must not be + misrepresented as being the original software. Since few users + ever read sources, credits must appear in the documentation. + +4. This notice may not be removed or altered. + +(26) Mike Barcroft + +Copyright (c) 2001 Mike Barcroft +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +(27) Konstantin Chuguev (--enable-newlib-iconv) + +Copyright (c) 1999, 2000 + Konstantin Chuguev. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + iconv (Charset Conversion Library) v2.0 + +(27) Artem Bityuckiy (--enable-newlib-iconv) + +Copyright (c) 2003, Artem B. Bityuckiy, SoftMine Corporation. +Rights transferred to Franklin Electronic Publishers. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +(28) Red Hat Incorporated + +Unless otherwise stated in each remaining newlib file, the remaining +files in the newlib subdirectory default to the following copyright. +It should be noted that Red Hat Incorporated now owns copyrights +belonging to Cygnus Solutions and Cygnus Support. + +Copyright (c) 1994, 1997, 2001, 2002, 2003, 2004 Red Hat Incorporated. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + The name of Red Hat Incorporated may not be used to endorse + or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL RED HAT INCORPORATED BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/debian/gcc-djgpp.install b/debian/gcc-djgpp.install new file mode 100644 index 00000000..5aec057c --- /dev/null +++ b/debian/gcc-djgpp.install @@ -0,0 +1,29 @@ +usr/lib/gcc/i*86-pc-msdosdjgpp/* +usr/i*86-pc-msdosdjgpp/bin/g++ +usr/i*86-pc-msdosdjgpp/bin/gcc-nm +usr/i*86-pc-msdosdjgpp/bin/c++ +usr/i*86-pc-msdosdjgpp/bin/cpp +usr/i*86-pc-msdosdjgpp/bin/gcc +usr/i*86-pc-msdosdjgpp/bin/gcc-*.*.* +usr/i*86-pc-msdosdjgpp/bin/gcov-tool +usr/i*86-pc-msdosdjgpp/bin/gcc-ranlib +usr/i*86-pc-msdosdjgpp/bin/gcc-ar +usr/i*86-pc-msdosdjgpp/bin/g++-*.*.* +usr/i*86-pc-msdosdjgpp/bin/gcov-dump +usr/i*86-pc-msdosdjgpp/bin/gcov +usr/bin/i*86-pc-msdosdjgpp-g++ +usr/bin/i*86-pc-msdosdjgpp-gcc-nm +usr/bin/i*86-pc-msdosdjgpp-c++ +usr/bin/i*86-pc-msdosdjgpp-cpp +usr/bin/i*86-pc-msdosdjgpp-gcc +usr/bin/i*86-pc-msdosdjgpp-gcc-*.*.* +usr/bin/i*86-pc-msdosdjgpp-gcov-tool +usr/bin/i*86-pc-msdosdjgpp-gcc-ranlib +usr/bin/i*86-pc-msdosdjgpp-gcc-ar +usr/bin/i*86-pc-msdosdjgpp-g++-*.*.* +usr/bin/i*86-pc-msdosdjgpp-gcov-dump +usr/bin/i*86-pc-msdosdjgpp-gcov +usr/i386-pc-msdosdjgpp/share/gcc-*/python/libstdcxx/v6/printers.py +usr/i386-pc-msdosdjgpp/share/gcc-*/python/libstdcxx/v6/__init__.py +usr/i386-pc-msdosdjgpp/share/gcc-*/python/libstdcxx/v6/xmethods.py +usr/i386-pc-msdosdjgpp/share/gcc-*/python/libstdcxx/__init__.py diff --git a/debian/gcc-djgpp.manpages b/debian/gcc-djgpp.manpages new file mode 100644 index 00000000..f78d75a5 --- /dev/null +++ b/debian/gcc-djgpp.manpages @@ -0,0 +1,6 @@ +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gcov-dump.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-cpp.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gcov.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-g++.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gcov-tool.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gcc.1 diff --git a/debian/gdb-djgpp-doc.install b/debian/gdb-djgpp-doc.install new file mode 100644 index 00000000..40619ae7 --- /dev/null +++ b/debian/gdb-djgpp-doc.install @@ -0,0 +1,3 @@ +usr/i386-pc-msdosdjgpp/share/info/annotate.info +usr/i386-pc-msdosdjgpp/share/info/gdb.info +usr/i386-pc-msdosdjgpp/share/info/stabs.info diff --git a/debian/gdb-djgpp.install b/debian/gdb-djgpp.install new file mode 100644 index 00000000..b8c921a4 --- /dev/null +++ b/debian/gdb-djgpp.install @@ -0,0 +1,21 @@ +usr/i*86-pc-msdosdjgpp/bin/gdb +usr/bin/i*86-pc-msdosdjgpp-gdb +usr/bin/i*86-pc-msdosdjgpp-gdb-add-index +usr/i*86-pc-msdosdjgpp/etc/build-gcc/gdb-version +usr/i386-pc-msdosdjgpp/share/gdb/system-gdbinit/elinos.py +usr/i386-pc-msdosdjgpp/share/gdb/system-gdbinit/wrs-linux.py +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/aarch64-linux.xml +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/s390-linux.xml +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/mips-n32-linux.xml +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/sparc64-linux.xml +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/s390x-linux.xml +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/ppc64-linux.xml +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/arm-linux.xml +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/amd64-linux.xml +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/mips-n64-linux.xml +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/freebsd.xml +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/i386-linux.xml +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/ppc-linux.xml +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/sparc-linux.xml +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/mips-o32-linux.xml +usr/i386-pc-msdosdjgpp/share/gdb/syscalls/gdb-syscalls.dtd diff --git a/debian/gdb-djgpp.manpages b/debian/gdb-djgpp.manpages new file mode 100644 index 00000000..d7d18104 --- /dev/null +++ b/debian/gdb-djgpp.manpages @@ -0,0 +1,4 @@ +usr/i386-pc-msdosdjgpp/share/man/man5/i386-pc-msdosdjgpp-gdbinit.5 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gdbserver.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gdb.1 +usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gdb-add-index.1 diff --git a/debian/libwatt-djgpp-dev.install b/debian/libwatt-djgpp-dev.install new file mode 100644 index 00000000..1561f1ea --- /dev/null +++ b/debian/libwatt-djgpp-dev.install @@ -0,0 +1,3 @@ +usr/i*86-pc-msdosdjgpp/watt/* +usr/i*86-pc-msdosdjgpp/lib/libwatt.a +usr/i*86-pc-msdosdjgpp/lib/libsocket.a diff --git a/debian/pgp-secret.asc b/debian/pgp-secret.asc new file mode 100644 index 00000000..b8921290 --- /dev/null +++ b/debian/pgp-secret.asc @@ -0,0 +1,98 @@ +-----BEGIN PGP MESSAGE----- + +jA0ECQMC9U4w6T6btxDH0uwBAz22e3Wdz5Cuqnkzqd+bfRRqgIv9Y10BAJBszWAy +nLNiUkxHiPz4K7r1Fd3IyIwT+fABqOfjbf06351ftHRr4SE4rxdM87sNVwGnkWyT +uUx3/FMnYTmeMmvDtP0BpvdxmTW7a2Rvu/HBgauFHqD16lnwerA8jgWLHdlgORyr +oUItL3iex2mr+epg+xugrLFw8QaQNQQNOsKt+40V4+eDOw95yVfl7WS8hAQ+nUqx +kgoqhCW8/CsIepZJMKa1y3FrRVqcFmZLJvbmiWmzFb9onBteHXAmXd8RXqh6N6f2 +chHkuyL2uEnlmAkl85ojfiQfj+zorbXGmsVaVTJseKQElNNeretpLeJx/44uZCME +hgWujojfz0BHJAHj/hSoeRL9hSUFUf/DPZfKNKjVNgQCo+/6VjvOQ5qAievmpTGV +K9ageAgzeJvSxOM/6RChLI8x2NASrDhTPnT+m7cczv7shoLKpem1xRwZZy/m3Ii+ +eGC6+jyg3jfKsjPupVsu2kSx06uSLUqk9GFo+UqR4W91ySP5tvV4L5m7dgkVoeUC +ANS8+ostbAdgrGEXKTWx0UMjO5gkB8GINibloAxm7JZKiVW8b2HDXNO73OiQAzcc +Jg/VHYajkNWWSxQy1biRlhI21+T/Tnls6tp+3i5r+8SnXiU7wOnG/K9Ilw8HiR/I +VNmQ3VJTvUijK2ui979YeXLQgDofhtP6byYDgZ92QnC68V4Tghx8ru42pEmiOB9a +mwNGTQ1RpS4XPwgHTTjzaYqZWt6rklvVhBlIJS6tG6HsACnKSWJjSa2PmRQkQgt3 +qrPkaVCau/nrzlA9BxaJycTHoyR4zu9dwtoKN6ykl8aOZAg43BxuEqCf3xvxrNdt +N0jHN0DsrRn5UOPqFXOSJiZEDZ/48KlPLJFoXkgqRgI385SZaYgZRVt5cQ6JOaeo +CUy2+qXPWS4lI7CheLhbjWUIdQo0bGaSzyAqHH0h5WwQ5Iu4KxmjZxA+DR702v3J +HMjEIqCUD/CPh5Tf35KFFlHqo5pTpa8x3Tmbt2UMB7wD5xDzL4QN5K4J0R6Kk0Oi +mkEMfal9WehYFdP7vBlVhyUCG1RwN4apjbni+K9xeEZz0sywAmlRGYnmSgSVO5oG +gzWh8gY3KOE50+BhosWbL2/dbPgWxEgrPDuIVRwWwLt1KdqMH++FP/a6C0g+EjCN +/TSvpStOy1y3eR5rAR2rREup0Aqes9UbAWeohXZxxghyH72kNPX63U1+7rvlseUU +hPOXBcP7l4FdDuRMRwj0xYFDcNiX1lU71TGxPjW7cplADm1L17dPkPiPinvgCMgb +K/QL7vaU6FxmXu/E7Eo7lK7yjcU+bJLkJiAFxWyARKHE1a4fC5FjXcMgmJFXT47m +hvEs47UlDwhSdszdrrCts9AfezGmKrWNcHfHhLVYs/moMMlmduZmYKMWLT6qqoHM +ta79vbTubULM0wVYcGJPCss9471RIes9n/wShA5ufQWQyWUaCjM04VuyPVsORCMi +oqcRmIz8ULVpYN0RXJ0qh30m7CrhUmziHKoGEzu2BeUWFSN3qkkAwHuDyUn5EXR6 +8le5EB/RAP4A3Sw1OF2jClsrW1a4L7r1Dy/s2cOFw339GhyP4WCkUzwc+7M1tL5L +be3zBRSpBtqBSwzMnu9HHVcT+QT1SWQmRhjbiw7/yqX7m3ZCsWMyVp39G+4o0hAa +KUdRUSSsEe+n0Hkx60tHfh7Y2W5MTgV6BAoDiyl6iPsZD7ooc8K5wlK76dl+lWdD +uGYp3imHAI/PsmLPtw6T0Ex59xNiTuuhzmjAodsMAGbR4np5vEbhueg8/O8h7AS2 +KTVcX1WQwAI2YSavJj0dFMzEtLksOAVXz4wiushbqRXdp7f5ojeEXjEhsZb3fTMk +m4EBndpAxVJ6tB0/SczknpGCicxHfnVMOj9UrOfYToXJ1eD0/QaerIeFoFq1geIY +Z0DRI2vvTXBA8DlpmNxqSYn6U2N9s8U6PPTglnRi/gZJQTT8ZVEhKE8CSXk4MxJs +tt65ey70A7y6WEvO5RUFCdFbE2tWgITg8cfD3v9YVzjUI6G2t89tK9dLhskhYVzR +LxnCyi+bh2vkdnQCyvLf67LZnzhTRuuYAeE6bkLKBYkBXK5kQFkOud3ts9oLrQnP +i3mzEUFK7LkaiLgt4/I1sl6xAkwkh/2AYRogKYqMV4gwcV2CV8MEcYjT8Qq8bIKm +s1E3kAuqM13bMPZq2VayXoFDgPHu94YV3H2CXDYukf8Sy90n+mDcZTkNy1GpEoxi +y4ley0BzKJBgV6sDDca7y6Tb/keJiDFLLt0cBLOSh2R0+w7Hk1hVLmM0KtD6LLMx +wp9XscbjkkUylorYILBag0R6vYaFdtCMaw2Ra8yq1HDzLTx1h1Xwa4sbrYvh5Uxe +Ti5tO4xWGFltJ8PzIdHGXV3GiynuvIw/1pfqZibPB5y5XQwBznQLCJtVYRgvv5Sq +4xMY3BeisEB7FFAb2ryK1orb4QdEC4S4uhvcgEVxcZZpAyyuUkjchTtZKU6wzgho +uZJ4fdHxPcGgg4ygV1NOOFrfv7yLroIxq6JhQ6Ahno71VBgRxvXXpeJ6jcqKbWO/ +UikgWapMG+ZEW/cr2p2ejZ2088KecKmc7uO+B4ZrM5SijK/6BJ7cHgz5rXveZZ1o +2unKFVK+/0JbXRU/QcIf0gV75S46LB6kEubkQ1iT2NoSM9VWrTnxCutcw3wiQlvc +k8cjx4CSTaoO/Yq4hi1DsQLAoXtbAZYTRMOKLjnLqlv+Xst56oQvdSXNR5KC2xth +P0Hxx3pok+aite8RF5aiaGf16lqrAqYjmRdod3UrjlE/i+WyvM73/96hohMpBHVI +N6uCd6id3b29DTtHQLeBWJ2dfCSCRXMAubhPkOaCXysW2576wqaGMShxKIcJs68j +/mAizU6IhDwtHnHr6oP4G9xuKhXYeWb16Y0LI+Ob0EzyDipXKpeYiUAWqrUrlN7t +O1cWi+F9X/K5iS+2F8ZFIFF3+PgW+KUPniim8XwFPuAJz7jB1GdrUSkqftpYUbah +sFzI71d4wQsQXdd5nWfPXNGziuXjKafjtTzkThTjgDxK3EAFyvNR4Ad/5RFE+jMR +JDIA9AMVa28mmoa9OJnXpDO/5IeUNz2d4jTeGbLnaXT7PZT2mb7ZGIzVUZs+xkmP +oq3cujscdzAQk7ep5qqVlueDoa2/dwTwPDDnclJaOFf8tB+5QBLUPINfF+wbQamD +tAOgs6DDiucV5jGRS+ZQ1l3N/bd4RcQ8IJ3XoOZXdPfYW1I7tyYhUpM7YWpGp7SU +qEEWLRNyj1Cy+4sGNoyVFWx0qQ27rs1Jb9ab/4zVfuc+SdizlvbdoA4dYZuD/TwY +k8viTtq5gTMDOUBFvVnNfmbBJEIGXIVGwfJu0eXACaTbRCbzqSYFqxlPNoqyihif +xH89Tgc7BxLQwbwfYl3VBSD7bY2tQV6rDAloh9ubFADgeIC5Mvb9gCV8SeF/1kap +fIRBE57kyyRMsIqOQueSx10FU97rEDurj72oHwMyZLrqGhoutL5AOZEmNvTnYeR3 +3tyQrzH9eZjXkIJ61OYBJ729+XBhvZoCQCnPKLuBXa81WBjTzjJzStnj9TFm6Jo3 +mTp8mCriKwnOYagmi0H6pYjlFhvJJsom0KewyznoveeQN56JOOySeCJTPZ4yy4I6 +NuXsF2TSpVJ3cLwvguuiJShmIE3m3GmipWPFKgYi4uGbB8ArZKCm6uXY9/6PFcMm +ElZQ3o8YAUAHuwj0ZmQBHC83QyB/aKo9pZbPqqXbkZcmAL5SDOQU0b1XrvLuhlGO +cdZmWM6GeSnLBp2bEJ7tOSnoVggp0fq5l8EZ3QrZ5aLOs2zaKxy7tDHzrbtDAgmz +U67WMWXeZY2YZfVLyqPfEEavIrLlenit0uz9ajSllSPGjEL0fVbGqZBCbXZAa9rr +DSAZ5NO+QeIVLaFivcyVhbb9ydSYMfRXIdmzjRCjzTTIXZRlEGEAkd2rjL+bnLDk +fF+vq3rWVgcZ9QDhZjWMTeIJBKNOAf8WJx2AbxCRTDQEysNeH4343SkclvmE6/X9 +ndmgjkx2dpll7fryIggUCQMvOm7RVYEGW0q3hudo0afVMkOXR58Q08q1N44iHW/v +/pNsyJyYqBfpPOhGQewehXS0FFtoAp0ryO01FiFtPfvRlGvm8hQEOb4zZ/pNCXoO +eLRv6vdcMvMT9OD7YQCocKcMUaDDCD9Ay1uHDmtYb+TpdRm08M6kQZyqMVa8PPPq +MOp2oSQ5m9/CC1T9Je+yftRwtpi3cI8BLnIBi1djy989WPiL5JDVUR7Re6YPI7cf +eYGYgl7ESIUuXggsyugZhk0Cj7VFWMtu8aJBiJdZwY9FzYN3oEVc37NOPAx+MJIM +zjlzznq7uBOu0Tag7YDjjkCmLbvX+RpFDUyT64c9BRzSqgAuEgPjYL2/7mk8RVgp +paMI15zt6nH8TSei2JRKj2ZgF+ABpGvDuI/ssLJ3TP+oYvIxp9QzofJRWY2KQndN +hyITDc0cd/kyA5IGzXc9azkeVg1ISOTBV78k45JzvWKdHJrkD2cjFq1Kbmt+dBam +5MKlTNaG5ckz15PRI2VBhJvTEsiqCvk2mXW4kCuxJOcmub3dcnnHnvJO2xJlMOOt +x1/sMQElsYHUvrlgpyjn7h42QnY6ZFfZh2FxO/d+Lzbk0h4GfMmPvx6DnmktJHzY +LSL6vH4JX0vhnMIG/oEkA7oQtoSUvK6Tl94asqjUB9h4fcpwZRw5Cbcqm9EtmR8a +knOGEa5bJsSMQkkmRSPzsdqhkRgs+i1YT+T8zViR/TV0arAWdtjIBI2nKV+t0peR +i/HfBTFkynX1O0twH28l+5Xcr7GwxkpqTG0EPKmBVuwD/oN2nKGC2D0owJADovTS +U/1/54SiIKo7OYX1LqQtwx2K7HGdsMvbicnwo++SQO0qpMb1CCGCB1flUgz31qgX +5+KlhW3fVUv430XlbQo58hzdYlXPR9YZGrugg+ogimpBgV16130iPlEI1OzDbCvE +tccDJ6UYQCTlvWyiCrDv+912WufJGvfzhYPdRLclg158I3mRyQT++lPQTj+ORCsV +YzbBTC1H6wYBcpo/H/gcTNVdeVbBLwN4nv3WT2lHGyBLJ4mmz+rK2Vpx5xBUDdG/ +ASzHztv2H9TL5EgddRCbN612JgNq+dI9cvwtIP7BoXoGbKLzwj/zF4FT+Hax/LFR +iV2fQxUa5NmOqv0QPYpqu+76WSdflRza94EJ03Sxvks/qwn+xJlKUmEn9wzuD2MH +WtaXXcHEyurTkc8GxnCGkTu7jUI1ahNskkmzWfMS3tGhnt0tDaT18BUKV53/wPW2 +cnIvc+XDMk8I9FEGiWiktH8LDKHG2c+5Hz3F3qZnzTcNyb34tl0AN1aexHKIPzju +H901BNW4MInOi3e04dFzefR1ntfW3qZ2tdpvH4iRQseQwLx1Hc/HaZ20KH2a3IiY +GVbghBT6wGGMbEzIq4gr/vvz5HJvzo3RTrHJe1lDajBCxVensdRtOMDD0aB18p0C ++7Y+Sy3WdLBpJd5lRDvh3LsErP2P2S04Ev0msXUukJ8xzxigNptzKRIZ+xvdU3Z2 +rfAklyyT8rbLG/oVb8g8oNo6Arc4mzQnX2jCAYwwBMSzkHoUwDmAm6mMccHrbudQ +Sz3gDun9EiFYP4pJs7srIAO9onDIN/r+J7s4I+mEER8gFcovui4VxzjSAZ4VBcpH +PfMBfUsUiy3KGgPpNSOKphxsJB4jmyyxEgLnWSwqfaqICMkToQEyDGND/N+sxfrf +qt6IrQOH+fDOmDqKUdbhe9l2dUegHcWmH7Pa4NkY58TFa+EWpy29MRKr4dVSVhY0 +21pBGX0VoXrf/KOHPwRrvPLp/Qckabduyzzf91uHNTBal8pAeYTW96Wf/O6rVWRG +a9X0KYsFkEMyoygezAo2nSK3jORQpbfh4zQufB06BQ== +=3fzz +-----END PGP MESSAGE----- diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..3432f82a --- /dev/null +++ b/debian/rules @@ -0,0 +1,63 @@ +#!/usr/bin/make -f + +DPKG_EXPORT_BUILDFLAGS := 1 +include /usr/share/dpkg/default.mk + +SHELL := /bin/bash + +PACKAGES := djgpp-cvs binutils gcc gdb watt32 + +git_date = $(shell date --date='$(shell cd $(1) && git log -1 --format=%cI)' -u +%4Y%m%d.%H%M) + +GCC_VERSION = $(shell source ./djgpp/gcc && echo $$GCC_VERSION) +BINUTILS_VERSION = $(shell source ./djgpp/binutils && echo $$BINUTILS_VERSION) +GDB_VERSION = $(shell source ./djgpp/gdb && echo $$GDB_VERSION) +DJGPP_VERSION = 2.05.cvs.$(call git_date, download/djgpp-cvs) +WATT32_VERSION = 2.2.11.git.$(call git_date, download/Watt-32) + +%: + dh $@ + +override_dh_gencontrol: + dh_gencontrol + dh_gencontrol -pdjgpp-utils -- -v$(DJGPP_VERSION)+$(DEB_VERSION) + dh_gencontrol -pdjgpp-dev -- -v$(DJGPP_VERSION)+$(DEB_VERSION) + dh_gencontrol -pdjgpp-dev-doc -- -v$(DJGPP_VERSION)+$(DEB_VERSION) + dh_gencontrol -pgcc-djgpp -- -v$(GCC_VERSION)+$(DEB_VERSION) + dh_gencontrol -pgcc-djgpp-doc -- -v$(GCC_VERSION)+$(DEB_VERSION) + dh_gencontrol -pbinutils-djgpp -- -v$(BINUTILS_VERSION)+$(DEB_VERSION) + dh_gencontrol -pbinutils-djgpp-doc -- -v$(BINUTILS_VERSION)+$(DEB_VERSION) + dh_gencontrol -pgdb-djgpp -- -v$(GDB_VERSION)+$(DEB_VERSION) + dh_gencontrol -pgdb-djgpp-doc -- -v$(GDB_VERSION)+$(DEB_VERSION) + dh_gencontrol -plibwatt-djgpp-dev -- -v$(WATT32_VERSION)+$(DEB_VERSION) + +override_dh_strip: + dh_strip --exclude=.a + +override_dh_auto_clean: + cp LICENSE debian/copyright + cp LICENSE debian/binutils-djgpp.copyright + cp LICENSE debian/gdb-djgpp.copyright + cp debian/djgpp-dev.copyright debian/djgpp-utils.copyright + cp debian/djgpp-dev.copyright debian/djgpp-dev-doc.copyright + cp debian/gcc-djgpp.copyright debian/gcc-djgpp-doc.copyright + cp debian/binutils-djgpp.copyright debian/binutils-djgpp-doc.copyright + cp debian/gdb-djgpp.copyright debian/gdb-djgpp-doc.copyright + ./build-djgpp.sh --batch --build-deb --only-download $(PACKAGES) + -rm -rf build/ install/ debian/pgp-secret.asc + +override_dh_auto_configure: + +override_dh_auto_build: + GLOBAL_CONFIGURE_OPTIONS='--datarootdir=/usr/i386-pc-msdosdjgpp/share --libexecdir=/usr/lib' \ + CFLAGS="$(CFLAGS) -Wno-error=format-security" \ + CXXFLAGS="$(CXXFLAGS) -Wno-error=format-security" \ + CFLAGS_FOR_TARGET='-O2 -g -ffunction-sections -fdata-sections -mtune=pentium' \ + CXXFLAGS_FOR_TARGET='-O2 -g -ffunction-sections -fdata-sections -mtune=pentium' \ + ./build-djgpp.sh --batch --build-deb --no-download --prefix=/usr --destdir=$(CURDIR)/install $(PACKAGES) + +override_dh_auto_install: + sed -i 's#in /#in #' install/usr/bin/i386-pc-msdosdjgpp-link-i586 + cd install/ && ./usr/bin/i386-pc-msdosdjgpp-link-i586 + mkdir -p debian/tmp + mv -f install/* debian/tmp/ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..89ae9db8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/djgpp/all b/djgpp/all new file mode 100644 index 00000000..75142442 --- /dev/null +++ b/djgpp/all @@ -0,0 +1,3 @@ +source djgpp/default +source djgpp/gdb +source djgpp/watt32 diff --git a/djgpp/binutils b/djgpp/binutils new file mode 100644 index 00000000..aecc1378 --- /dev/null +++ b/djgpp/binutils @@ -0,0 +1 @@ +source binutils/binutils diff --git a/djgpp/binutils-2.29.1 b/djgpp/binutils-2.29.1 new file mode 100644 index 00000000..142fecd8 --- /dev/null +++ b/djgpp/binutils-2.29.1 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2291 +BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" diff --git a/djgpp/binutils-2.30 b/djgpp/binutils-2.30 new file mode 100644 index 00000000..ccf21501 --- /dev/null +++ b/djgpp/binutils-2.30 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=230 +BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" diff --git a/djgpp/binutils-2.31.1 b/djgpp/binutils-2.31.1 new file mode 100644 index 00000000..71e5b3a1 --- /dev/null +++ b/djgpp/binutils-2.31.1 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2311 +BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" diff --git a/djgpp/binutils-2.32 b/djgpp/binutils-2.32 new file mode 100644 index 00000000..e81abd7e --- /dev/null +++ b/djgpp/binutils-2.32 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=232 +BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" diff --git a/djgpp/binutils-2.33.1 b/djgpp/binutils-2.33.1 new file mode 100644 index 00000000..d2d87ff3 --- /dev/null +++ b/djgpp/binutils-2.33.1 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=2331 +BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" diff --git a/djgpp/binutils-2.34 b/djgpp/binutils-2.34 new file mode 100644 index 00000000..1f7cc8c5 --- /dev/null +++ b/djgpp/binutils-2.34 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=234 +BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2gnu/bnu${BINUTILS_VERSION}s.zip" diff --git a/djgpp/djgpp b/djgpp/djgpp new file mode 100644 index 00000000..ffe2eeec --- /dev/null +++ b/djgpp/djgpp @@ -0,0 +1 @@ +source djgpp/djgpp-cvs diff --git a/djgpp/djgpp-2.05 b/djgpp/djgpp-2.05 new file mode 100644 index 00000000..e55a0e97 --- /dev/null +++ b/djgpp/djgpp-2.05 @@ -0,0 +1,5 @@ +DJGPP_VERSION=205 + +DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJGPP_VERSION}.zip" +DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJGPP_VERSION}.zip" +DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJGPP_VERSION}.zip" diff --git a/djgpp/djgpp-cvs b/djgpp/djgpp-cvs new file mode 100644 index 00000000..02ad5be2 --- /dev/null +++ b/djgpp/djgpp-cvs @@ -0,0 +1,2 @@ +DJGPP_VERSION=cvs +DJGPP_GIT="https://github.com/jwt27/djgpp-cvs.git::jwt27" diff --git a/djgpp/gcc b/djgpp/gcc new file mode 100644 index 00000000..8a633721 --- /dev/null +++ b/djgpp/gcc @@ -0,0 +1 @@ +source common/gcc diff --git a/djgpp/gdb b/djgpp/gdb new file mode 100644 index 00000000..fb4697b0 --- /dev/null +++ b/djgpp/gdb @@ -0,0 +1,2 @@ +source common/gdb-8.2.1 + diff --git a/djgpp/minimal b/djgpp/minimal new file mode 100644 index 00000000..1d25f1e5 --- /dev/null +++ b/djgpp/minimal @@ -0,0 +1,3 @@ +source djgpp/djgpp +source djgpp/binutils +source djgpp/gcc diff --git a/djgpp/watt32 b/djgpp/watt32 new file mode 100644 index 00000000..8ea7d6d1 --- /dev/null +++ b/djgpp/watt32 @@ -0,0 +1 @@ +source djgpp/watt32-git diff --git a/djgpp/watt32-git b/djgpp/watt32-git new file mode 100644 index 00000000..634a50fe --- /dev/null +++ b/djgpp/watt32-git @@ -0,0 +1,2 @@ +WATT32_VERSION=git +WATT32_GIT='https://github.com/gvanem/Watt-32.git::master' diff --git a/hello-cpp.cpp b/hello-cpp.cpp deleted file mode 100644 index cce843c5..00000000 --- a/hello-cpp.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include -using namespace std; -int main() -{ - printf("Hello world from C.\n"); - cout << "Hello world from C++." << endl; -} diff --git a/hello.c b/hello.c deleted file mode 100644 index e4344f80..00000000 --- a/hello.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -int main() -{ - printf("Hello world from C.\n"); -} diff --git a/ia16/all b/ia16/all new file mode 100644 index 00000000..aa0a34d4 --- /dev/null +++ b/ia16/all @@ -0,0 +1 @@ +source ia16/minimal diff --git a/ia16/binutils b/ia16/binutils new file mode 100644 index 00000000..a87142f7 --- /dev/null +++ b/ia16/binutils @@ -0,0 +1 @@ +source ia16/binutils-ia16 diff --git a/ia16/binutils-ia16 b/ia16/binutils-ia16 new file mode 100644 index 00000000..f2426a72 --- /dev/null +++ b/ia16/binutils-ia16 @@ -0,0 +1,2 @@ +BINUTILS_VERSION=ia16 +BINUTILS_GIT="https://github.com/tkchia/binutils-ia16.git::binutils-ia16-tkchia" diff --git a/ia16/gcc b/ia16/gcc new file mode 100644 index 00000000..cdd6de60 --- /dev/null +++ b/ia16/gcc @@ -0,0 +1,9 @@ +GCC_VERSION="ia16" +ISL_VERSION=0.15 + +GCC_GIT="https://github.com/tkchia/gcc-ia16.git::gcc-6_3_0-ia16-tkchia" + +GCC_CONFIGURE_OPTIONS="--disable-plugin + --enable-lto + --disable-libstdcxx-dual-abi + ${GCC_CONFIGURE_OPTIONS}" diff --git a/ia16/minimal b/ia16/minimal new file mode 100644 index 00000000..a8a7da8c --- /dev/null +++ b/ia16/minimal @@ -0,0 +1,3 @@ +source ia16/binutils +source ia16/gcc +source ia16/newlib diff --git a/ia16/newlib b/ia16/newlib new file mode 100644 index 00000000..429aafb7 --- /dev/null +++ b/ia16/newlib @@ -0,0 +1,2 @@ +NEWLIB_VERSION="ia16" +NEWLIB_GIT="https://github.com/tkchia/newlib-ia16.git::newlib-2_4_0-ia16-tkchia" diff --git a/newlib/all b/newlib/all new file mode 100644 index 00000000..7d45f419 --- /dev/null +++ b/newlib/all @@ -0,0 +1,2 @@ +source newlib/minimal +source common/gdb diff --git a/newlib/minimal b/newlib/minimal new file mode 100644 index 00000000..064af8fd --- /dev/null +++ b/newlib/minimal @@ -0,0 +1,3 @@ +source newlib/newlib +source binutils/binutils +source common/gcc diff --git a/newlib/newlib b/newlib/newlib new file mode 100644 index 00000000..075a9d8c --- /dev/null +++ b/newlib/newlib @@ -0,0 +1 @@ +source newlib/newlib-4.3.0.20230120 diff --git a/newlib/newlib-3.0.0 b/newlib/newlib-3.0.0 new file mode 100644 index 00000000..b854c386 --- /dev/null +++ b/newlib/newlib-3.0.0 @@ -0,0 +1,2 @@ +NEWLIB_VERSION=3.0.0 +NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" diff --git a/newlib/newlib-3.0.0.20180226 b/newlib/newlib-3.0.0.20180226 new file mode 100644 index 00000000..d842c125 --- /dev/null +++ b/newlib/newlib-3.0.0.20180226 @@ -0,0 +1,2 @@ +NEWLIB_VERSION=3.0.0.20180226 +NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" diff --git a/newlib/newlib-3.0.0.20180720 b/newlib/newlib-3.0.0.20180720 new file mode 100644 index 00000000..45d2b6d2 --- /dev/null +++ b/newlib/newlib-3.0.0.20180720 @@ -0,0 +1,2 @@ +NEWLIB_VERSION=3.0.0.20180720 +NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" diff --git a/newlib/newlib-3.0.0.20180802 b/newlib/newlib-3.0.0.20180802 new file mode 100644 index 00000000..d9ee829b --- /dev/null +++ b/newlib/newlib-3.0.0.20180802 @@ -0,0 +1,2 @@ +NEWLIB_VERSION=3.0.0.20180802 +NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" diff --git a/newlib/newlib-3.1.0 b/newlib/newlib-3.1.0 new file mode 100644 index 00000000..dbf34e19 --- /dev/null +++ b/newlib/newlib-3.1.0 @@ -0,0 +1,2 @@ +NEWLIB_VERSION=3.1.0 +NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" diff --git a/newlib/newlib-3.2.0 b/newlib/newlib-3.2.0 new file mode 100644 index 00000000..0980d041 --- /dev/null +++ b/newlib/newlib-3.2.0 @@ -0,0 +1,2 @@ +NEWLIB_VERSION=3.2.0 +NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" diff --git a/newlib/newlib-3.3.0 b/newlib/newlib-3.3.0 new file mode 100644 index 00000000..5903d7d9 --- /dev/null +++ b/newlib/newlib-3.3.0 @@ -0,0 +1,2 @@ +NEWLIB_VERSION=3.3.0 +NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" diff --git a/newlib/newlib-4.0.0 b/newlib/newlib-4.0.0 new file mode 100644 index 00000000..6e8f9239 --- /dev/null +++ b/newlib/newlib-4.0.0 @@ -0,0 +1,2 @@ +NEWLIB_VERSION=4.0.0 +NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" diff --git a/newlib/newlib-4.1.0 b/newlib/newlib-4.1.0 new file mode 100644 index 00000000..35a9c27f --- /dev/null +++ b/newlib/newlib-4.1.0 @@ -0,0 +1,2 @@ +NEWLIB_VERSION=4.1.0 +NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" diff --git a/newlib/newlib-4.2.0.20211231 b/newlib/newlib-4.2.0.20211231 new file mode 100644 index 00000000..da0c556a --- /dev/null +++ b/newlib/newlib-4.2.0.20211231 @@ -0,0 +1,2 @@ +NEWLIB_VERSION=4.2.0.20211231 +NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" diff --git a/newlib/newlib-4.3.0.20230120 b/newlib/newlib-4.3.0.20230120 new file mode 100644 index 00000000..d7e3b069 --- /dev/null +++ b/newlib/newlib-4.3.0.20230120 @@ -0,0 +1,2 @@ +NEWLIB_VERSION=4.3.0.20230120 +NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" diff --git a/patch/binutils-2.39/go32stub.patch b/patch/binutils-2.39/go32stub.patch new file mode 100644 index 00000000..5a4df0ed --- /dev/null +++ b/patch/binutils-2.39/go32stub.patch @@ -0,0 +1,249 @@ +diff --git a/bfd/go32stub.h b/bfd/go32stub.h +index 333eec068be..55cf60c89ba 100644 +--- a/bfd/go32stub.h ++++ b/bfd/go32stub.h +@@ -1,128 +1,128 @@ + 0x4d,0x5a,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x27,0x00,0xff,0xff,0x00,0x00, +-0x60,0x07,0x00,0x00,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x0a,0x73,0x74, +-0x75,0x62,0x2e,0x68,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x64,0x20,0x66, +-0x72,0x6f,0x6d,0x20,0x73,0x74,0x75,0x62,0x2e,0x61,0x73,0x6d,0x20,0x62,0x79,0x20, +-0x64,0x6a,0x61,0x73,0x6d,0x2c,0x20,0x6f,0x6e,0x20,0x57,0x65,0x64,0x20,0x4a,0x75, +-0x6e,0x20,0x32,0x38,0x20,0x31,0x31,0x3a,0x31,0x35,0x3a,0x30,0x34,0x20,0x32,0x30, +-0x30,0x30,0x0d,0x0a,0x54,0x68,0x65,0x20,0x53,0x54,0x55,0x42,0x2e,0x45,0x58,0x45, +-0x20,0x73,0x74,0x75,0x62,0x20,0x6c,0x6f,0x61,0x64,0x65,0x72,0x20,0x69,0x73,0x20, +-0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x43,0x29,0x20,0x31,0x39, +-0x39,0x33,0x2d,0x31,0x39,0x39,0x35,0x20,0x44,0x4a,0x20,0x44,0x65,0x6c,0x6f,0x72, +-0x69,0x65,0x2e,0x20,0x0d,0x0a,0x50,0x65,0x72,0x6d,0x69,0x73,0x73,0x69,0x6f,0x6e, +-0x20,0x67,0x72,0x61,0x6e,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x75,0x73,0x65,0x20, +-0x66,0x6f,0x72,0x20,0x61,0x6e,0x79,0x20,0x70,0x75,0x72,0x70,0x6f,0x73,0x65,0x20, +-0x70,0x72,0x6f,0x76,0x69,0x64,0x65,0x64,0x20,0x74,0x68,0x69,0x73,0x20,0x63,0x6f, +-0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x0d,0x0a,0x72,0x65,0x6d,0x61,0x69,0x6e, +-0x73,0x20,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x20,0x61,0x6e,0x64,0x20,0x75,0x6e, +-0x6d,0x6f,0x64,0x69,0x66,0x69,0x65,0x64,0x2e,0x20,0x0d,0x0a,0x54,0x68,0x69,0x73, +-0x20,0x6f,0x6e,0x6c,0x79,0x20,0x61,0x70,0x70,0x6c,0x69,0x65,0x73,0x20,0x74,0x6f, +-0x20,0x74,0x68,0x65,0x20,0x73,0x74,0x75,0x62,0x2c,0x20,0x61,0x6e,0x64,0x20,0x6e, +-0x6f,0x74,0x20,0x6e,0x65,0x63,0x65,0x73,0x73,0x61,0x72,0x69,0x6c,0x79,0x20,0x74, +-0x68,0x65,0x20,0x77,0x68,0x6f,0x6c,0x65,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d, +-0x2e,0x0a,0x0d,0x0a,0x24,0x49,0x64,0x3a,0x20,0x73,0x74,0x75,0x62,0x2e,0x61,0x73, +-0x6d,0x20,0x62,0x75,0x69,0x6c,0x74,0x20,0x30,0x36,0x2f,0x32,0x38,0x2f,0x31,0x30, +-0x30,0x20,0x31,0x31,0x3a,0x31,0x35,0x3a,0x30,0x34,0x20,0x62,0x79,0x20,0x64,0x6a, +-0x61,0x73,0x6d,0x20,0x24,0x0a,0x0d,0x0a,0x40,0x28,0x23,0x29,0x20,0x73,0x74,0x75, +-0x62,0x2e,0x61,0x73,0x6d,0x20,0x62,0x75,0x69,0x6c,0x74,0x20,0x30,0x36,0x2f,0x32, +-0x38,0x2f,0x31,0x30,0x30,0x20,0x31,0x31,0x3a,0x31,0x35,0x3a,0x30,0x34,0x20,0x62, +-0x79,0x20,0x64,0x6a,0x61,0x73,0x6d,0x0a,0x0d,0x0a,0x1a,0x00,0x00,0x00,0x00,0x00, ++0x60,0x07,0x00,0x00,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ++0x0d,0x0a,0x73,0x74,0x75,0x62,0x2e,0x68,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74, ++0x65,0x64,0x20,0x66,0x72,0x6f,0x6d,0x20,0x73,0x74,0x75,0x62,0x2e,0x61,0x73,0x6d, ++0x20,0x62,0x79,0x20,0x64,0x6a,0x61,0x73,0x6d,0x2c,0x20,0x6f,0x6e,0x20,0x57,0x65, ++0x64,0x20,0x53,0x65,0x70,0x20,0x32,0x38,0x20,0x31,0x39,0x3a,0x30,0x36,0x3a,0x35, ++0x39,0x20,0x32,0x30,0x32,0x32,0x0d,0x0a,0x54,0x68,0x65,0x20,0x53,0x54,0x55,0x42, ++0x2e,0x45,0x58,0x45,0x20,0x73,0x74,0x75,0x62,0x20,0x6c,0x6f,0x61,0x64,0x65,0x72, ++0x20,0x69,0x73,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x43, ++0x29,0x20,0x31,0x39,0x39,0x33,0x2d,0x31,0x39,0x39,0x35,0x20,0x44,0x4a,0x20,0x44, ++0x65,0x6c,0x6f,0x72,0x69,0x65,0x2e,0x20,0x0d,0x0a,0x50,0x65,0x72,0x6d,0x69,0x73, ++0x73,0x69,0x6f,0x6e,0x20,0x67,0x72,0x61,0x6e,0x74,0x65,0x64,0x20,0x74,0x6f,0x20, ++0x75,0x73,0x65,0x20,0x66,0x6f,0x72,0x20,0x61,0x6e,0x79,0x20,0x70,0x75,0x72,0x70, ++0x6f,0x73,0x65,0x20,0x70,0x72,0x6f,0x76,0x69,0x64,0x65,0x64,0x20,0x74,0x68,0x69, ++0x73,0x20,0x63,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x0d,0x0a,0x72,0x65, ++0x6d,0x61,0x69,0x6e,0x73,0x20,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x20,0x61,0x6e, ++0x64,0x20,0x75,0x6e,0x6d,0x6f,0x64,0x69,0x66,0x69,0x65,0x64,0x2e,0x20,0x0d,0x0a, ++0x54,0x68,0x69,0x73,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x61,0x70,0x70,0x6c,0x69,0x65, ++0x73,0x20,0x74,0x6f,0x20,0x74,0x68,0x65,0x20,0x73,0x74,0x75,0x62,0x2c,0x20,0x61, ++0x6e,0x64,0x20,0x6e,0x6f,0x74,0x20,0x6e,0x65,0x63,0x65,0x73,0x73,0x61,0x72,0x69, ++0x6c,0x79,0x20,0x74,0x68,0x65,0x20,0x77,0x68,0x6f,0x6c,0x65,0x20,0x70,0x72,0x6f, ++0x67,0x72,0x61,0x6d,0x2e,0x0a,0x0d,0x0a,0x24,0x49,0x64,0x3a,0x20,0x73,0x74,0x75, ++0x62,0x2e,0x61,0x73,0x6d,0x20,0x62,0x75,0x69,0x6c,0x74,0x20,0x32,0x30,0x32,0x32, ++0x2d,0x30,0x39,0x2d,0x32,0x38,0x20,0x31,0x39,0x3a,0x30,0x36,0x3a,0x35,0x39,0x20, ++0x62,0x79,0x20,0x64,0x6a,0x61,0x73,0x6d,0x20,0x24,0x0a,0x0d,0x0a,0x40,0x28,0x23, ++0x29,0x20,0x73,0x74,0x75,0x62,0x2e,0x61,0x73,0x6d,0x20,0x62,0x75,0x69,0x6c,0x74, ++0x20,0x32,0x30,0x32,0x32,0x2d,0x30,0x39,0x2d,0x32,0x38,0x20,0x31,0x39,0x3a,0x30, ++0x36,0x3a,0x35,0x39,0x20,0x62,0x79,0x20,0x64,0x6a,0x61,0x73,0x6d,0x0a,0x0d,0x0a, ++0x1a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x67,0x6f,0x33,0x32,0x73,0x74,0x75,0x62,0x2c,0x20,0x76,0x20,0x32,0x2e,0x30,0x32, ++0x67,0x6f,0x33,0x32,0x73,0x74,0x75,0x62,0x2c,0x20,0x76,0x20,0x32,0x2e,0x30,0x35, + 0x54,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x43,0x57,0x53,0x44,0x50,0x4d,0x49,0x2e,0x45,0x58,0x45,0x00, + 0x00,0x00,0x00,0x00,0x0e,0x1f,0x8c,0x1e,0x24,0x00,0x8c,0x06,0x60,0x07,0xfc,0xb4, +-0x30,0xcd,0x21,0x3c,0x03,0x73,0x08,0xb0,0x6d,0xba,0xa7,0x05,0xe9,0xd4,0x03,0xa2, ++0x30,0xcd,0x21,0x3c,0x03,0x73,0x08,0xb0,0x6d,0xba,0xc2,0x05,0xe9,0xe0,0x03,0xa2, + 0x69,0x08,0xbe,0x20,0x00,0x8b,0x04,0x09,0xc0,0x75,0x02,0xb4,0xfe,0xbb,0x70,0x08, + 0x39,0xc3,0x73,0x02,0x89,0xc3,0x89,0x1c,0xfe,0xc7,0xb9,0x04,0xff,0xd3,0xeb,0xb4, + 0x4a,0xcd,0x21,0x73,0x08,0xd3,0xe3,0xfe,0xcf,0x89,0x1c,0xeb,0xd8,0x26,0x8e,0x06, +-0x2c,0x00,0x31,0xff,0x30,0xc0,0xa9,0xf2,0xae,0x26,0x81,0x3d,0x50,0x41,0x75,0x15, +-0xaf,0x26,0x81,0x3d,0x54,0x48,0x75,0x0d,0xaf,0x26,0x80,0x3d,0x3d,0x75,0x06,0x47, +-0x89,0x3e,0x8c,0x04,0x4f,0xae,0x75,0xdf,0xaf,0xb4,0x3e,0xbb,0x13,0x00,0xcd,0x21, +-0xb4,0x3e,0xbb,0x12,0x00,0xcd,0x21,0x06,0x57,0x31,0xc9,0x74,0x12,0xb0,0x6e,0xba, +-0x7e,0x05,0xe9,0x5e,0x03,0x09,0xc9,0x75,0xf4,0x41,0xe8,0xa1,0x03,0x72,0xee,0xb8, +-0x87,0x16,0xcd,0x2f,0x09,0xc0,0x75,0xed,0x80,0xe3,0x01,0x74,0xe8,0x89,0x3e,0x00, +-0x06,0x8c,0x06,0x02,0x06,0x89,0x36,0x04,0x06,0x5f,0x07,0xe8,0xd3,0x02,0x89,0x3e, +-0x2a,0x00,0x89,0x36,0x62,0x07,0x80,0x3e,0x2c,0x00,0x00,0x74,0x23,0xb9,0x08,0x00, +-0xbf,0x2c,0x00,0x8a,0x05,0x47,0x08,0xc0,0x74,0x05,0x88,0x07,0x43,0xe2,0xf4,0x66, +-0xc7,0x07,0x2e,0x45,0x58,0x45,0x83,0xc3,0x04,0xc6,0x07,0x00,0x89,0x1e,0x62,0x07, +-0xb8,0x00,0x3d,0xba,0x64,0x07,0xcd,0x21,0x0f,0x82,0xb3,0x02,0xa3,0x06,0x06,0x89, +-0xc3,0xb9,0x06,0x00,0xba,0xb5,0x07,0xb4,0x3f,0xcd,0x21,0x31,0xd2,0x31,0xc9,0xa1, +-0xb5,0x07,0x3d,0x4c,0x01,0x74,0x1b,0x3d,0x4d,0x5a,0x0f,0x85,0x98,0x02,0x8b,0x16, +-0xb9,0x07,0xc1,0xe2,0x09,0x8b,0x1e,0xb7,0x07,0x09,0xdb,0x74,0x05,0x80,0xee,0x02, +-0x01,0xda,0x89,0x16,0xbb,0x07,0x89,0x0e,0xbd,0x07,0xb8,0x00,0x42,0x8b,0x1e,0x06, +-0x06,0xcd,0x21,0xb9,0xa8,0x00,0xba,0xbf,0x07,0xb4,0x3f,0xcd,0x21,0x3d,0xa8,0x00, +-0x75,0x06,0x81,0x3e,0xbf,0x07,0x4c,0x01,0x0f,0x85,0x61,0x02,0x66,0xa1,0xe3,0x07, +-0x66,0xa3,0x10,0x06,0x66,0x8b,0x0e,0xbb,0x07,0x66,0xa1,0x03,0x08,0x66,0x01,0xc8, +-0x66,0xa3,0x08,0x06,0x66,0xa1,0x2b,0x08,0x66,0x01,0xc8,0x66,0xa3,0x0c,0x06,0x66, +-0x8b,0x1e,0x4b,0x08,0x66,0xa1,0x4f,0x08,0x66,0x01,0xc3,0x66,0xb8,0x01,0x00,0x01, +-0x00,0x66,0x39,0xc3,0x73,0x03,0x66,0x89,0xc3,0x66,0x81,0xc3,0xff,0xff,0x00,0x00, +-0x31,0xdb,0x66,0x89,0x1e,0x1c,0x00,0xe8,0xf5,0x02,0x8b,0x1e,0x04,0x06,0x09,0xdb, +-0x74,0x0a,0xb4,0x48,0xcd,0x21,0x0f,0x82,0x15,0x02,0x8e,0xc0,0xe8,0x08,0x03,0xb8, +-0x01,0x00,0xff,0x1e,0x00,0x06,0x0f,0x82,0x0f,0x02,0x8c,0x06,0x26,0x00,0x8c,0x0e, +-0x28,0x00,0x8c,0xd8,0xa3,0x22,0x00,0x8e,0xc0,0x31,0xc0,0xb9,0x01,0x00,0xcd,0x31, +-0x72,0x07,0xa3,0x14,0x06,0x31,0xc0,0xcd,0x31,0x0f,0x82,0xf3,0x01,0xa3,0x16,0x06, +-0x66,0x8b,0x0e,0x1c,0x00,0xb8,0x01,0x05,0x8b,0x1e,0x1e,0x00,0xcd,0x31,0x0f,0x82, +-0xe5,0x01,0x89,0x1e,0x1a,0x06,0x89,0x0e,0x18,0x06,0x89,0x36,0x1a,0x00,0x89,0x3e, +-0x18,0x00,0xb8,0x07,0x00,0x8b,0x1e,0x14,0x06,0x8b,0x0e,0x1a,0x06,0x8b,0x16,0x18, +-0x06,0xcd,0x31,0xb8,0x09,0x00,0x8c,0xc9,0x83,0xe1,0x03,0xc1,0xe1,0x05,0x51,0x81, +-0xc9,0x9b,0xc0,0xcd,0x31,0xb8,0x08,0x00,0x8b,0x0e,0x1e,0x00,0x49,0xba,0xff,0xff, +-0xcd,0x31,0xb8,0x07,0x00,0x8b,0x1e,0x16,0x06,0x8b,0x0e,0x1a,0x06,0x8b,0x16,0x18, +-0x06,0xcd,0x31,0xb8,0x09,0x00,0x59,0x81,0xc9,0x93,0xc0,0xcd,0x31,0xb8,0x08,0x00, +-0x8b,0x0e,0x1e,0x00,0x49,0xba,0xff,0xff,0xcd,0x31,0xb8,0x00,0x01,0xbb,0x00,0x0f, +-0xcd,0x31,0x73,0x10,0x3d,0x08,0x00,0x0f,0x85,0x73,0x01,0xb8,0x00,0x01,0xcd,0x31, +-0x0f,0x82,0x6a,0x01,0xa3,0x1c,0x06,0x89,0x16,0x1e,0x06,0xc1,0xe3,0x04,0x89,0x1e, +-0x20,0x06,0x66,0x8b,0x36,0x08,0x06,0x66,0x8b,0x3e,0xfb,0x07,0x66,0x8b,0x0e,0xff, +-0x07,0xe8,0x49,0x00,0x66,0x8b,0x36,0x0c,0x06,0x66,0x8b,0x3e,0x23,0x08,0x66,0x8b, +-0x0e,0x27,0x08,0xe8,0x37,0x00,0x8e,0x06,0x16,0x06,0x66,0x8b,0x3e,0x4b,0x08,0x66, +-0x8b,0x0e,0x4f,0x08,0x66,0x31,0xc0,0x66,0xc1,0xe9,0x02,0x67,0xf3,0x66,0xab,0xb4, +-0x3e,0x8b,0x1e,0x06,0x06,0xcd,0x21,0xb8,0x01,0x01,0x8b,0x16,0x1e,0x06,0xcd,0x31, +-0x1e,0x0f,0xa1,0x8e,0x1e,0x16,0x06,0x66,0x64,0xff,0x2e,0x10,0x06,0x66,0x89,0xf0, +-0x66,0x25,0xff,0x01,0x00,0x00,0x66,0x01,0xc1,0x29,0xc6,0x66,0x29,0xc7,0x66,0x89, +-0x0e,0x26,0x06,0x66,0x89,0x3e,0x22,0x06,0xe8,0x0f,0x01,0x89,0x36,0x3e,0x06,0x66, +-0xc1,0xee,0x10,0x89,0x36,0x42,0x06,0x8b,0x1e,0x06,0x06,0x89,0x1e,0x3a,0x06,0xc7, +-0x06,0x46,0x06,0x00,0x42,0xe8,0x03,0x01,0xa1,0x1c,0x06,0xa3,0x4e,0x06,0xc7,0x06, +-0x3e,0x06,0x00,0x00,0xc6,0x06,0x47,0x06,0x3f,0xa1,0x28,0x06,0x09,0xc0,0x75,0x09, +-0xa1,0x26,0x06,0x3b,0x06,0x20,0x06,0x76,0x03,0xa1,0x20,0x06,0xa3,0x42,0x06,0xe8, +-0xd9,0x00,0x66,0x31,0xc9,0x8b,0x0e,0x46,0x06,0x66,0x8b,0x3e,0x22,0x06,0x66,0x01, +-0x0e,0x22,0x06,0x66,0x29,0x0e,0x26,0x06,0x66,0x31,0xf6,0xc1,0xe9,0x02,0x1e,0x06, +-0x8e,0x06,0x16,0x06,0x8e,0x1e,0x1e,0x06,0x67,0xf3,0x66,0xa5,0x07,0x1f,0x66,0x03, +-0x0e,0x26,0x06,0x75,0xaf,0xc3,0x3c,0x3a,0x74,0x06,0x3c,0x2f,0x74,0x02,0x3c,0x5c, +-0xc3,0xbe,0x64,0x07,0x89,0xf3,0x26,0x8a,0x05,0x47,0x88,0x04,0x38,0xe0,0x74,0x0e, +-0x08,0xc0,0x74,0x0a,0x46,0xe8,0xde,0xff,0x75,0xec,0x89,0xf3,0x74,0xe8,0xc3,0xb0, +-0x66,0xba,0x48,0x05,0xeb,0x0c,0xb0,0x67,0xba,0x55,0x05,0xeb,0x05,0xb0,0x68,0xba, +-0x5f,0x05,0x52,0x8b,0x1e,0x62,0x07,0xc6,0x07,0x24,0xbb,0x64,0x07,0xeb,0x28,0xe8, +-0xf5,0x00,0xb0,0x69,0xba,0x99,0x05,0xeb,0x1a,0xb0,0x6a,0xba,0xb2,0x05,0xeb,0x13, +-0xb0,0x6b,0xba,0xc4,0x05,0xeb,0x0c,0xb0,0x6c,0xba,0xd6,0x05,0xeb,0x05,0xb0,0x69, +-0xba,0x99,0x05,0x52,0xbb,0x3b,0x05,0xe8,0x15,0x00,0x5b,0xe8,0x11,0x00,0xbb,0x67, +-0x04,0xe8,0x0b,0x00,0xb4,0x4c,0xcd,0x21,0x43,0x50,0xb4,0x02,0xcd,0x21,0x58,0x8a, +-0x17,0x80,0xfa,0x24,0x75,0xf2,0xc3,0x0d,0x0a,0x24,0x50,0x51,0x57,0x31,0xc0,0xbf, +-0x2a,0x06,0xb9,0x19,0x00,0xf3,0xab,0x5f,0x59,0x58,0xc3,0xb8,0x00,0x03,0xbb,0x21, +-0x00,0x31,0xc9,0x66,0xbf,0x2a,0x06,0x00,0x00,0xcd,0x31,0xc3,0x00,0x00,0x30,0xe4, +-0xe8,0x4e,0xff,0x89,0xde,0x8b,0x3e,0x8c,0x04,0xeb,0x17,0xb4,0x3b,0xe8,0x41,0xff, +-0x81,0xfe,0x64,0x07,0x74,0x12,0x8a,0x44,0xff,0xe8,0x2a,0xff,0x74,0x04,0xc6,0x04, +-0x5c,0x46,0xe8,0x03,0x00,0x72,0xe4,0xc3,0xe8,0x34,0x00,0xbb,0x44,0x00,0x8a,0x07, +-0x88,0x04,0x43,0x46,0x08,0xc0,0x75,0xf6,0x06,0x57,0x1e,0x07,0xe8,0x9b,0xff,0xbb, +-0x2a,0x06,0x8c,0x5f,0x04,0x89,0x5f,0x02,0xba,0x64,0x07,0xb8,0x00,0x4b,0xcd,0x21, +-0x5f,0x07,0x72,0x09,0xb4,0x4d,0xcd,0x21,0x2d,0x00,0x03,0xf7,0xd8,0xeb,0x28,0x80, +-0x3e,0x69,0x08,0x05,0x72,0x20,0xb8,0x00,0x58,0xcd,0x21,0xa2,0x67,0x08,0xb8,0x02, +-0x58,0xcd,0x21,0xa2,0x68,0x08,0xb8,0x01,0x58,0xbb,0x80,0x00,0xcd,0x21,0xb8,0x03, +-0x58,0xbb,0x01,0x00,0xcd,0x21,0xc3,0x9c,0x80,0x3e,0x69,0x08,0x05,0x72,0x1a,0x50, +-0x53,0xb8,0x03,0x58,0x8a,0x1e,0x68,0x08,0x30,0xff,0xcd,0x21,0xb8,0x01,0x58,0x8a, +-0x1e,0x67,0x08,0x30,0xff,0xcd,0x21,0x5b,0x58,0x9d,0xc3,0x4c,0x6f,0x61,0x64,0x20, +-0x65,0x72,0x72,0x6f,0x72,0x3a,0x20,0x24,0x3a,0x20,0x63,0x61,0x6e,0x27,0x74,0x20, +-0x6f,0x70,0x65,0x6e,0x24,0x3a,0x20,0x6e,0x6f,0x74,0x20,0x45,0x58,0x45,0x24,0x3a, +-0x20,0x6e,0x6f,0x74,0x20,0x43,0x4f,0x46,0x46,0x20,0x28,0x43,0x68,0x65,0x63,0x6b, +-0x20,0x66,0x6f,0x72,0x20,0x76,0x69,0x72,0x75,0x73,0x65,0x73,0x29,0x24,0x6e,0x6f, +-0x20,0x44,0x50,0x4d,0x49,0x20,0x2d,0x20,0x47,0x65,0x74,0x20,0x63,0x73,0x64,0x70, +-0x6d,0x69,0x2a,0x62,0x2e,0x7a,0x69,0x70,0x24,0x6e,0x6f,0x20,0x44,0x4f,0x53,0x20, +-0x6d,0x65,0x6d,0x6f,0x72,0x79,0x24,0x6e,0x65,0x65,0x64,0x20,0x44,0x4f,0x53,0x20, +-0x33,0x24,0x63,0x61,0x6e,0x27,0x74,0x20,0x73,0x77,0x69,0x74,0x63,0x68,0x20,0x6d, +-0x6f,0x64,0x65,0x24,0x6e,0x6f,0x20,0x44,0x50,0x4d,0x49,0x20,0x73,0x65,0x6c,0x65, +-0x63,0x74,0x6f,0x72,0x73,0x24,0x6e,0x6f,0x20,0x44,0x50,0x4d,0x49,0x20,0x6d,0x65, +-0x6d,0x6f,0x72,0x79,0x24,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, +-0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90 ++0x2c,0x00,0x8c,0xc7,0x09,0xff,0x75,0x08,0xb0,0x6f,0xba,0x8f,0x05,0xe9,0x9f,0x03, ++0x31,0xff,0x30,0xc0,0xeb,0x02,0xf2,0xae,0x26,0x81,0x3d,0x50,0x41,0x75,0x15,0xaf, ++0x26,0x81,0x3d,0x54,0x48,0x75,0x0d,0xaf,0x26,0x80,0x3d,0x3d,0x75,0x06,0x47,0x89, ++0x3e,0x98,0x04,0x4f,0xae,0x75,0xdf,0xaf,0x06,0x57,0xb4,0x3e,0xbb,0x13,0x00,0xcd, ++0x21,0xb4,0x3e,0xbb,0x12,0x00,0xcd,0x21,0x31,0xc9,0x74,0x12,0xb0,0x6e,0xba,0x99, ++0x05,0xe9,0x5b,0x03,0x09,0xc9,0x75,0xf4,0x41,0xe8,0x9e,0x03,0x72,0xee,0xb8,0x87, ++0x16,0xcd,0x2f,0x09,0xc0,0x75,0xed,0x80,0xe3,0x01,0x74,0xe8,0x89,0x3e,0x00,0x06, ++0x8c,0x06,0x02,0x06,0x89,0x36,0x04,0x06,0x5f,0x07,0xe8,0xd0,0x02,0x89,0x3e,0x2a, ++0x00,0x89,0x36,0x62,0x07,0x80,0x3e,0x2c,0x00,0x00,0x74,0x23,0xb9,0x08,0x00,0xbf, ++0x2c,0x00,0x8a,0x05,0x47,0x08,0xc0,0x74,0x05,0x88,0x07,0x43,0xe2,0xf4,0x66,0xc7, ++0x07,0x2e,0x45,0x58,0x45,0x83,0xc3,0x04,0xc6,0x07,0x00,0x89,0x1e,0x62,0x07,0xb8, ++0x00,0x3d,0xba,0x64,0x07,0xcd,0x21,0x0f,0x82,0xb0,0x02,0xa3,0x06,0x06,0x89,0xc3, ++0xb9,0x06,0x00,0xba,0xb5,0x07,0xb4,0x3f,0xcd,0x21,0x31,0xd2,0x31,0xc9,0xa1,0xb5, ++0x07,0x3d,0x4c,0x01,0x74,0x1b,0x3d,0x4d,0x5a,0x0f,0x85,0x95,0x02,0x8b,0x16,0xb9, ++0x07,0xc1,0xe2,0x09,0x8b,0x1e,0xb7,0x07,0x09,0xdb,0x74,0x05,0x80,0xee,0x02,0x01, ++0xda,0x89,0x16,0xbb,0x07,0x89,0x0e,0xbd,0x07,0xb8,0x00,0x42,0x8b,0x1e,0x06,0x06, ++0xcd,0x21,0xb9,0xa8,0x00,0xba,0xbf,0x07,0xb4,0x3f,0xcd,0x21,0x3d,0xa8,0x00,0x75, ++0x06,0x81,0x3e,0xbf,0x07,0x4c,0x01,0x0f,0x85,0x5e,0x02,0x66,0xa1,0xe3,0x07,0x66, ++0xa3,0x10,0x06,0x66,0x8b,0x0e,0xbb,0x07,0x66,0xa1,0x03,0x08,0x66,0x01,0xc8,0x66, ++0xa3,0x08,0x06,0x66,0x03,0x0e,0x2b,0x08,0x66,0x89,0x0e,0x0c,0x06,0x66,0x8b,0x1e, ++0x4b,0x08,0x66,0x03,0x1e,0x4f,0x08,0x66,0xb8,0x01,0x00,0x01,0x00,0x66,0x39,0xc3, ++0x73,0x03,0x66,0x89,0xc3,0x66,0x81,0xc3,0xff,0xff,0x00,0x00,0x31,0xdb,0x66,0x89, ++0x1e,0x1c,0x00,0xe8,0xfa,0x02,0x8b,0x1e,0x04,0x06,0x09,0xdb,0x74,0x0a,0xb4,0x48, ++0xcd,0x21,0x0f,0x82,0x15,0x02,0x8e,0xc0,0xe8,0x0d,0x03,0xb8,0x01,0x00,0xff,0x1e, ++0x00,0x06,0x0f,0x82,0x0f,0x02,0x8c,0x06,0x26,0x00,0x8c,0x0e,0x28,0x00,0x8c,0xd8, ++0xa3,0x22,0x00,0x8e,0xc0,0x31,0xc0,0xb9,0x01,0x00,0xcd,0x31,0x72,0x07,0xa3,0x14, ++0x06,0x31,0xc0,0xcd,0x31,0x0f,0x82,0xf3,0x01,0xa3,0x16,0x06,0x66,0x8b,0x0e,0x1c, ++0x00,0xb8,0x01,0x05,0x8b,0x1e,0x1e,0x00,0xcd,0x31,0x0f,0x82,0xe5,0x01,0x89,0x1e, ++0x1a,0x06,0x89,0x0e,0x18,0x06,0x89,0x36,0x1a,0x00,0x89,0x3e,0x18,0x00,0xb8,0x07, ++0x00,0x8b,0x1e,0x14,0x06,0x8b,0x0e,0x1a,0x06,0x8b,0x16,0x18,0x06,0xcd,0x31,0xb8, ++0x09,0x00,0x8c,0xc9,0x83,0xe1,0x03,0xc1,0xe1,0x05,0x51,0x81,0xc9,0x9b,0xc0,0xcd, ++0x31,0xb8,0x08,0x00,0x8b,0x0e,0x1e,0x00,0x49,0xba,0xff,0xff,0xcd,0x31,0xb8,0x07, ++0x00,0x8b,0x1e,0x16,0x06,0x8b,0x0e,0x1a,0x06,0x8b,0x16,0x18,0x06,0xcd,0x31,0xb8, ++0x09,0x00,0x59,0x81,0xc9,0x93,0xc0,0xcd,0x31,0xb8,0x08,0x00,0x8b,0x0e,0x1e,0x00, ++0x49,0xba,0xff,0xff,0xcd,0x31,0xb8,0x00,0x01,0xbb,0x00,0x0f,0xcd,0x31,0x73,0x10, ++0x3d,0x08,0x00,0x0f,0x85,0x73,0x01,0xb8,0x00,0x01,0xcd,0x31,0x0f,0x82,0x6a,0x01, ++0xa3,0x1c,0x06,0x89,0x16,0x1e,0x06,0xc1,0xe3,0x04,0x89,0x1e,0x20,0x06,0x66,0x8b, ++0x36,0x08,0x06,0x66,0x8b,0x3e,0xfb,0x07,0x66,0x8b,0x0e,0xff,0x07,0xe8,0x49,0x00, ++0x66,0x8b,0x36,0x0c,0x06,0x66,0x8b,0x3e,0x23,0x08,0x66,0x8b,0x0e,0x27,0x08,0xe8, ++0x37,0x00,0x8e,0x06,0x16,0x06,0x66,0x8b,0x3e,0x4b,0x08,0x66,0x8b,0x0e,0x4f,0x08, ++0x66,0x31,0xc0,0x66,0xc1,0xe9,0x02,0x67,0xf3,0x66,0xab,0xb4,0x3e,0x8b,0x1e,0x06, ++0x06,0xcd,0x21,0xb8,0x01,0x01,0x8b,0x16,0x1e,0x06,0xcd,0x31,0x1e,0x0f,0xa1,0x8e, ++0x1e,0x16,0x06,0x66,0x64,0xff,0x2e,0x10,0x06,0x66,0x89,0xf0,0x66,0x25,0xff,0x01, ++0x00,0x00,0x66,0x01,0xc1,0x29,0xc6,0x66,0x29,0xc7,0x66,0x89,0x0e,0x26,0x06,0x66, ++0x89,0x3e,0x22,0x06,0xe8,0x0f,0x01,0x89,0x36,0x3e,0x06,0x66,0xc1,0xee,0x10,0x89, ++0x36,0x42,0x06,0x8b,0x1e,0x06,0x06,0x89,0x1e,0x3a,0x06,0xc7,0x06,0x46,0x06,0x00, ++0x42,0xe8,0x03,0x01,0xa1,0x1c,0x06,0xa3,0x4e,0x06,0xc7,0x06,0x3e,0x06,0x00,0x00, ++0xc6,0x06,0x47,0x06,0x3f,0xa1,0x28,0x06,0x09,0xc0,0x75,0x09,0xa1,0x26,0x06,0x3b, ++0x06,0x20,0x06,0x76,0x03,0xa1,0x20,0x06,0xa3,0x42,0x06,0xe8,0xd9,0x00,0x66,0x31, ++0xc9,0x8b,0x0e,0x46,0x06,0x66,0x8b,0x3e,0x22,0x06,0x66,0x01,0x0e,0x22,0x06,0x66, ++0x29,0x0e,0x26,0x06,0x66,0x31,0xf6,0xc1,0xe9,0x02,0x1e,0x06,0x8e,0x06,0x16,0x06, ++0x8e,0x1e,0x1e,0x06,0x67,0xf3,0x66,0xa5,0x07,0x1f,0x66,0x03,0x0e,0x26,0x06,0x75, ++0xaf,0xc3,0x3c,0x3a,0x74,0x06,0x3c,0x2f,0x74,0x02,0x3c,0x5c,0xc3,0xbe,0x64,0x07, ++0x89,0xf3,0x26,0x8a,0x05,0x47,0x88,0x04,0x38,0xe0,0x74,0x0e,0x08,0xc0,0x74,0x0a, ++0x46,0xe8,0xde,0xff,0x75,0xec,0x89,0xf3,0x74,0xe8,0xc3,0xb0,0x66,0xba,0x59,0x05, ++0xeb,0x0c,0xb0,0x67,0xba,0x66,0x05,0xeb,0x05,0xb0,0x68,0xba,0x70,0x05,0x52,0x8b, ++0x1e,0x62,0x07,0xc6,0x07,0x24,0xbb,0x64,0x07,0xeb,0x28,0xe8,0xfa,0x00,0xb0,0x69, ++0xba,0xb4,0x05,0xeb,0x1a,0xb0,0x6a,0xba,0xcd,0x05,0xeb,0x13,0xb0,0x6b,0xba,0xdf, ++0x05,0xeb,0x0c,0xb0,0x6c,0xba,0xf1,0x05,0xeb,0x05,0xb0,0x69,0xba,0xb4,0x05,0x52, ++0xbb,0x4c,0x05,0xe8,0x15,0x00,0x5b,0xe8,0x11,0x00,0xbb,0x73,0x04,0xe8,0x0b,0x00, ++0xb4,0x4c,0xcd,0x21,0x43,0x50,0xb4,0x02,0xcd,0x21,0x58,0x8a,0x17,0x80,0xfa,0x24, ++0x75,0xf2,0xc3,0x0d,0x0a,0x24,0x50,0x51,0x57,0x31,0xc0,0xbf,0x2a,0x06,0xb9,0x19, ++0x00,0xf3,0xab,0x5f,0x59,0x58,0xc3,0xb8,0x00,0x03,0xbb,0x21,0x00,0x31,0xc9,0x66, ++0xbf,0x2a,0x06,0x00,0x00,0xcd,0x31,0xc3,0x00,0x00,0x30,0xe4,0xe8,0x4e,0xff,0x89, ++0xde,0x8b,0x3e,0x98,0x04,0xeb,0x1c,0xb4,0x3b,0xe8,0x41,0xff,0x08,0xc0,0x75,0x01, ++0x4f,0x81,0xfe,0x64,0x07,0x74,0x12,0x8a,0x44,0xff,0xe8,0x25,0xff,0x74,0x04,0xc6, ++0x04,0x5c,0x46,0xe8,0x03,0x00,0x72,0xdf,0xc3,0xe8,0x34,0x00,0xbb,0x44,0x00,0x8a, ++0x07,0x88,0x04,0x43,0x46,0x08,0xc0,0x75,0xf6,0x06,0x57,0x1e,0x07,0xe8,0x96,0xff, ++0xbb,0x2a,0x06,0x8c,0x5f,0x04,0x89,0x5f,0x02,0xba,0x64,0x07,0xb8,0x00,0x4b,0xcd, ++0x21,0x5f,0x07,0x72,0x09,0xb4,0x4d,0xcd,0x21,0x2d,0x00,0x03,0xf7,0xd8,0xeb,0x28, ++0x80,0x3e,0x69,0x08,0x05,0x72,0x20,0xb8,0x00,0x58,0xcd,0x21,0xa2,0x67,0x08,0xb8, ++0x02,0x58,0xcd,0x21,0xa2,0x68,0x08,0xb8,0x01,0x58,0xbb,0x80,0x00,0xcd,0x21,0xb8, ++0x03,0x58,0xbb,0x01,0x00,0xcd,0x21,0xc3,0x9c,0x80,0x3e,0x69,0x08,0x05,0x72,0x1a, ++0x50,0x53,0xb8,0x03,0x58,0x8a,0x1e,0x68,0x08,0x30,0xff,0xcd,0x21,0xb8,0x01,0x58, ++0x8a,0x1e,0x67,0x08,0x30,0xff,0xcd,0x21,0x5b,0x58,0x9d,0xc3,0x4c,0x6f,0x61,0x64, ++0x20,0x65,0x72,0x72,0x6f,0x72,0x3a,0x20,0x24,0x3a,0x20,0x63,0x61,0x6e,0x27,0x74, ++0x20,0x6f,0x70,0x65,0x6e,0x24,0x3a,0x20,0x6e,0x6f,0x74,0x20,0x45,0x58,0x45,0x24, ++0x3a,0x20,0x6e,0x6f,0x74,0x20,0x43,0x4f,0x46,0x46,0x20,0x28,0x43,0x68,0x65,0x63, ++0x6b,0x20,0x66,0x6f,0x72,0x20,0x76,0x69,0x72,0x75,0x73,0x65,0x73,0x29,0x24,0x6e, ++0x6f,0x20,0x65,0x6e,0x76,0x73,0x65,0x67,0x24,0x6e,0x6f,0x20,0x44,0x50,0x4d,0x49, ++0x20,0x2d,0x20,0x47,0x65,0x74,0x20,0x63,0x73,0x64,0x70,0x6d,0x69,0x2a,0x62,0x2e, ++0x7a,0x69,0x70,0x24,0x6e,0x6f,0x20,0x44,0x4f,0x53,0x20,0x6d,0x65,0x6d,0x6f,0x72, ++0x79,0x24,0x6e,0x65,0x65,0x64,0x20,0x44,0x4f,0x53,0x20,0x33,0x24,0x63,0x61,0x6e, ++0x27,0x74,0x20,0x73,0x77,0x69,0x74,0x63,0x68,0x20,0x6d,0x6f,0x64,0x65,0x24,0x6e, ++0x6f,0x20,0x44,0x50,0x4d,0x49,0x20,0x73,0x65,0x6c,0x65,0x63,0x74,0x6f,0x72,0x73, ++0x24,0x6e,0x6f,0x20,0x44,0x50,0x4d,0x49,0x20,0x6d,0x65,0x6d,0x6f,0x72,0x79,0x24 diff --git a/patch/patch-bnu27-bfd-init.txt b/patch/djgpp-binutils-227/0001.patch similarity index 71% rename from patch/patch-bnu27-bfd-init.txt rename to patch/djgpp-binutils-227/0001.patch index e8f98fa3..7639ad97 100644 --- a/patch/patch-bnu27-bfd-init.txt +++ b/patch/djgpp-binutils-227/0001.patch @@ -1,5 +1,5 @@ ---- init.c.bak 2017-01-31 19:11:07.478074684 +0000 -+++ init.c 2017-01-31 19:24:23.798041848 +0000 +--- a/bfd/init.c 2017-01-31 19:11:07.478074684 +0000 ++++ b/bfd/init.c 2017-01-31 19:24:23.798041848 +0000 @@ -25,9 +25,7 @@ /* This controls if the coff 64k support shall be disabled or not. diff --git a/patch/djgpp-binutils-2331/0001-byteswap.patch b/patch/djgpp-binutils-2331/0001-byteswap.patch new file mode 100644 index 00000000..a0ce856a --- /dev/null +++ b/patch/djgpp-binutils-2331/0001-byteswap.patch @@ -0,0 +1,47 @@ +--- a/libctf/swap.h 2020-02-04 02:01:06.703925300 +0100 ++++ b/libctf/swap.h 2020-02-04 02:01:35.474802100 +0100 +@@ -23,19 +23,15 @@ + #include "config.h" + #include + +-#ifdef HAVE_BYTESWAP_H +-#include +-#else +- + #ifndef __DJGPP__ + /* Provide our own versions of the byteswap functions. */ +-inline uint16_t ++static inline uint16_t + bswap_16 (uint16_t v) + { + return ((v >> 8) & 0xff) | ((v & 0xff) << 8); + } + +-inline uint32_t ++static inline uint32_t + bswap_32 (uint32_t v) + { + return ( ((v & 0xff000000) >> 24) +@@ -44,13 +40,13 @@ + | ((v & 0x000000ff) << 24)); + } + +-inline uint64_t ++static inline uint64_t + bswap_identity_64 (uint64_t v) + { + return v; + } + +-inline uint64_t ++static inline uint64_t + bswap_64 (uint64_t v) + { + return ( ((v & 0xff00000000000000ULL) >> 56) +@@ -118,6 +114,4 @@ + ) + #endif /* __DJGPP__ */ + +-#endif /* !defined(HAVE_BYTESWAP_H) */ +- + #endif /* !defined(_CTF_SWAP_H) */ diff --git a/patch/djgpp-binutils-234/0001-clear-CONTENTS-flag-if-b-flag-is-given-for-COFF-sect.patch b/patch/djgpp-binutils-234/0001-clear-CONTENTS-flag-if-b-flag-is-given-for-COFF-sect.patch new file mode 100644 index 00000000..0a76cd7b --- /dev/null +++ b/patch/djgpp-binutils-234/0001-clear-CONTENTS-flag-if-b-flag-is-given-for-COFF-sect.patch @@ -0,0 +1,50 @@ +Subject: [PATCH] clear CONTENTS flag if "b" flag is given for COFF section +From: "J.W. Jagersma" +Date: 2020-03-24 23:20 + +The "b" flag for COFF sections only unsets the LOAD attribute. It +should also clear the CONTENTS attribute so that named bss sections +don't take up space in an object file. This can be achieved by +setting the 'bss' flag in seg_info. + +gas/ +2020-03-24 Jan W. Jagersma + + * config/obj-coff.c (obj_coff_section): Set bss flag in + seg_info if "b" flag is given. +--- + gas/config/obj-coff.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c +index 178ccaad6a..e97d9a22a1 100644 +--- a/gas/config/obj-coff.c ++++ b/gas/config/obj-coff.c +@@ -1531,6 +1531,7 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED) + char *name; + unsigned int exp; + flagword flags, oldflags; ++ bfd_boolean is_bss = FALSE; + asection *sec; + + if (flag_mri) +@@ -1581,6 +1582,7 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED) + /* Uninitialised data section. */ + flags |= SEC_ALLOC; + flags &=~ SEC_LOAD; ++ is_bss = TRUE; + break; + + case 'n': +@@ -1652,6 +1654,9 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED) + + sec = subseg_new (name, (subsegT) exp); + ++ if (is_bss) ++ seg_info (sec)->bss = 1; ++ + if (alignment >= 0) + sec->alignment_power = alignment; + +-- 2.25.2 + diff --git a/patch/djgpp-binutils-234/0002-ldscript.patch b/patch/djgpp-binutils-234/0002-ldscript.patch new file mode 100644 index 00000000..fe801863 --- /dev/null +++ b/patch/djgpp-binutils-234/0002-ldscript.patch @@ -0,0 +1,22 @@ +--- a/ld/scripttempl/i386go32.sc 2020-05-05 17:31:16.921799400 +0200 ++++ b/ld/scripttempl/i386go32.sc 2020-05-05 17:31:29.717799400 +0200 +@@ -60,10 +60,6 @@ + *(.data) + ${RELOCATING+*(.data.*)} + +- /* Ugly workaround to prevent entire .bss to have attribute CONTENT */ +- /* for C++ executables. */ +- *(.bss.*) +- + ${RELOCATING+*(.gcc_exc*)} + ${RELOCATING+___EH_FRAME_BEGIN__ = . ;} + ${RELOCATING+*(.eh_fram*)} +@@ -78,7 +74,7 @@ + ${CONSTRUCTING+${RELOCATING-$DTOR}} + .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : + { +- *(.bss${RELOCATING+ .gnu.linkonce.b.*}) ++ *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*}) + *(COMMON) + ${RELOCATING+ end = . ; PROVIDE(_end = .) ;} + ${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});} diff --git a/patch/djgpp-gcc-10.3.0/watt32-errno.patch b/patch/djgpp-gcc-10.3.0/watt32-errno.patch new file mode 100644 index 00000000..d2c4ba3a --- /dev/null +++ b/patch/djgpp-gcc-10.3.0/watt32-errno.patch @@ -0,0 +1,219 @@ +diff --git a/libstdc++-v3/config/os/djgpp/error_constants.h b/libstdc++-v3/config/os/djgpp/error_constants.h +index 434de1601e4..a739488247e 100644 +--- a/libstdc++-v3/config/os/djgpp/error_constants.h ++++ b/libstdc++-v3/config/os/djgpp/error_constants.h +@@ -33,6 +33,11 @@ + #include + #include + ++// Include Watt-32 errno list, if present ++#if __has_include() ++#include ++#endif ++ + #ifndef EOPNOTSUPP + // Use same value as in wat3222br6.zip file net/watt/sys/djgpp.err + #define EOPNOTSUPP 52 +@@ -48,10 +53,22 @@ + + enum class errc + { +-// address_family_not_supported = EAFNOSUPPORT, +-// address_in_use = EADDRINUSE, +-// address_not_available = EADDRNOTAVAIL, +-// already_connected = EISCONN, ++#ifdef EAFNOSUPPORT ++ address_family_not_supported = EAFNOSUPPORT, ++#endif ++ ++#ifdef EADDRINUSE ++ address_in_use = EADDRINUSE, ++#endif ++ ++#ifdef EADDRNOTAVAIL ++ address_not_available = EADDRNOTAVAIL, ++#endif ++ ++#ifdef EISCONN ++ already_connected = EISCONN, ++#endif ++ + argument_list_too_long = E2BIG, + argument_out_of_domain = EDOM, + bad_address = EFAULT, +@@ -62,12 +79,29 @@ + #endif + + broken_pipe = EPIPE, +-// connection_aborted = ECONNABORTED, +-// connection_already_in_progress = EALREADY, +-// connection_refused = ECONNREFUSED, +-// connection_reset = ECONNRESET, ++ ++#ifdef ECONNABORTED ++ connection_aborted = ECONNABORTED, ++#endif ++ ++#ifdef EALREADY ++ connection_already_in_progress = EALREADY, ++#endif ++ ++#ifdef ECONNREFUSED ++ connection_refused = ECONNREFUSED, ++#endif ++ ++#ifdef ECONNRESET ++ connection_reset = ECONNRESET, ++#endif ++ + cross_device_link = EXDEV, +-// destination_address_required = EDESTADDRREQ, ++ ++#ifdef EDESTADDRREQ ++ destination_address_required = EDESTADDRREQ, ++#endif ++ + device_or_resource_busy = EBUSY, + directory_not_empty = ENOTEMPTY, + executable_format_error = ENOEXEC, +@@ -75,7 +109,10 @@ + file_too_large = EFBIG, + filename_too_long = ENAMETOOLONG, + function_not_supported = ENOSYS, +-// host_unreachable = EHOSTUNREACH, ++ ++#ifdef EHOSTUNREACH ++ host_unreachable = EHOSTUNREACH, ++#endif + + #ifdef EIDRM + identifier_removed = EIDRM, +@@ -88,11 +125,27 @@ + invalid_seek = ESPIPE, + io_error = EIO, + is_a_directory = EISDIR, +-// message_size = EMSGSIZE, +-// network_down = ENETDOWN, +-// network_reset = ENETRESET, +-// network_unreachable = ENETUNREACH, +-// no_buffer_space = ENOBUFS, ++ ++#ifdef EMSGSIZE ++ message_size = EMSGSIZE, ++#endif ++ ++#ifdef ENETDOWN ++ network_down = ENETDOWN, ++#endif ++ ++#ifdef ENETRESET ++ network_reset = ENETRESET, ++#endif ++ ++#ifdef ENETUNREACH ++ network_unreachable = ENETUNREACH, ++#endif ++ ++#ifdef ENOBUFS ++ no_buffer_space = ENOBUFS, ++#endif ++ + no_child_process = ECHILD, + + #ifdef ENOLINK +@@ -105,8 +158,14 @@ + no_message_available = ENODATA, + #endif + +-// no_message = ENOMSG, +-// no_protocol_option = ENOPROTOOPT, ++#ifdef ENOMSG ++ no_message = ENOMSG, ++#endif ++ ++#ifdef ENOPROTOOPT ++ no_protocol_option = ENOPROTOOPT, ++#endif ++ + no_space_on_device = ENOSPC, + + #ifdef ENOSR +@@ -118,25 +177,39 @@ + no_such_file_or_directory = ENOENT, + no_such_process = ESRCH, + not_a_directory = ENOTDIR, +-// not_a_socket = ENOTSOCK, ++ ++#ifdef ENOTSOCK ++ not_a_socket = ENOTSOCK, ++#endif + + #ifdef ENOSTR + not_a_stream = ENOSTR, + #endif + +-// not_connected = ENOTCONN, ++#ifdef ENOTCONN ++ not_connected = ENOTCONN, ++#endif ++ + not_enough_memory = ENOMEM, + ++#ifdef ENOTSUP + not_supported = ENOTSUP, ++#endif + + #ifdef ECANCELED + operation_canceled = ECANCELED, + #endif + +-// operation_in_progress = EINPROGRESS, ++#ifdef EINPROGRESS ++ operation_in_progress = EINPROGRESS, ++#endif ++ + operation_not_permitted = EPERM, + operation_not_supported = EOPNOTSUPP, +-// operation_would_block = EWOULDBLOCK, ++ ++#ifdef EWOULDBLOCK ++ operation_would_block = EWOULDBLOCK, ++#endif + + #ifdef EOWNERDEAD + owner_dead = EOWNERDEAD, +@@ -148,7 +221,10 @@ + protocol_error = EPROTO, + #endif + +-// protocol_not_supported = EPROTONOSUPPORT, ++#ifdef EPROTONOSUPPORT ++ protocol_not_supported = EPROTONOSUPPORT, ++#endif ++ + read_only_file_system = EROFS, + resource_deadlock_would_occur = EDEADLK, + resource_unavailable_try_again = EAGAIN, +@@ -166,7 +242,10 @@ + text_file_busy = ETXTBSY, + #endif + +-// timed_out = ETIMEDOUT, ++#ifdef ETIMEDOUT ++ timed_out = ETIMEDOUT, ++#endif ++ + too_many_files_open_in_system = ENFILE, + too_many_files_open = EMFILE, + too_many_links = EMLINK, +@@ -176,7 +255,9 @@ + value_too_large = EOVERFLOW, + #endif + +-// wrong_protocol_type = EPROTOTYPE ++#ifdef EPROTOTYPE ++ wrong_protocol_type = EPROTOTYPE ++#endif + }; + + _GLIBCXX_END_NAMESPACE_VERSION diff --git a/patch/djgpp-gcc-8.1.0/0001.patch b/patch/djgpp-gcc-8.1.0/0001.patch new file mode 100644 index 00000000..60de2f04 --- /dev/null +++ b/patch/djgpp-gcc-8.1.0/0001.patch @@ -0,0 +1,81 @@ +diff --git a/gcc/config/i386/djgpp.c b/gcc/config/i386/djgpp.c +index f168eed6f06..d187c3a7452 100644 +--- a/gcc/config/i386/djgpp.c ++++ b/gcc/config/i386/djgpp.c +@@ -47,3 +47,20 @@ i386_djgpp_asm_named_section(const char *name, unsigned int flags, + + fprintf (asm_out_file, "\t.section\t%s,\"%s\"\n", name, flagchars); + } ++ ++/* Kludge because of missing COFF support for early LTO debug. */ ++ ++static enum debug_info_levels saved_debug_info_level; ++ ++void ++i386_djgpp_asm_lto_start (void) ++{ ++ saved_debug_info_level = debug_info_level; ++ debug_info_level = DINFO_LEVEL_NONE; ++} ++ ++void ++i386_djgpp_asm_lto_end (void) ++{ ++ debug_info_level = saved_debug_info_level; ++} +diff --git a/gcc/config/i386/djgpp.h b/gcc/config/i386/djgpp.h +index 01774cea4d6..dd8c71b833a 100644 +--- a/gcc/config/i386/djgpp.h ++++ b/gcc/config/i386/djgpp.h +@@ -157,8 +157,19 @@ along with GCC; see the file COPYING3. If not see + #undef MAKE_DECL_ONE_ONLY + #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) + ++#undef TARGET_COFF ++#define TARGET_COFF 1 ++ ++/* Kludge because of missing COFF support for early LTO debug. */ ++#undef TARGET_ASM_LTO_START ++#define TARGET_ASM_LTO_START i386_djgpp_asm_lto_start ++#undef TARGET_ASM_LTO_END ++#define TARGET_ASM_LTO_END i386_djgpp_asm_lto_end ++ + /* Function protypes for gcc/i386/djgpp.c */ + + void + i386_djgpp_asm_named_section(const char *name, unsigned int flags, + tree decl); ++void i386_djgpp_asm_lto_start (void); ++void i386_djgpp_asm_lto_end (void); +diff --git a/gcc/defaults.h b/gcc/defaults.h +index 78a08a33f12..9035b333be8 100644 +--- a/gcc/defaults.h ++++ b/gcc/defaults.h +@@ -1282,6 +1282,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define TARGET_PECOFF 0 + #endif + ++#ifndef TARGET_COFF ++#define TARGET_COFF 0 ++#endif ++ + #ifndef EH_RETURN_HANDLER_RTX + #define EH_RETURN_HANDLER_RTX NULL + #endif +diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c +index 8377cbc5dd1..c75aadbaa2c 100644 +--- a/gcc/dwarf2out.c ++++ b/gcc/dwarf2out.c +@@ -31938,10 +31938,10 @@ dwarf2out_early_finish (const char *filename) + + /* Do not generate DWARF assembler now when not producing LTO bytecode. */ + if ((!flag_generate_lto && !flag_generate_offload) +- /* FIXME: Disable debug info generation for PE-COFF targets since the ++ /* FIXME: Disable debug info generation for (PE-)COFF targets since the + copy_lto_debug_sections operation of the simple object support in + libiberty is not implemented for them yet. */ +- || TARGET_PECOFF) ++ || TARGET_PECOFF || TARGET_COFF) + return; + + /* Now as we are going to output for LTO initialize sections and labels diff --git a/patch/djgpp-gcc-8.2.0/0001.patch b/patch/djgpp-gcc-8.2.0/0001.patch new file mode 100644 index 00000000..60de2f04 --- /dev/null +++ b/patch/djgpp-gcc-8.2.0/0001.patch @@ -0,0 +1,81 @@ +diff --git a/gcc/config/i386/djgpp.c b/gcc/config/i386/djgpp.c +index f168eed6f06..d187c3a7452 100644 +--- a/gcc/config/i386/djgpp.c ++++ b/gcc/config/i386/djgpp.c +@@ -47,3 +47,20 @@ i386_djgpp_asm_named_section(const char *name, unsigned int flags, + + fprintf (asm_out_file, "\t.section\t%s,\"%s\"\n", name, flagchars); + } ++ ++/* Kludge because of missing COFF support for early LTO debug. */ ++ ++static enum debug_info_levels saved_debug_info_level; ++ ++void ++i386_djgpp_asm_lto_start (void) ++{ ++ saved_debug_info_level = debug_info_level; ++ debug_info_level = DINFO_LEVEL_NONE; ++} ++ ++void ++i386_djgpp_asm_lto_end (void) ++{ ++ debug_info_level = saved_debug_info_level; ++} +diff --git a/gcc/config/i386/djgpp.h b/gcc/config/i386/djgpp.h +index 01774cea4d6..dd8c71b833a 100644 +--- a/gcc/config/i386/djgpp.h ++++ b/gcc/config/i386/djgpp.h +@@ -157,8 +157,19 @@ along with GCC; see the file COPYING3. If not see + #undef MAKE_DECL_ONE_ONLY + #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) + ++#undef TARGET_COFF ++#define TARGET_COFF 1 ++ ++/* Kludge because of missing COFF support for early LTO debug. */ ++#undef TARGET_ASM_LTO_START ++#define TARGET_ASM_LTO_START i386_djgpp_asm_lto_start ++#undef TARGET_ASM_LTO_END ++#define TARGET_ASM_LTO_END i386_djgpp_asm_lto_end ++ + /* Function protypes for gcc/i386/djgpp.c */ + + void + i386_djgpp_asm_named_section(const char *name, unsigned int flags, + tree decl); ++void i386_djgpp_asm_lto_start (void); ++void i386_djgpp_asm_lto_end (void); +diff --git a/gcc/defaults.h b/gcc/defaults.h +index 78a08a33f12..9035b333be8 100644 +--- a/gcc/defaults.h ++++ b/gcc/defaults.h +@@ -1282,6 +1282,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define TARGET_PECOFF 0 + #endif + ++#ifndef TARGET_COFF ++#define TARGET_COFF 0 ++#endif ++ + #ifndef EH_RETURN_HANDLER_RTX + #define EH_RETURN_HANDLER_RTX NULL + #endif +diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c +index 8377cbc5dd1..c75aadbaa2c 100644 +--- a/gcc/dwarf2out.c ++++ b/gcc/dwarf2out.c +@@ -31938,10 +31938,10 @@ dwarf2out_early_finish (const char *filename) + + /* Do not generate DWARF assembler now when not producing LTO bytecode. */ + if ((!flag_generate_lto && !flag_generate_offload) +- /* FIXME: Disable debug info generation for PE-COFF targets since the ++ /* FIXME: Disable debug info generation for (PE-)COFF targets since the + copy_lto_debug_sections operation of the simple object support in + libiberty is not implemented for them yet. */ +- || TARGET_PECOFF) ++ || TARGET_PECOFF || TARGET_COFF) + return; + + /* Now as we are going to output for LTO initialize sections and labels diff --git a/patch/djgpp-gcc-9.3.0/0001-djgpp-emit-b-flag-for-named-bss-sections.patch b/patch/djgpp-gcc-9.3.0/0001-djgpp-emit-b-flag-for-named-bss-sections.patch new file mode 100644 index 00000000..5f77c4ec --- /dev/null +++ b/patch/djgpp-gcc-9.3.0/0001-djgpp-emit-b-flag-for-named-bss-sections.patch @@ -0,0 +1,38 @@ +From e869e1d34fde5f3bfba47b10b1db073115ee7152 Mon Sep 17 00:00:00 2001 +From: "J.W. Jagersma" +Date: Wed, 25 Mar 2020 19:56:27 +0100 +Subject: [PATCH] djgpp: emit "b" flag for named bss sections + +Unlike ELF, named sections such as .bss.* and .gnu.linkonce.b.* have no +special meaning in COFF, therefore they will have the CONTENTS, LOAD +and DATA attributes set. The result is that these sections take up +space in object files and executables. These attributes can be cleared +by emitting the "b" flag in the .section directive. + +This can probably be added in default_coff_asm_named_section too. + +gcc/ +2020-03-25 Jan W. Jagersma + + * config/i386/djgpp.c (i386_djgpp_asm_named_section): Emit "b" + attribute for SECTION_BSS. +--- + gcc/config/i386/djgpp.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/gcc/config/i386/djgpp.c b/gcc/config/i386/djgpp.c +index ba6c2d4d3a4..88cf1e6506e 100644 +--- a/gcc/config/i386/djgpp.c ++++ b/gcc/config/i386/djgpp.c +@@ -36,6 +36,8 @@ i386_djgpp_asm_named_section(const char *name, unsigned int flags, + *f++ = 'w'; + if (flags & SECTION_CODE) + *f++ = 'x'; ++ if (flags & SECTION_BSS) ++ *f++ = 'b'; + + /* LTO sections need 1-byte alignment to avoid confusing the + zlib decompression algorithm with trailing zero pad bytes. */ +-- +2.26.2 + diff --git a/patch/djlsr205/0001-append-to-CFLAGS-in-libc-posix-regex-makefile-instea.patch b/patch/djlsr205/0001-append-to-CFLAGS-in-libc-posix-regex-makefile-instea.patch new file mode 100644 index 00000000..1676e0e0 --- /dev/null +++ b/patch/djlsr205/0001-append-to-CFLAGS-in-libc-posix-regex-makefile-instea.patch @@ -0,0 +1,26 @@ +From 9e29f38d2ce073bc209cafbb9341dd5756b743da Mon Sep 17 00:00:00 2001 +From: "J.W. Jagersma" +Date: Mon, 10 Feb 2020 18:31:38 +0100 +Subject: [PATCH] append to CFLAGS in libc/posix/regex/makefile, instead of + overriding it. + +--- + src/libc/posix/regex/makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libc/posix/regex/makefile b/src/libc/posix/regex/makefile +index ef3ca5c1..b8fc260f 100644 +--- a/src/libc/posix/regex/makefile ++++ b/src/libc/posix/regex/makefile +@@ -4,7 +4,7 @@ + TOP=../.. + + # supress all warnings here +-CFLAGS = -w ++CFLAGS += -w + + SRC += regcomp.c + SRC += regerror.c +-- +2.25.0 + diff --git a/patch/djlsr205/0001-fix-handling-of-empty-environment.patch b/patch/djlsr205/0001-fix-handling-of-empty-environment.patch new file mode 100644 index 00000000..ad8c1fcc --- /dev/null +++ b/patch/djlsr205/0001-fix-handling-of-empty-environment.patch @@ -0,0 +1,118 @@ +From 65d7caeb32f21597938f49364737789727516fdb Mon Sep 17 00:00:00 2001 +From: Stas Sergeev +Date: Sun, 4 Aug 2019 01:25:38 +0300 +Subject: [PATCH] fix handling of empty environment + +Currently if the DOS environment is empty (can happen +when starting command.com), djgpp startup produces the +corrupted environment. This patch fixes it by checking +the loop end condition before loop action. + +Another problematic case is the missing environment segment. +In this case there is no work-around, so the error msg +is printed and the program terminates. +--- + src/libc/crt0/crt1.c | 12 +++++++----- + src/stub/stub.asm | 16 +++++++++++++--- + 2 files changed, 20 insertions(+), 8 deletions(-) + +diff --git a/src/libc/crt0/crt1.c b/src/libc/crt0/crt1.c +index f0ba9919..37c7dedb 100644 +--- a/src/libc/crt0/crt1.c ++++ b/src/libc/crt0/crt1.c +@@ -128,31 +128,33 @@ char *__dos_argv0; + static void + setup_environment(void) + { +- char *dos_environ = alloca(_stubinfo->env_size), *cp; ++ char *dos_environ, *cp; + short env_selector; + int env_count=0; ++ ++ dos_environ = alloca(_stubinfo->env_size); + movedata(_stubinfo->psp_selector, 0x2c, ds, (int)&env_selector, 2); + movedata(env_selector, 0, ds, (int)dos_environ, _stubinfo->env_size); + cp = dos_environ; +- do { ++ while (*cp) { /* repeat until two NULs */ + env_count++; + while (*cp) cp++; /* skip to NUL */ + cp++; /* skip to next character */ +- } while (*cp); /* repeat until two NULs */ ++ } + _environ = (char **)malloc((env_count+1) * sizeof(char *)); + if (_environ == 0) + return; + + cp = dos_environ; + env_count = 0; +- do { ++ while (*cp) { /* repeat until two NULs */ + /* putenv assumes each string is malloc'd */ + _environ[env_count] = (char *)malloc(strlen(cp)+1); + strcpy(_environ[env_count], cp); + env_count++; + while (*cp) cp++; /* skip to NUL */ + cp++; /* skip to next character */ +- } while (*cp); /* repeat until two NULs */ ++ } + _environ[env_count] = 0; + + /* +diff --git a/src/stub/stub.asm b/src/stub/stub.asm +index 62dee9e9..76b2edd6 100644 +--- a/src/stub/stub.asm ++++ b/src/stub/stub.asm +@@ -160,13 +160,21 @@ resize_again: + ; Scan environment for "PATH=" and the stub's full name after environment + + mov es, es:[0x2c] ; get environment segment ++ mov di, es ++ or di, di ; check if no env ++ jnz @f1 ++ mov al, 111 ++ mov dx, msg_no_env ++ jmpl error ++@f1: + xor di, di ; begin search for NUL/NUL (di = 0) + ; mov cx, 0xff04 ; effectively `infinite' loop + xor al, al +- .db 0xa9 ; "test ax,...." -- skip 2 bytes ++ jmp @f1 + scan_environment: + repne + scasb ; search for NUL ++@f1: + cmpw es:[di], 0x4150 ; "PA" + jne not_path + scasw +@@ -182,6 +190,8 @@ not_path: + scasb + jne scan_environment ; no, still environment + scasw ; adjust pointer to point to prog name ++ push es ++ push di + + ;; When we are spawned from a program which has more than 20 handles in use, + ;; all the handles passed to us by DOS are taken (since only the first 20 +@@ -199,8 +209,6 @@ not_path: + ;----------------------------------------------------------------------------- + ; Get DPMI information before doing anything 386-specific + +- push es +- push di + xor cx, cx ; flag for load attempt set cx = 0 + jz @f2 ; We always jump, shorter than jmp + @b1: +@@ -828,6 +836,8 @@ msg_not_exe: + .db ": not EXE$" + msg_not_coff: + .db ": not COFF (Check for viruses)$" ++msg_no_env: ++ .db "no envseg$" + msg_no_dpmi: + .db "no DPMI - Get csdpmi*b.zip$" + msg_no_dos_memory: +-- +2.20.1 + diff --git a/patch/djlsr205/0001-fix-multiple-definition-errors-with-gcc-10.patch b/patch/djlsr205/0001-fix-multiple-definition-errors-with-gcc-10.patch new file mode 100644 index 00000000..b594209c --- /dev/null +++ b/patch/djlsr205/0001-fix-multiple-definition-errors-with-gcc-10.patch @@ -0,0 +1,46 @@ +From 9fcd924b8eec562eeacf53c92a18e06aacb48fa9 Mon Sep 17 00:00:00 2001 +From: "J.W. Jagersma" +Date: Sat, 9 May 2020 16:55:26 +0200 +Subject: [PATCH] fix multiple definition errors with gcc 10 + +GCC 10 now defaults to -fno-common, which causes multiple definition +errors during linking. In libc, __stdio_cleanup_hook is defined twice, +and in fsdb, several variables are defined in a header, which is +included in multiple source files. + +To solve this, __stdio_cleanup_hook is declared extern and fsdb can be +compiled with -fcommon. +--- + src/debug/fsdb/makefile | 2 ++ + src/libc/ansi/stdlib/exit.c | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/debug/fsdb/makefile b/src/debug/fsdb/makefile +index da796d41..41f145fb 100644 +--- a/src/debug/fsdb/makefile ++++ b/src/debug/fsdb/makefile +@@ -12,6 +12,8 @@ EOBJS += unassmbl.o + + include $(TOP)/../makefile.inc + ++CFLAGS += -fcommon ++ + #relax error checking: + XGCC = $(XLGCC) + +diff --git a/src/libc/ansi/stdlib/exit.c b/src/libc/ansi/stdlib/exit.c +index 94634b11..79b40ae9 100644 +--- a/src/libc/ansi/stdlib/exit.c ++++ b/src/libc/ansi/stdlib/exit.c +@@ -15,7 +15,7 @@ + + struct __atexit *__atexit_ptr = 0; + +-void (*__stdio_cleanup_hook)(void); ++extern void (*__stdio_cleanup_hook)(void); + + /* A hook to close down the file system extensions if any where opened. + This does not force them to be linked in. */ +-- +2.26.2 + diff --git a/patch/djlsr205/0001-process-make-descriptor-leak-work-around-conditional.patch b/patch/djlsr205/0001-process-make-descriptor-leak-work-around-conditional.patch new file mode 100644 index 00000000..02f53432 --- /dev/null +++ b/patch/djlsr205/0001-process-make-descriptor-leak-work-around-conditional.patch @@ -0,0 +1,63 @@ +From 12d00dab0e179b4ec1c5a6a7d6e93eb907ef606d Mon Sep 17 00:00:00 2001 +From: Stas Sergeev +Date: Sat, 17 Aug 2019 19:00:10 +0300 +Subject: [PATCH] process: make descriptor leak work-around conditional + +This patch adds the __spawn_flags variable and __spawn_leak_workaround +flag to allow the software to control the leak work-around. +Previous behaviour was to always enable the work-around unless +the DPMI host is cwsdpmi. + +Without this patch it is not possible to spawn a prot-mode TSR +program like 32rtm. djgpp treats it as a leak and wipes out of +memory. With this patch things work properly if the DPMI server +is smart enough to direct the control to prev client after 32rtm +TSRed. The problem is that 32rtm just jumps to the realmode exit +addr, so the DPMI server doesn't see the exit and may get confused +unless the special logic is implemented for that case (i.e. not all +DPMI servers treat that correctly even after that patch). +--- + include/process.h | 4 ++++ + src/libc/dos/process/dosexec.c | 4 +++- + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/include/process.h b/include/process.h +index 2816ce25..e57467d4 100644 +--- a/include/process.h ++++ b/include/process.h +@@ -52,6 +52,10 @@ int __djgpp_spawn(int _mode, const char *_path, char *const _argv[], char *const + #define SPAWN_EXTENSION_SRCH 1 + #define SPAWN_NO_EXTENSION_SRCH 2 + ++#define __spawn_leak_workaround 0x0001 /* free descriptor leaks */ ++ ++extern int __spawn_flags; ++ + #endif /* !_POSIX_SOURCE */ + #endif /* !__STRICT_ANSI__ */ + #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ +diff --git a/src/libc/dos/process/dosexec.c b/src/libc/dos/process/dosexec.c +index 87d7fbd9..d547a31f 100644 +--- a/src/libc/dos/process/dosexec.c ++++ b/src/libc/dos/process/dosexec.c +@@ -45,6 +45,7 @@ + extern char **_environ; + + int __dosexec_in_system = 0; ++int __spawn_flags = __spawn_leak_workaround; + + typedef struct { + unsigned short eseg; +@@ -492,7 +493,8 @@ static int direct_exec_tail (const char *program, const char *args, + /* r5 as corresponding DPMI call is supported beginning with v5. */ + + ret = __dpmi_get_capabilities(&flags, dpmi_vendor); +- if (ret == 0 && strcmp(dpmi_vendor + 2, "CWSDPMI") == 0) ++ if ((ret == 0 && strcmp(dpmi_vendor + 2, "CWSDPMI") == 0) ++ || (__spawn_flags & __spawn_leak_workaround) == 0) + workaround_descriptor_leaks = 0; + else + { +-- +2.20.1 + diff --git a/patch/djlsr205/patch-djlsr205.txt b/patch/djlsr205/patch-djlsr205.txt new file mode 100644 index 00000000..4fb28f5d --- /dev/null +++ b/patch/djlsr205/patch-djlsr205.txt @@ -0,0 +1,313 @@ +diff -ur djlsr205-orig/src/dxe/dxe3gen.c djlsr205/src/dxe/dxe3gen.c +--- djlsr205-orig/src/dxe/dxe3gen.c 2017-04-29 14:32:47.000000000 +0800 ++++ djlsr205/src/dxe/dxe3gen.c 2017-04-29 14:33:27.000000000 +0800 +@@ -193,7 +193,7 @@ + #include "../../include/sys/dxe.h" + #include "../../include/coff.h" + +-#define VERSION "1.0.3" ++#define VERSION "1.0.4" + + #define TEMP_BASE "dxe_tmp" /* 7 chars, 1 char suffix */ + #define TEMP_O_FILE TEMP_BASE".o" +@@ -937,6 +937,7 @@ + char *strings; + RELOC *relocs; + unsigned int i, j, errcount; ++ ULONG32 real_nrelocs; + size_t hdrsize; + + /* Exported symbols table */ +@@ -985,9 +986,18 @@ + strings[0] = 0; + + /* Read the relocation table */ +- relocs = (RELOC *)malloc(sc.s_nreloc * sizeof(RELOC)); + fseek(inf, sc.s_relptr, SEEK_SET); +- fread(relocs, RELSZ, sc.s_nreloc, inf); ++ if (sc.s_flags & STYP_NRELOC_OVFL) { ++ fread(&real_nrelocs, 4, 1, inf); /* read r_vaddr */ ++ fseek(inf, RELSZ - 4, SEEK_CUR); /* skip the rest */ ++ dh.nrelocs = --real_nrelocs; /* lose the '+1' */ ++ if (opt.verbose) ++ printf("%s: real nrelocs: %lu\n", progname, (unsigned long)real_nrelocs); ++ } else { ++ real_nrelocs = dh.nrelocs; ++ } ++ relocs = (RELOC *)malloc(real_nrelocs * sizeof(RELOC)); ++ fread(relocs, RELSZ, real_nrelocs, inf); + + /* Close input file */ + fclose(inf); +@@ -1042,7 +1052,7 @@ + int n_abs_relocs = 0, n_rel_relocs = 0; + + /* count the amount of relocations pointing to this symbol */ +- for (j = 0; j < sc.s_nreloc; j++) ++ for (j = 0; j < real_nrelocs; j++) + { + if (relocs[j].r_symndx == i) + { +@@ -1101,7 +1111,7 @@ + + unres_size = newsize; + +- for (j = 0; j < sc.s_nreloc; j++) ++ for (j = 0; j < real_nrelocs; j++) + { + if (relocs[j].r_symndx == i) + { +@@ -1145,7 +1155,7 @@ + BOOL ok = FALSE; + for (j = 0; j < opt.num_excl; j++) + { +- if (memcmp(opt.excl_prefix[j], name, strlen(opt.excl_prefix[j])) == 0) ++ if (strncmp(opt.excl_prefix[j], name, strlen(opt.excl_prefix[j])) == 0) + { + ok = TRUE; + break; +@@ -1160,7 +1170,7 @@ + BOOL ok = FALSE; + for (j = 0; j < opt.num_prefix; j++) + { +- if (memcmp(opt.export_prefix[j], name, strlen(opt.export_prefix[j])) == 0) ++ if (strncmp(opt.export_prefix[j], name, strlen(opt.export_prefix[j])) == 0) + { + ok = TRUE; + break; +@@ -1202,7 +1212,7 @@ + + /* Compute the amount of valid relocations */ + DEBUG_PRINT_RELOCATION_DIRECTIVE_PROLOG(); +- for (i = 0; i < sc.s_nreloc; i++) ++ for (i = 0; i < real_nrelocs; i++) + { + DEBUG_PRINT_RELOCATION_DIRECTIVE(i, relocs); + if (!VALID_RELOC(relocs[i])) +@@ -1278,7 +1288,7 @@ + free(data); + + /* Output the relocations */ +- for (i = 0; i < sc.s_nreloc; i++) ++ for (i = 0; i < real_nrelocs; i++) + { + if (VALID_RELOC(relocs[i])) + fwrite(&relocs[i].r_vaddr, 1, sizeof(relocs[0].r_vaddr), outf); + +diff -ur djlsr205-orig/src/misc.c djlsr205/src/misc.c +--- djlsr205-orig/src/misc.c 2017-04-29 14:32:47.000000000 +0800 ++++ djlsr205/src/misc.c 2017-04-29 14:32:57.000000000 +0800 +@@ -14,7 +14,11 @@ + { + /* MS-DOS uses \, unix uses / */ + if (argc > 2 && strcmp(argv[1], "mkdir") == 0) ++#if defined(__MINGW32__) || defined(__MINGW64__) ++ mkdir(argv[2]); ++#else + mkdir(argv[2], 0777); ++#endif + + /* redirection and long command lines don't always + mix well under MS-DOS */ +diff -ur djlsr205-orig/src/stub/exe2coff.c djlsr205/src/stub/exe2coff.c +--- djlsr205-orig/src/stub/exe2coff.c 2017-04-29 14:32:47.000000000 +0800 ++++ djlsr205/src/stub/exe2coff.c 2017-04-29 14:32:57.000000000 +0800 +@@ -5,10 +5,12 @@ + #include + #include + #include +-#include + #include + #include + ++#if !defined(O_BINARY) ++#define O_BINARY 0 ++#endif + + static void + exe2aout(char *fname) + +--- a/src/makefile.def ++++ b/src/makefile.def +@@ -47,11 +47,12 @@ + + # For building distributed (djgpp) libraries and programs + +-CROSS_GCC = i586-pc-msdosdjgpp-gcc -pipe +-CROSS_AR = i586-pc-msdosdjgpp-ar +-CROSS_AS = i586-pc-msdosdjgpp-as +-CROSS_LD = i586-pc-msdosdjgpp-ld +-CROSS_STRIP = i586-pc-msdosdjgpp-strip ++CROSS_PREFIX = i586-pc-msdosdjgpp- ++CROSS_GCC = $(CROSS_PREFIX)gcc -pipe ++CROSS_AR = $(CROSS_PREFIX)ar ++CROSS_AS = $(CROSS_PREFIX)as ++CROSS_LD = $(CROSS_PREFIX)ld ++CROSS_STRIP = $(CROSS_PREFIX)strip + CROSS_BISON = bison + + # For building programs that *run* during the build (hostbin/*); +diff --git a/src/debug/common/dbgcom.c b/src/debug/common/dbgcom.c +index 77ca122b..1480f27c 100644 +--- a/src/debug/common/dbgcom.c ++++ b/src/debug/common/dbgcom.c +@@ -1338,13 +1338,13 @@ int invalid_sel_addr(short sel, unsigned a, unsigned len, char for_write) + (" \n\ + movw %2,%%ax \n\ + verr %%ax \n\ +- jnz .Ldoes_not_has_read_right \n\ ++ jnz .Ldoes_not_has_read_right%= \n\ + movb $1,%0 \n\ +-.Ldoes_not_has_read_right: \n\ ++.Ldoes_not_has_read_right%=: \n\ + verw %%ax \n\ +- jnz .Ldoes_not_has_write_right \n\ ++ jnz .Ldoes_not_has_write_right%= \n\ + movb $1,%1 \n\ +-.Ldoes_not_has_write_right: " ++.Ldoes_not_has_write_right%=: " + : "=qm" (read_allowed), "=qm" (write_allowed) + : "g" (sel) + ); +diff --git a/src/dxe/makefile b/src/dxe/makefile +index cf715867..b856b9ed 100644 +--- a/src/dxe/makefile ++++ b/src/dxe/makefile +@@ -13,7 +13,8 @@ all :: native \ + $(BIN)/dxe3res.exe \ + $E + +-native :: $(HOSTBIN)/dxegen.exe ++native :: $(HOSTBIN)/dxegen.exe \ ++ $(HOSTBIN)/dxe3res.exe + $(NOP) + + .o.h: +@@ -36,5 +37,8 @@ CROSS_CC = $(word 1,$(CROSS_GCC)) + $(HOSTBIN)/dxegen.exe : dxe3gen.c init1.h init2.h init3.h init4.h init5.h fini1.h fini2.h fini3.h fini4.h fini5.h + $(GCC) -DDXE_LD=\"$(CROSS_LD)\" -DDXE_CC=\"$(CROSS_CC)\" -DDXE_AR=\"$(CROSS_AR)\" -DDXE_AS=\"$(CROSS_AS)\" dxe3gen.c -o $@ + ++$(HOSTBIN)/dxe3res.exe: dxe3res.c ++ $(GCC) -O2 -Wall dxe3res.c -o $@ ++ + clean :: + @-$(MISC) rm *.o *.h $(HOSTBIN)/dxegen.exe +diff --git a/src/makefile b/src/makefile +index f62b70e4..e6f397fd 100644 +--- a/src/makefile ++++ b/src/makefile +@@ -21,7 +21,7 @@ DIRS = \ + ../info \ + ../lib + +-all : misc.exe config $(DIRS) makemake.exe subs ../lib/libg.a ../lib/libpc.a ++all : misc.exe config $(DIRS) makemake.exe subs + + misc.exe : misc.c + gcc -O2 -Wall misc.c -o misc.exe +diff --git a/src/makefile.inc b/src/makefile.inc +index 664fdf9f..09c6f997 100644 +--- a/src/makefile.inc ++++ b/src/makefile.inc +@@ -165,7 +165,7 @@ ifneq ($(MAKEFILE_LIB),1) + all :: makefile.oh + makefile.oh : makefile + @$(MISC) echo - building new response file +- @$(MISC) echo makefile.oh $(addprefix \&/,$(OBJS)) ++ @echo "$(addprefix &/,$(OBJS))" > makefile.oh + endif + + clean :: +diff --git a/src/makefile.lib b/src/makefile.lib +index 3a72a464..a3b5bd1e 100644 +--- a/src/makefile.lib ++++ b/src/makefile.lib +@@ -23,6 +23,7 @@ $(LIB)/lib$(LIBNAME).a : $(OBJS) makefile.rf $(TOP)/../ident.c + ifeq ($(CROSS_BUILD),0) + $(CROSS_AR) q $(LIB)/lib$(LIBNAME).a @makefile.rf id_$(LIBNAME).o + else ++ dos2unix makefile.rf + $(CROSS_AR) q $(LIB)/lib$(LIBNAME).a `cat makefile.rf` id_$(LIBNAME).o + endif + $(CROSS_AR) s $(LIB)/lib$(LIBNAME).a +diff --git a/src/stub/makefile b/src/stub/makefile +index 83de0f1d..fef8ac8f 100644 +--- a/src/stub/makefile ++++ b/src/stub/makefile +@@ -22,6 +22,7 @@ all :: native \ + native :: \ + $(HOSTBIN)/stubedit.exe \ + $(HOSTBIN)/stubify.exe \ ++ $(HOSTBIN)/exe2coff.exe \ + $(INC)/stubinfo.h \ + $E + $(NOP) +@@ -63,10 +64,13 @@ $(BIN)/stubedit.exe : $(C) stubedit.o $(L) + + + $(HOSTBIN)/stubify.exe : stubify.c stub.h +- $(GCC) stubify.c -o $@ ++ $(GCC) -O2 stubify.c -o $@ + + $(HOSTBIN)/stubedit.exe : stubedit.c $(INC)/stubinfo.h +- $(GCC) stubedit.c -o $@ ++ $(GCC) -O2 stubedit.c -o $@ ++ ++$(HOSTBIN)/exe2coff.exe : exe2coff.c ++ $(GCC) -O2 $< -o $@ + + ./stub2inc.exe : stub2inc.c + $(GCC) stub2inc.c -o $@ +diff --git a/src/libc/crt0/crt1.c b/src/libc/crt0/crt1.c +index 1bb6aa55..f0ba9919 100644 +--- a/src/libc/crt0/crt1.c ++++ b/src/libc/crt0/crt1.c +@@ -208,7 +208,7 @@ setup_os_version(void) + _osminor = v & 0xff; + } + +- ++__attribute__((force_align_arg_pointer)) + void + __crt1_startup(void) + { +--- a/src/makefile.cfg ++++ b/src/makefile.cfg +@@ -48,6 +48,7 @@ + @./misc.exe echo - "-Wsign-compare" >>gcc.opt + @./misc.exe echo - "-nostdinc" >>gcc.opt + @./misc.exe echo - "$(IQUOTE)" >>gcc.opt ++ @./misc.exe echo - "-mpreferred-stack-boundary=4" >>gcc.opt + + + gcc-l.opt: makefile.cfg +@@ -58,6 +59,7 @@ + @./misc.exe echo - "-Wall" >>gcc-l.opt + @./misc.exe echo - "-nostdinc" >>gcc-l.opt + @./misc.exe echo - "$(IQUOTE)" >>gcc-l.opt ++ @./misc.exe echo - "-mpreferred-stack-boundary=4" >>gcc.opt + + gpp.opt: gcc.opt + sed -f gpp.sed $< > $@ +--- a/src/libc/ansi/stdlib/nmalloc.c ++++ b/src/libc/ansi/stdlib/nmalloc.c +@@ -1145,6 +1145,7 @@ + return nmalloc(szneed); /* EXIT */ + } + else if ((minit = nmalloc(szneed + XTRA))) { ++ m = MEMBLKp(minit); + /* alignment >= 2*ALIGN and power of 2 if here */ + misalign = (ulong)minit % alignment; + DBGPRTM(" misalignment = %d", misalign); +@@ -1154,9 +1155,10 @@ + } + else { + /* two or more chunks to release */ +- /* for now, just return NULL and have a leak */ + DBGPRTM(" Complex case, release multiple chunks"); + DBGEOLN; ++ nfree(PTR(split(&m, alignment - misalign))); ++ return nrealloc(PTR(m), size); + } + } /* alignment > ALIGN */ + } /* valid parameters */ diff --git a/patch/patch-avarice-2.13.txt b/patch/patch-avarice-2.13.txt new file mode 100644 index 00000000..53573b13 --- /dev/null +++ b/patch/patch-avarice-2.13.txt @@ -0,0 +1,35 @@ +Description: Fix FTBFS for GCC 5 +Author: Tobias Frost +Bug: https://sourceforge.net/p/avarice/patches/34/ +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777789 +Last-Update: 2015-05-18 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/pragma.h ++++ b/src/pragma.h +@@ -28,9 +28,10 @@ + */ + #if defined(__GNUC__) + # if __GNUC__ > 4 +-# define PRAGMA_DIAG_PUSH _Pragma(GCC diagnostic push) +-# define PRAGMA_DIAG_POP _Pragma(GCC diagnostic pop) +-# define PRAGMA_DIAG_IGNORED(x) _Pragma(GCC diagnostic ignored x) ++# define PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push") ++# define PRAGMA_DIAG_POP _Pragma("GCC diagnostic pop") ++# define PRAGMA_(x) _Pragma(#x) ++# define PRAGMA_DIAG_IGNORED(x) PRAGMA_(GCC diagnostic ignored x) + # elif __GNUC__ == 4 + # if __GNUC_MINOR__ >= 6 + # define PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push") + +--- a/src/jtagrw.cc 2018-06-27 21:49:14 UTC ++++ b/src/jtagrw.cc +@@ -131,7 +131,7 @@ uchar *jtag1::jtagRead(unsigned long add + else + numLocations = (numBytes + 1) / 2; + if (numLocations > 256) +- return false; ++ return NULL; + + command[1] = whichSpace; + command[2] = numLocations - 1; diff --git a/patch/patch-binutils-2.33.1-swap.txt b/patch/patch-binutils-2.33.1-swap.txt new file mode 100644 index 00000000..497d4da3 --- /dev/null +++ b/patch/patch-binutils-2.33.1-swap.txt @@ -0,0 +1,46 @@ +--- swap.original.h 2020-02-04 01:52:21.137081500 +0100 ++++ swap.h 2020-02-04 01:53:00.090081500 +0100 +@@ -23,18 +23,14 @@ + #include "config.h" + #include + +-#ifdef HAVE_BYTESWAP_H +-#include +-#else +- + /* Provide our own versions of the byteswap functions. */ +-inline uint16_t ++static inline uint16_t + bswap_16 (uint16_t v) + { + return ((v >> 8) & 0xff) | ((v & 0xff) << 8); + } + +-inline uint32_t ++static inline uint32_t + bswap_32 (uint32_t v) + { + return ( ((v & 0xff000000) >> 24) +@@ -43,13 +39,13 @@ + | ((v & 0x000000ff) << 24)); + } + +-inline uint64_t ++static inline uint64_t + bswap_identity_64 (uint64_t v) + { + return v; + } + +-inline uint64_t ++static inline uint64_t + bswap_64 (uint64_t v) + { + return ( ((v & 0xff00000000000000ULL) >> 56) +@@ -61,6 +57,5 @@ + | ((v & 0x000000000000ff00ULL) << 40) + | ((v & 0x00000000000000ffULL) << 56)); + } +-#endif /* !defined(HAVE_BYTESWAP_H) */ + + #endif /* !defined(_CTF_SWAP_H) */ diff --git a/patch/patch-binutils-2.34-swap.txt b/patch/patch-binutils-2.34-swap.txt new file mode 100644 index 00000000..d69d9e86 --- /dev/null +++ b/patch/patch-binutils-2.34-swap.txt @@ -0,0 +1,20 @@ +--- swap.original.h 2020-02-04 01:56:36.717929400 +0100 ++++ swap.h 2020-02-04 01:57:35.702827300 +0100 +@@ -23,10 +23,6 @@ + #include "config.h" + #include + +-#ifdef HAVE_BYTESWAP_H +-#include +-#else +- + /* Provide our own versions of the byteswap functions. */ + static inline uint16_t + bswap_16 (uint16_t v) +@@ -61,6 +57,5 @@ + | ((v & 0x000000000000ff00ULL) << 40) + | ((v & 0x00000000000000ffULL) << 56)); + } +-#endif /* !defined(HAVE_BYTESWAP_H) */ + + #endif /* !defined(_CTF_SWAP_H) */ diff --git a/patch/patch-djlsr205.txt b/patch/patch-djlsr205.txt deleted file mode 100644 index 14b375b9..00000000 --- a/patch/patch-djlsr205.txt +++ /dev/null @@ -1,160 +0,0 @@ -diff -ur djlsr205-orig/src/dxe/dxe3gen.c djlsr205/src/dxe/dxe3gen.c ---- djlsr205-orig/src/dxe/dxe3gen.c 2017-04-29 14:32:47.000000000 +0800 -+++ djlsr205/src/dxe/dxe3gen.c 2017-04-29 14:33:27.000000000 +0800 -@@ -193,7 +193,7 @@ - #include "../../include/sys/dxe.h" - #include "../../include/coff.h" - --#define VERSION "1.0.3" -+#define VERSION "1.0.4" - - #define TEMP_BASE "dxe_tmp" /* 7 chars, 1 char suffix */ - #define TEMP_O_FILE TEMP_BASE".o" -@@ -937,6 +937,7 @@ - char *strings; - RELOC *relocs; - unsigned int i, j, errcount; -+ ULONG32 real_nrelocs; - size_t hdrsize; - - /* Exported symbols table */ -@@ -985,9 +986,18 @@ - strings[0] = 0; - - /* Read the relocation table */ -- relocs = (RELOC *)malloc(sc.s_nreloc * sizeof(RELOC)); - fseek(inf, sc.s_relptr, SEEK_SET); -- fread(relocs, RELSZ, sc.s_nreloc, inf); -+ if (sc.s_flags & STYP_NRELOC_OVFL) { -+ fread(&real_nrelocs, 4, 1, inf); /* read r_vaddr */ -+ fseek(inf, RELSZ - 4, SEEK_CUR); /* skip the rest */ -+ dh.nrelocs = --real_nrelocs; /* lose the '+1' */ -+ if (opt.verbose) -+ printf("%s: real nrelocs: %lu\n", progname, (unsigned long)real_nrelocs); -+ } else { -+ real_nrelocs = dh.nrelocs; -+ } -+ relocs = (RELOC *)malloc(real_nrelocs * sizeof(RELOC)); -+ fread(relocs, RELSZ, real_nrelocs, inf); - - /* Close input file */ - fclose(inf); -@@ -1042,7 +1052,7 @@ - int n_abs_relocs = 0, n_rel_relocs = 0; - - /* count the amount of relocations pointing to this symbol */ -- for (j = 0; j < sc.s_nreloc; j++) -+ for (j = 0; j < real_nrelocs; j++) - { - if (relocs[j].r_symndx == i) - { -@@ -1101,7 +1111,7 @@ - - unres_size = newsize; - -- for (j = 0; j < sc.s_nreloc; j++) -+ for (j = 0; j < real_nrelocs; j++) - { - if (relocs[j].r_symndx == i) - { -@@ -1145,7 +1155,7 @@ - BOOL ok = FALSE; - for (j = 0; j < opt.num_excl; j++) - { -- if (memcmp(opt.excl_prefix[j], name, strlen(opt.excl_prefix[j])) == 0) -+ if (strncmp(opt.excl_prefix[j], name, strlen(opt.excl_prefix[j])) == 0) - { - ok = TRUE; - break; -@@ -1160,7 +1170,7 @@ - BOOL ok = FALSE; - for (j = 0; j < opt.num_prefix; j++) - { -- if (memcmp(opt.export_prefix[j], name, strlen(opt.export_prefix[j])) == 0) -+ if (strncmp(opt.export_prefix[j], name, strlen(opt.export_prefix[j])) == 0) - { - ok = TRUE; - break; -@@ -1202,7 +1212,7 @@ - - /* Compute the amount of valid relocations */ - DEBUG_PRINT_RELOCATION_DIRECTIVE_PROLOG(); -- for (i = 0; i < sc.s_nreloc; i++) -+ for (i = 0; i < real_nrelocs; i++) - { - DEBUG_PRINT_RELOCATION_DIRECTIVE(i, relocs); - if (!VALID_RELOC(relocs[i])) -@@ -1278,7 +1288,7 @@ - free(data); - - /* Output the relocations */ -- for (i = 0; i < sc.s_nreloc; i++) -+ for (i = 0; i < real_nrelocs; i++) - { - if (VALID_RELOC(relocs[i])) - fwrite(&relocs[i].r_vaddr, 1, sizeof(relocs[0].r_vaddr), outf); -diff -ur djlsr205-orig/src/makefile djlsr205/src/makefile ---- djlsr205-orig/src/makefile 2017-04-29 14:32:47.000000000 +0800 -+++ djlsr205/src/makefile 2017-04-29 14:32:57.000000000 +0800 -@@ -40,17 +40,18 @@ - $(MAKE) -C stub native - $(MAKE) -C utils native - $(MAKE) -C dxe native -- $(MAKE) -C mkdoc -- $(MAKE) -C libc -- $(MAKE) -C debug -- $(MAKE) -C djasm -- $(MAKE) -C stub -- $(MAKE) -C dxe -- $(MAKE) -C libemu -- $(MAKE) -C libm -- $(MAKE) -C utils -- $(MAKE) -C docs -- -$(MAKE) -C ../zoneinfo/src -+ $(MAKE) -C dxe -f makefile.dxe -+ #$(MAKE) -C mkdoc -+ #$(MAKE) -C libc -+ #$(MAKE) -C debug -+ #$(MAKE) -C djasm -+ #$(MAKE) -C stub -+ #$(MAKE) -C dxe -+ #$(MAKE) -C libemu -+ #$(MAKE) -C libm -+ #$(MAKE) -C utils -+ #$(MAKE) -C docs -+ #-$(MAKE) -C ../zoneinfo/src - $(MAKE) -f makempty - - .PHONY : clean -diff -ur djlsr205-orig/src/misc.c djlsr205/src/misc.c ---- djlsr205-orig/src/misc.c 2017-04-29 14:32:47.000000000 +0800 -+++ djlsr205/src/misc.c 2017-04-29 14:32:57.000000000 +0800 -@@ -14,7 +14,11 @@ - { - /* MS-DOS uses \, unix uses / */ - if (argc > 2 && strcmp(argv[1], "mkdir") == 0) -+#if defined(__MINGW32__) || defined(__MINGW64__) -+ _mkdir(argv[2]); -+#else - mkdir(argv[2], 0777); -+#endif - - /* redirection and long command lines don't always - mix well under MS-DOS */ -diff -ur djlsr205-orig/src/stub/exe2coff.c djlsr205/src/stub/exe2coff.c ---- djlsr205-orig/src/stub/exe2coff.c 2017-04-29 14:32:47.000000000 +0800 -+++ djlsr205/src/stub/exe2coff.c 2017-04-29 14:32:57.000000000 +0800 -@@ -5,10 +5,12 @@ - #include - #include - #include --#include - #include - #include - -+#if !defined(O_BINARY) -+#define O_BINARY 0 -+#endif - - static void - exe2aout(char *fname) diff --git a/patch/patch-gcc-ia16.txt b/patch/patch-gcc-ia16.txt new file mode 100644 index 00000000..bcdb65ff --- /dev/null +++ b/patch/patch-gcc-ia16.txt @@ -0,0 +1,15 @@ +diff --git a/gcc/opts.c b/gcc/opts.c +index 0f9431a0b..91af66f98 100644 +--- a/gcc/opts.c ++++ b/gcc/opts.c +@@ -2340,8 +2340,8 @@ set_debug_level (enum debug_info_type type, int extended, const char *arg, + #endif + } + +- if (opts->x_write_symbols == NO_DEBUG) +- warning_at (loc, 0, "target system does not support debug output"); ++// if (opts->x_write_symbols == NO_DEBUG) ++// warning_at (loc, 0, "target system does not support debug output"); + } + } + else diff --git a/patch/patch-unpack-gcc-4.7.3.txt b/patch/patch-unpack-gcc-4.7.3.txt new file mode 100644 index 00000000..99d089e4 --- /dev/null +++ b/patch/patch-unpack-gcc-4.7.3.txt @@ -0,0 +1,36 @@ +--- a/unpack-gcc.sh 2020-02-03 21:15:48.960456100 +0100 ++++ b/unpack-gcc.sh 2020-02-03 21:16:16.080456100 +0100 +@@ -31,24 +31,6 @@ + esac + done + +-archive=${1-gcc-$gcc_version.tar.bz2} +- +-if test "$tar_param" = "xf" ; then +- echo "Failed to detect how to decompress $archive" +- exit 1 +-fi +- +-rm -rf gnu +-mkdir gnu +- +-rm -f $top/s-sources +-( cd gnu && tar xf $top/$archive --use=`case $archive in *.gz|*.tgz) echo 'gzip';; *.bz2) echo 'bzip2';; *.xz) echo 'xz';; esac` && echo $archive >$top/s-sources ) +- +-if ! [ -f s-sources ] ; then +- echo "Cannot unpack GCC sources" +- exit 1 +-fi +- + orig_dir_name=`(cd gnu && ls -d gcc* | sed 1q; )` + + base_ver=$(cat gnu/$orig_dir_name/gcc/BASE-VER) +@@ -70,7 +52,7 @@ + short_ver_2=${short_ver_2}-$datestamp + fi + +-dir_name=gcc-$short_ver ++dir_name=gcc-$gcc_version + + if ! test "$dir_name" = "$orig_dir_name" ; then + mv -f gnu/$orig_dir_name gnu/$dir_name || exit 1 diff --git a/patch/patch-unpack-gcc-4.8.0.txt b/patch/patch-unpack-gcc-4.8.0.txt new file mode 100644 index 00000000..491f5b9e --- /dev/null +++ b/patch/patch-unpack-gcc-4.8.0.txt @@ -0,0 +1,41 @@ +--- a/unpack-gcc.sh 2020-02-03 21:17:50.083456100 +0100 ++++ b/unpack-gcc.sh 2020-02-03 21:18:18.017456100 +0100 +@@ -31,29 +31,6 @@ + esac + done + +-archive=${1-gcc-$gcc_version.tar.bz2} +- +-# +-# Detect required tar command line parameters for unpacking source archice +-# +-tar_param=xf`case $archive in *.gz|*.tgz) echo 'z';; *.bz2) echo 'j';; *.xz) echo 'J';; esac` +- +-if test "$tar_param" = "xf" ; then +- echo "Failed to detect how to decompress $archive" +- exit 1 +-fi +- +-rm -rf gnu +-mkdir gnu +- +-rm -f $top/s-sources +-( cd gnu && tar $tar_param $top/$archive && echo $archive >$top/s-sources ) +- +-if ! [ -f s-sources ] ; then +- echo "Cannot unpack GCC sources" +- exit 1 +-fi +- + orig_dir_name=`(cd gnu && ls -d gcc* | sed 1q; )` + + base_ver=$(cat gnu/$orig_dir_name/gcc/BASE-VER) +@@ -75,7 +52,7 @@ + short_ver_2=${short_ver_2}-$datestamp + fi + +-dir_name=gcc-$short_ver ++dir_name=gcc-$gcc_version + + if ! test "$dir_name" = "$orig_dir_name" ; then + mv -f gnu/$orig_dir_name gnu/$dir_name || exit 1 diff --git a/patch/patch-unpack-gcc.txt b/patch/patch-unpack-gcc.txt new file mode 100644 index 00000000..9282a2b8 --- /dev/null +++ b/patch/patch-unpack-gcc.txt @@ -0,0 +1,44 @@ +--- a/unpack-gcc.sh ++++ b/unpack-gcc.sh +@@ -33,32 +33,6 @@ + esac + done + +-archive=${1-gcc-$gcc_version.tar.bz2} +- +-# +-# Detect required tar command line parameters for unpacking source archice +-# +-tar_param=`case $archive in *.gz|*.tgz) echo '--use=gzip' ;; +- *.bz2) echo '--use=bzip2' ;; +- *.xz) echo '--use=xz' ;; +-esac` +- +-if test "$tar_param" = "" ; then +- echo "Failed to detect how to decompress $archive" +- exit 1 +-fi +- +-rm -rf gnu +-mkdir gnu +- +-rm -f $top/s-sources +-( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) +- +-if ! [ -f s-sources ] ; then +- echo "Cannot unpack GCC sources" +- exit 1 +-fi +- + orig_dir_name=`(cd gnu && ls -d gcc* | sed 1q; )` + + base_ver=$(cat gnu/$orig_dir_name/gcc/BASE-VER) +@@ -80,7 +54,7 @@ + short_ver_2=${short_ver_2}-$datestamp + fi + +-dir_name=gcc-$short_ver ++dir_name=gcc-$gcc_version + + if ! test "$dir_name" = "$orig_dir_name" ; then + mv -f gnu/$orig_dir_name gnu/$dir_name || exit 1 diff --git a/patch/watt32-djgpp-205/djgpp.err b/patch/watt32-djgpp-205/djgpp.err new file mode 100644 index 00000000..22868933 --- /dev/null +++ b/patch/watt32-djgpp-205/djgpp.err @@ -0,0 +1,116 @@ +#ifndef __SYS_WERRNO_ERR +#define __SYS_WERRNO_ERR + +/* + * THIS FILE WAS GENERATED BY %WATT_ROOT%\c:/dj_err.exe + * at Fri Jun 30 23:24:47 2023. + * DO NOT EDIT. + * + * Watt-32 errnos are after vendor's errnos (1 - 41) + */ + +#ifndef __DJGPP__ +#error This file is only for use by "__DJGPP__" +#endif + +#define ERRNO_VENDOR_VERSION "2.05" + +#define EDOM 1 +#define ERANGE 2 +#define E2BIG 3 +#define EACCES 4 +#define EAGAIN 5 +#define EBADF 6 +#define EBUSY 7 +#define ECHILD 8 +#define EDEADLK 9 +#define EEXIST 10 +#define EFAULT 11 +#define EFBIG 12 +#define EINTR 13 +#define EINVAL 14 +#define EIO 15 +#define EISDIR 16 +#define EMFILE 17 +#define EMLINK 18 +#define ENAMETOOLONG 19 +#define ENFILE 20 +#define ENODEV 21 +#define ENOENT 22 +#define ENOEXEC 23 +#define ENOLCK 24 +#define ENOMEM 25 +#define ENOSPC 26 +#define ENOSYS 27 +#define ENOTDIR 28 +#define ENOTEMPTY 29 +#define ENOTTY 30 +#define ENXIO 31 +#define EPERM 32 +#define EPIPE 33 +#define EROFS 34 +#define ESPIPE 35 +#define ESRCH 36 +#define EXDEV 37 +#define ENMFILE 38 +#define ELOOP 39 +#define EOVERFLOW 40 +#define EILSEQ 41 +#define EWOULDBLOCK 42 +#define EINPROGRESS 43 +#define EALREADY 44 +#define ENOTSOCK 45 +#define EDESTADDRREQ 46 +#define EMSGSIZE 47 +#define EPROTOTYPE 48 +#define ENOPROTOOPT 49 +#define EPROTONOSUPPORT 50 +#define ESOCKTNOSUPPORT 51 +#define EOPNOTSUPP 52 +#define EPFNOSUPPORT 53 +#define EAFNOSUPPORT 54 +#define EADDRINUSE 55 +#define EADDRNOTAVAIL 56 +#define ENETDOWN 57 +#define ENETUNREACH 58 +#define ENETRESET 59 +#define ECONNABORTED 60 +#define ECONNRESET 61 +#define ENOBUFS 62 +#define EISCONN 63 +#define ENOTCONN 64 +#define ESHUTDOWN 65 +#define ETIMEDOUT 66 +#define ECONNREFUSED 67 +#define EHOSTDOWN 68 +#define EHOSTUNREACH 69 +#define ESTALE 70 +#define EREMOTE 71 +#define EBADRPC 72 +#define ERPCMISMATCH 73 +#define EPROGUNAVAIL 74 +#define EPROGMISMATCH 75 +#define EPROCUNAVAIL 76 +#define EINVFNC 77 +#define ENOPATH 78 +#define ECONTR 79 +#define EINVMEM 80 +#define EINVENV 81 +#define EINVFMT 82 +#define EINVACC 83 +#define EINVDAT 84 +#define EDEADLOCK 85 +#define ECURDIR 86 +#define ENOTSAM 87 +#define ETXTBSY 88 +#define ENOTBLK 89 +#define EUCLEAN 90 +#define ETOOMANYREFS 91 +#define EPROCLIM 92 +#define EUSERS 93 +#define EDQUOT 94 +#define EVDBAD 95 +#define ENORMTWD 96 +#define ECANCELED 97 + +#endif /* __SYS_WERRNO_ERR */ diff --git a/patch/watt32-djgpp-205/syserr.c b/patch/watt32-djgpp-205/syserr.c new file mode 100644 index 00000000..53218916 --- /dev/null +++ b/patch/watt32-djgpp-205/syserr.c @@ -0,0 +1,134 @@ +/* + * THIS FILE WAS GENERATED BY %WATT_ROOT%\c:/dj_err.exe + * at Fri Jun 30 23:24:49 2023. + * DO NOT EDIT. + * + * The Watt-32 'sys_errlist[]' that replaces vendor's 'sys_errlist[]' + */ + +#ifndef __DJGPP__ +#error This file is only for use by "__DJGPP__" +#endif + +char __syserr000[] = "Unknown error"; +char __syserr001[] = "Input to function out of range (EDOM)"; +char __syserr002[] = "Output of function out of range (ERANGE)"; +char __syserr003[] = "Argument list too long (E2BIG)"; +char __syserr004[] = "Permission denied (EACCES)"; +char __syserr005[] = "Resource temporarily unavailable (EAGAIN)"; +char __syserr006[] = "Bad file descriptor (EBADF)"; +char __syserr007[] = "Resource busy (EBUSY)"; +char __syserr008[] = "No child processes (ECHILD)"; +char __syserr009[] = "Resource deadlock avoided (EDEADLK)"; +char __syserr010[] = "File exists (EEXIST)"; +char __syserr011[] = "Bad address (EFAULT)"; +char __syserr012[] = "File too large (EFBIG)"; +char __syserr013[] = "Interrupted system call (EINTR)"; +char __syserr014[] = "Invalid argument (EINVAL)"; +char __syserr015[] = "Input or output error (EIO)"; +char __syserr016[] = "Is a directory (EISDIR)"; +char __syserr017[] = "Too many open files (EMFILE)"; +char __syserr018[] = "Too many links (EMLINK)"; +char __syserr019[] = "File name too long (ENAMETOOLONG)"; +char __syserr020[] = "Too many open files in system (ENFILE)"; +char __syserr021[] = "No such device (ENODEV)"; +char __syserr022[] = "No such file or directory (ENOENT)"; +char __syserr023[] = "Unable to execute file (ENOEXEC)"; +char __syserr024[] = "No locks available (ENOLCK)"; +char __syserr025[] = "Not enough memory (ENOMEM)"; +char __syserr026[] = "No space left on drive (ENOSPC)"; +char __syserr027[] = "Function not implemented (ENOSYS)"; +char __syserr028[] = "Not a directory (ENOTDIR)"; +char __syserr029[] = "Directory not empty (ENOTEMPTY)"; +char __syserr030[] = "Inappropriate I/O control operation (ENOTTY)"; +char __syserr031[] = "No such device or address (ENXIO)"; +char __syserr032[] = "Operation not permitted (EPERM)"; +char __syserr033[] = "Broken pipe (EPIPE)"; +char __syserr034[] = "Read-only file system (EROFS)"; +char __syserr035[] = "Invalid seek (ESPIPE)"; +char __syserr036[] = "No such process (ESRCH)"; +char __syserr037[] = "Improper link (EXDEV)"; +char __syserr038[] = "No more files (ENMFILE)"; +char __syserr039[] = "Too many levels of symbolic links (ELOOP)"; +char __syserr040[] = "Value too large (EOVERFLOW)"; +char __syserr041[] = "Invalid or incomplete multibyte or wide character (EILSEQ)"; +char __syserr042[] = "Operation would block (EWOULDBLOCK)"; +char __syserr043[] = "Operation now in progress (EINPROGRESS)"; +char __syserr044[] = "Operation already in progress (EALREADY)"; +char __syserr045[] = "Socket operation on non-socket (ENOTSOCK)"; +char __syserr046[] = "Destination address required (EDESTADDRREQ)"; +char __syserr047[] = "Message too long (EMSGSIZE)"; +char __syserr048[] = "Protocol wrong type for socket (EPROTOTYPE)"; +char __syserr049[] = "Protocol option not available (ENOPROTOOPT)"; +char __syserr050[] = "Protocol not supported (EPROTONOSUPPORT)"; +char __syserr051[] = "Socket type not supported (ESOCKTNOSUPPORT)"; +char __syserr052[] = "Operation not supported on socket (EOPNOTSUPP)"; +char __syserr053[] = "Protocol family not supported (EPFNOSUPPORT)"; +char __syserr054[] = "Address family not supported by protocol (EAFNOSUPPORT)"; +char __syserr055[] = "Address already in use (EADDRINUSE)"; +char __syserr056[] = "Can't assign requested address (EADDRNOTAVAIL)"; +char __syserr057[] = "Network is down (ENETDOWN)"; +char __syserr058[] = "Network is unreachable (ENETUNREACH)"; +char __syserr059[] = "Network dropped connection on reset (ENETRESET)"; +char __syserr060[] = "Software caused connection abort (ECONNABORTED)"; +char __syserr061[] = "Connection reset by peer (ECONNRESET)"; +char __syserr062[] = "No buffer space available (ENOBUFS)"; +char __syserr063[] = "Socket is already connected (EISCONN)"; +char __syserr064[] = "Socket is not connected (ENOTCONN)"; +char __syserr065[] = "Can't send after socket shutdown (ESHUTDOWN)"; +char __syserr066[] = "Connection timed out (ETIMEDOUT)"; +char __syserr067[] = "Connection refused (ECONNREFUSED)"; +char __syserr068[] = "Host is down (EHOSTDOWN)"; +char __syserr069[] = "No route to host (EHOSTUNREACH)"; +char __syserr070[] = "Stale NFS file handle (ESTALE)"; +char __syserr071[] = "Too many levels of remote in path (EREMOTE)"; +char __syserr072[] = "RPC struct is bad (EBADRPC)"; +char __syserr073[] = "RPC version wrong (ERPCMISMATCH)"; +char __syserr074[] = "RPC prog. not avail (EPROGUNAVAIL)"; +char __syserr075[] = "RPC Program version wrong (EPROGMISMATCH)"; +char __syserr076[] = "Bad procedure for program (EPROCUNAVAIL)"; +char __syserr077[] = "Invalid function number (EINVFNC)"; +char __syserr078[] = "Path not found (ENOPATH)"; +char __syserr079[] = "Memory area destroyed (ECONTR)"; +char __syserr080[] = "Invalid memory block address (EINVMEM)"; +char __syserr081[] = "Invalid environment (EINVENV)"; +char __syserr082[] = "Invalid format (EINVFMT)"; +char __syserr083[] = "Invalid access code (EINVACC)"; +char __syserr084[] = "Invalid data (EINVDAT)"; +char __syserr085[] = "Locking violation (EDEADLOCK)"; +char __syserr086[] = "Attempt to remove current directory (ECURDIR)"; +char __syserr087[] = "Not same device (ENOTSAM)"; +char __syserr088[] = "Text file busy (ETXTBSY)"; +char __syserr089[] = "Block device required (ENOTBLK)"; +char __syserr090[] = "Structure needs cleaning (EUCLEAN)"; +char __syserr091[] = "Too many references (ETOOMANYREFS)"; +char __syserr092[] = "Too many processes (EPROCLIM)"; +char __syserr093[] = "Too many users (EUSERS)"; +char __syserr094[] = "Disc quota exceeded (EDQUOT)"; +char __syserr095[] = "RVD related disk error (EVDBAD)"; +char __syserr096[] = "Out of remote working directory stuctures (ENORMTWD)"; +char __syserr097[] = "Operation canceled (ECANCELED)"; + +char *SYS_ERRLIST[] = { + __syserr000, __syserr001, __syserr002, __syserr003, __syserr004, + __syserr005, __syserr006, __syserr007, __syserr008, __syserr009, + __syserr010, __syserr011, __syserr012, __syserr013, __syserr014, + __syserr015, __syserr016, __syserr017, __syserr018, __syserr019, + __syserr020, __syserr021, __syserr022, __syserr023, __syserr024, + __syserr025, __syserr026, __syserr027, __syserr028, __syserr029, + __syserr030, __syserr031, __syserr032, __syserr033, __syserr034, + __syserr035, __syserr036, __syserr037, __syserr038, __syserr039, + __syserr040, __syserr041, __syserr042, __syserr043, __syserr044, + __syserr045, __syserr046, __syserr047, __syserr048, __syserr049, + __syserr050, __syserr051, __syserr052, __syserr053, __syserr054, + __syserr055, __syserr056, __syserr057, __syserr058, __syserr059, + __syserr060, __syserr061, __syserr062, __syserr063, __syserr064, + __syserr065, __syserr066, __syserr067, __syserr068, __syserr069, + __syserr070, __syserr071, __syserr072, __syserr073, __syserr074, + __syserr075, __syserr076, __syserr077, __syserr078, __syserr079, + __syserr080, __syserr081, __syserr082, __syserr083, __syserr084, + __syserr085, __syserr086, __syserr087, __syserr088, __syserr089, + __syserr090, __syserr091, __syserr092, __syserr093, __syserr094, + __syserr095, __syserr096, __syserr097, +}; + diff --git a/patch/watt32-djgpp-cvs/djgpp.err b/patch/watt32-djgpp-cvs/djgpp.err new file mode 100644 index 00000000..22868933 --- /dev/null +++ b/patch/watt32-djgpp-cvs/djgpp.err @@ -0,0 +1,116 @@ +#ifndef __SYS_WERRNO_ERR +#define __SYS_WERRNO_ERR + +/* + * THIS FILE WAS GENERATED BY %WATT_ROOT%\c:/dj_err.exe + * at Fri Jun 30 23:24:47 2023. + * DO NOT EDIT. + * + * Watt-32 errnos are after vendor's errnos (1 - 41) + */ + +#ifndef __DJGPP__ +#error This file is only for use by "__DJGPP__" +#endif + +#define ERRNO_VENDOR_VERSION "2.05" + +#define EDOM 1 +#define ERANGE 2 +#define E2BIG 3 +#define EACCES 4 +#define EAGAIN 5 +#define EBADF 6 +#define EBUSY 7 +#define ECHILD 8 +#define EDEADLK 9 +#define EEXIST 10 +#define EFAULT 11 +#define EFBIG 12 +#define EINTR 13 +#define EINVAL 14 +#define EIO 15 +#define EISDIR 16 +#define EMFILE 17 +#define EMLINK 18 +#define ENAMETOOLONG 19 +#define ENFILE 20 +#define ENODEV 21 +#define ENOENT 22 +#define ENOEXEC 23 +#define ENOLCK 24 +#define ENOMEM 25 +#define ENOSPC 26 +#define ENOSYS 27 +#define ENOTDIR 28 +#define ENOTEMPTY 29 +#define ENOTTY 30 +#define ENXIO 31 +#define EPERM 32 +#define EPIPE 33 +#define EROFS 34 +#define ESPIPE 35 +#define ESRCH 36 +#define EXDEV 37 +#define ENMFILE 38 +#define ELOOP 39 +#define EOVERFLOW 40 +#define EILSEQ 41 +#define EWOULDBLOCK 42 +#define EINPROGRESS 43 +#define EALREADY 44 +#define ENOTSOCK 45 +#define EDESTADDRREQ 46 +#define EMSGSIZE 47 +#define EPROTOTYPE 48 +#define ENOPROTOOPT 49 +#define EPROTONOSUPPORT 50 +#define ESOCKTNOSUPPORT 51 +#define EOPNOTSUPP 52 +#define EPFNOSUPPORT 53 +#define EAFNOSUPPORT 54 +#define EADDRINUSE 55 +#define EADDRNOTAVAIL 56 +#define ENETDOWN 57 +#define ENETUNREACH 58 +#define ENETRESET 59 +#define ECONNABORTED 60 +#define ECONNRESET 61 +#define ENOBUFS 62 +#define EISCONN 63 +#define ENOTCONN 64 +#define ESHUTDOWN 65 +#define ETIMEDOUT 66 +#define ECONNREFUSED 67 +#define EHOSTDOWN 68 +#define EHOSTUNREACH 69 +#define ESTALE 70 +#define EREMOTE 71 +#define EBADRPC 72 +#define ERPCMISMATCH 73 +#define EPROGUNAVAIL 74 +#define EPROGMISMATCH 75 +#define EPROCUNAVAIL 76 +#define EINVFNC 77 +#define ENOPATH 78 +#define ECONTR 79 +#define EINVMEM 80 +#define EINVENV 81 +#define EINVFMT 82 +#define EINVACC 83 +#define EINVDAT 84 +#define EDEADLOCK 85 +#define ECURDIR 86 +#define ENOTSAM 87 +#define ETXTBSY 88 +#define ENOTBLK 89 +#define EUCLEAN 90 +#define ETOOMANYREFS 91 +#define EPROCLIM 92 +#define EUSERS 93 +#define EDQUOT 94 +#define EVDBAD 95 +#define ENORMTWD 96 +#define ECANCELED 97 + +#endif /* __SYS_WERRNO_ERR */ diff --git a/patch/watt32-djgpp-cvs/syserr.c b/patch/watt32-djgpp-cvs/syserr.c new file mode 100644 index 00000000..53218916 --- /dev/null +++ b/patch/watt32-djgpp-cvs/syserr.c @@ -0,0 +1,134 @@ +/* + * THIS FILE WAS GENERATED BY %WATT_ROOT%\c:/dj_err.exe + * at Fri Jun 30 23:24:49 2023. + * DO NOT EDIT. + * + * The Watt-32 'sys_errlist[]' that replaces vendor's 'sys_errlist[]' + */ + +#ifndef __DJGPP__ +#error This file is only for use by "__DJGPP__" +#endif + +char __syserr000[] = "Unknown error"; +char __syserr001[] = "Input to function out of range (EDOM)"; +char __syserr002[] = "Output of function out of range (ERANGE)"; +char __syserr003[] = "Argument list too long (E2BIG)"; +char __syserr004[] = "Permission denied (EACCES)"; +char __syserr005[] = "Resource temporarily unavailable (EAGAIN)"; +char __syserr006[] = "Bad file descriptor (EBADF)"; +char __syserr007[] = "Resource busy (EBUSY)"; +char __syserr008[] = "No child processes (ECHILD)"; +char __syserr009[] = "Resource deadlock avoided (EDEADLK)"; +char __syserr010[] = "File exists (EEXIST)"; +char __syserr011[] = "Bad address (EFAULT)"; +char __syserr012[] = "File too large (EFBIG)"; +char __syserr013[] = "Interrupted system call (EINTR)"; +char __syserr014[] = "Invalid argument (EINVAL)"; +char __syserr015[] = "Input or output error (EIO)"; +char __syserr016[] = "Is a directory (EISDIR)"; +char __syserr017[] = "Too many open files (EMFILE)"; +char __syserr018[] = "Too many links (EMLINK)"; +char __syserr019[] = "File name too long (ENAMETOOLONG)"; +char __syserr020[] = "Too many open files in system (ENFILE)"; +char __syserr021[] = "No such device (ENODEV)"; +char __syserr022[] = "No such file or directory (ENOENT)"; +char __syserr023[] = "Unable to execute file (ENOEXEC)"; +char __syserr024[] = "No locks available (ENOLCK)"; +char __syserr025[] = "Not enough memory (ENOMEM)"; +char __syserr026[] = "No space left on drive (ENOSPC)"; +char __syserr027[] = "Function not implemented (ENOSYS)"; +char __syserr028[] = "Not a directory (ENOTDIR)"; +char __syserr029[] = "Directory not empty (ENOTEMPTY)"; +char __syserr030[] = "Inappropriate I/O control operation (ENOTTY)"; +char __syserr031[] = "No such device or address (ENXIO)"; +char __syserr032[] = "Operation not permitted (EPERM)"; +char __syserr033[] = "Broken pipe (EPIPE)"; +char __syserr034[] = "Read-only file system (EROFS)"; +char __syserr035[] = "Invalid seek (ESPIPE)"; +char __syserr036[] = "No such process (ESRCH)"; +char __syserr037[] = "Improper link (EXDEV)"; +char __syserr038[] = "No more files (ENMFILE)"; +char __syserr039[] = "Too many levels of symbolic links (ELOOP)"; +char __syserr040[] = "Value too large (EOVERFLOW)"; +char __syserr041[] = "Invalid or incomplete multibyte or wide character (EILSEQ)"; +char __syserr042[] = "Operation would block (EWOULDBLOCK)"; +char __syserr043[] = "Operation now in progress (EINPROGRESS)"; +char __syserr044[] = "Operation already in progress (EALREADY)"; +char __syserr045[] = "Socket operation on non-socket (ENOTSOCK)"; +char __syserr046[] = "Destination address required (EDESTADDRREQ)"; +char __syserr047[] = "Message too long (EMSGSIZE)"; +char __syserr048[] = "Protocol wrong type for socket (EPROTOTYPE)"; +char __syserr049[] = "Protocol option not available (ENOPROTOOPT)"; +char __syserr050[] = "Protocol not supported (EPROTONOSUPPORT)"; +char __syserr051[] = "Socket type not supported (ESOCKTNOSUPPORT)"; +char __syserr052[] = "Operation not supported on socket (EOPNOTSUPP)"; +char __syserr053[] = "Protocol family not supported (EPFNOSUPPORT)"; +char __syserr054[] = "Address family not supported by protocol (EAFNOSUPPORT)"; +char __syserr055[] = "Address already in use (EADDRINUSE)"; +char __syserr056[] = "Can't assign requested address (EADDRNOTAVAIL)"; +char __syserr057[] = "Network is down (ENETDOWN)"; +char __syserr058[] = "Network is unreachable (ENETUNREACH)"; +char __syserr059[] = "Network dropped connection on reset (ENETRESET)"; +char __syserr060[] = "Software caused connection abort (ECONNABORTED)"; +char __syserr061[] = "Connection reset by peer (ECONNRESET)"; +char __syserr062[] = "No buffer space available (ENOBUFS)"; +char __syserr063[] = "Socket is already connected (EISCONN)"; +char __syserr064[] = "Socket is not connected (ENOTCONN)"; +char __syserr065[] = "Can't send after socket shutdown (ESHUTDOWN)"; +char __syserr066[] = "Connection timed out (ETIMEDOUT)"; +char __syserr067[] = "Connection refused (ECONNREFUSED)"; +char __syserr068[] = "Host is down (EHOSTDOWN)"; +char __syserr069[] = "No route to host (EHOSTUNREACH)"; +char __syserr070[] = "Stale NFS file handle (ESTALE)"; +char __syserr071[] = "Too many levels of remote in path (EREMOTE)"; +char __syserr072[] = "RPC struct is bad (EBADRPC)"; +char __syserr073[] = "RPC version wrong (ERPCMISMATCH)"; +char __syserr074[] = "RPC prog. not avail (EPROGUNAVAIL)"; +char __syserr075[] = "RPC Program version wrong (EPROGMISMATCH)"; +char __syserr076[] = "Bad procedure for program (EPROCUNAVAIL)"; +char __syserr077[] = "Invalid function number (EINVFNC)"; +char __syserr078[] = "Path not found (ENOPATH)"; +char __syserr079[] = "Memory area destroyed (ECONTR)"; +char __syserr080[] = "Invalid memory block address (EINVMEM)"; +char __syserr081[] = "Invalid environment (EINVENV)"; +char __syserr082[] = "Invalid format (EINVFMT)"; +char __syserr083[] = "Invalid access code (EINVACC)"; +char __syserr084[] = "Invalid data (EINVDAT)"; +char __syserr085[] = "Locking violation (EDEADLOCK)"; +char __syserr086[] = "Attempt to remove current directory (ECURDIR)"; +char __syserr087[] = "Not same device (ENOTSAM)"; +char __syserr088[] = "Text file busy (ETXTBSY)"; +char __syserr089[] = "Block device required (ENOTBLK)"; +char __syserr090[] = "Structure needs cleaning (EUCLEAN)"; +char __syserr091[] = "Too many references (ETOOMANYREFS)"; +char __syserr092[] = "Too many processes (EPROCLIM)"; +char __syserr093[] = "Too many users (EUSERS)"; +char __syserr094[] = "Disc quota exceeded (EDQUOT)"; +char __syserr095[] = "RVD related disk error (EVDBAD)"; +char __syserr096[] = "Out of remote working directory stuctures (ENORMTWD)"; +char __syserr097[] = "Operation canceled (ECANCELED)"; + +char *SYS_ERRLIST[] = { + __syserr000, __syserr001, __syserr002, __syserr003, __syserr004, + __syserr005, __syserr006, __syserr007, __syserr008, __syserr009, + __syserr010, __syserr011, __syserr012, __syserr013, __syserr014, + __syserr015, __syserr016, __syserr017, __syserr018, __syserr019, + __syserr020, __syserr021, __syserr022, __syserr023, __syserr024, + __syserr025, __syserr026, __syserr027, __syserr028, __syserr029, + __syserr030, __syserr031, __syserr032, __syserr033, __syserr034, + __syserr035, __syserr036, __syserr037, __syserr038, __syserr039, + __syserr040, __syserr041, __syserr042, __syserr043, __syserr044, + __syserr045, __syserr046, __syserr047, __syserr048, __syserr049, + __syserr050, __syserr051, __syserr052, __syserr053, __syserr054, + __syserr055, __syserr056, __syserr057, __syserr058, __syserr059, + __syserr060, __syserr061, __syserr062, __syserr063, __syserr064, + __syserr065, __syserr066, __syserr067, __syserr068, __syserr069, + __syserr070, __syserr071, __syserr072, __syserr073, __syserr074, + __syserr075, __syserr076, __syserr077, __syserr078, __syserr079, + __syserr080, __syserr081, __syserr082, __syserr083, __syserr084, + __syserr085, __syserr086, __syserr087, __syserr088, __syserr089, + __syserr090, __syserr091, __syserr092, __syserr093, __syserr094, + __syserr095, __syserr096, __syserr097, +}; + diff --git a/patch/watt32.patch b/patch/watt32.patch new file mode 100644 index 00000000..9f4210ed --- /dev/null +++ b/patch/watt32.patch @@ -0,0 +1,13 @@ +diff --git a/src/makefile.all b/src/makefile.all +index d158664..f840962 100644 +--- a/src/makefile.all ++++ b/src/makefile.all +@@ -252,7 +252,7 @@ PKT_STUB = pkt_stub.h + prefix = /dev/env/DJDIR/net/watt + + CFLAGS = -O3 -g -I. -I../inc -DWATT32_BUILD -W -Wall -Wno-strict-aliasing \ +- -march=i386 -mtune=i586 ++ -march=i386 -mtune=i586 $(CFLAGS_FOR_TARGET) + + STAT_LIB = ../lib/libwatt.a + OBJDIR = build/djgpp diff --git a/script/4.7.3 b/script/4.7.3 deleted file mode 100755 index 86a5cb57..00000000 --- a/script/4.7.3 +++ /dev/null @@ -1,382 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=224 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=4.7.3 -GCC_VERSION_SHORT=4.73 -GMP_VERSION=5.0.5 -MPFR_VERSION=3.1.1 -MPC_VERSION=1.0 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.1 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -CFLAGS="-O2 -g $CFLAGS -std=gnu90" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://www.multiprecision.org/mpc/download/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - if ! wget -U firefox $ARCHIVE; then - rm $FILE - exit 1 - fi - else - if ! curl -f $ARCHIVE -L -o $FILE; then - rm $FILE - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}s -cd bnu${BINUTILS_VERSION}s -unzip ../../download/bnu${BINUTILS_VERSION}s.zip || exit 1 -cd gnu/bnutl-* || exit - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xjf ../../download/automake-${AUTOMAKE_VERSION}.tar.bz2 || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.7.3 unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive --use=`case $archive in *.gz|*.tgz) echo 'gzip';; *.bz2) echo 'bzip2';; *.xz) echo 'xz';; esac` && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xjf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\([^-]*\)\([^&]*\)/\1j\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.bz2 || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-${GMP_VERSION}/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp-build=$BUILDDIR/gmp-${GMP_VERSION} --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/4.8.4 b/script/4.8.4 deleted file mode 100755 index dd7bdd8c..00000000 --- a/script/4.8.4 +++ /dev/null @@ -1,383 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=224 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=4.8.4 -GCC_VERSION_SHORT=4.84 -GMP_VERSION=6.0.0a -MPFR_VERSION=3.1.2 -MPC_VERSION=1.0.2 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.1 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -CFLAGS="-O2 -g $CFLAGS -std=gnu90" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - if ! wget -U firefox $ARCHIVE; then - rm $FILE - exit 1 - fi - else - if ! curl -f $ARCHIVE -L -o $FILE; then - rm $FILE - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}s -cd bnu${BINUTILS_VERSION}s -unzip ../../download/bnu${BINUTILS_VERSION}s.zip || exit 1 -cd gnu/bnutl-* || exit - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xjf ../../download/automake-${AUTOMAKE_VERSION}.tar.bz2 || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xjf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1j\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.bz2 || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/4.8.5 b/script/4.8.5 deleted file mode 100755 index ce28ab21..00000000 --- a/script/4.8.5 +++ /dev/null @@ -1,390 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=224 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=4.8.5 -GCC_VERSION_SHORT=4.85 -GMP_VERSION=6.0.0a -MPFR_VERSION=3.1.3 -MPC_VERSION=1.0.3 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.1 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -CFLAGS="-O2 -g $CFLAGS -std=gnu90" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# djcross-gcc-X.XX-tar.* maybe moved from /djgpp/rpms/ to /djgpp/deleted/rpms/ directory. -OLD_DJCROSS_GCC_ARCHIVE=${DJCROSS_GCC_ARCHIVE/rpms\//deleted\/rpms\/} - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $OLD_DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - DL_CMD="wget -U firefox $ARCHIVE" - else - DL_CMD="curl -f $ARCHIVE -L -o $FILE" - fi - echo "Command : $DL_CMD" - if ! eval $DL_CMD; then - if [ "$ARCHIVE" == "$DJCROSS_GCC_ARCHIVE" ]; then - echo "$FILE maybe moved to deleted/ directory." - else - rm $FILE - echo "Download $ARCHIVE failed." - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}s -cd bnu${BINUTILS_VERSION}s -unzip ../../download/bnu${BINUTILS_VERSION}s.zip || exit 1 -cd gnu/bnutl-* || exit - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xjf ../../download/automake-${AUTOMAKE_VERSION}.tar.bz2 || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xjf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1j\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.bz2 || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/4.9.2 b/script/4.9.2 deleted file mode 100755 index fbb43b99..00000000 --- a/script/4.9.2 +++ /dev/null @@ -1,383 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=224 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=4.9.2 -GCC_VERSION_SHORT=4.92 -GMP_VERSION=6.0.0a -MPFR_VERSION=3.1.2 -MPC_VERSION=1.0.1 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.1 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -CFLAGS="-O2 -g $CFLAGS -std=gnu90" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - if ! wget -U firefox $ARCHIVE; then - rm $FILE - exit 1 - fi - else - if ! curl -f $ARCHIVE -L -o $FILE; then - rm $FILE - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}s -cd bnu${BINUTILS_VERSION}s -unzip ../../download/bnu${BINUTILS_VERSION}s.zip || exit 1 -cd gnu/bnutl-* || exit - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xjf ../../download/automake-${AUTOMAKE_VERSION}.tar.bz2 || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xjf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1j\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.bz2 || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --enable-fat --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/4.9.3 b/script/4.9.3 deleted file mode 100755 index a4071d65..00000000 --- a/script/4.9.3 +++ /dev/null @@ -1,383 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=224 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=4.9.3 -GCC_VERSION_SHORT=4.93 -GMP_VERSION=6.0.0a -MPFR_VERSION=3.1.3 -MPC_VERSION=1.0.3 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.1 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -CFLAGS="-O2 -g $CFLAGS -std=gnu90" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - if ! wget -U firefox $ARCHIVE; then - rm $FILE - exit 1 - fi - else - if ! curl -f $ARCHIVE -L -o $FILE; then - rm $FILE - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}s -cd bnu${BINUTILS_VERSION}s -unzip ../../download/bnu${BINUTILS_VERSION}s.zip || exit 1 -cd gnu/bnutl-* || exit - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xjf ../../download/automake-${AUTOMAKE_VERSION}.tar.bz2 || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xjf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1j\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.bz2 || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --enable-fat --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/4.9.4 b/script/4.9.4 deleted file mode 100755 index 49c42855..00000000 --- a/script/4.9.4 +++ /dev/null @@ -1,390 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=226 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=4.9.4 -GCC_VERSION_SHORT=4.94 -GMP_VERSION=6.1.1 -MPFR_VERSION=3.1.4 -MPC_VERSION=1.0.3 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.1 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -CFLAGS="-O2 -g $CFLAGS -std=gnu90" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}sr3.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# djcross-gcc-X.XX-tar.* maybe moved from /djgpp/rpms/ to /djgpp/deleted/rpms/ directory. -OLD_DJCROSS_GCC_ARCHIVE=${DJCROSS_GCC_ARCHIVE/rpms\//deleted\/rpms\/} - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $OLD_DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - DL_CMD="wget -U firefox $ARCHIVE" - else - DL_CMD="curl -f $ARCHIVE -L -o $FILE" - fi - echo "Command : $DL_CMD" - if ! eval $DL_CMD; then - if [ "$ARCHIVE" == "$DJCROSS_GCC_ARCHIVE" ]; then - echo "$FILE maybe moved to deleted/ directory." - else - rm $FILE - echo "Download $ARCHIVE failed." - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}sr3 -cd bnu${BINUTILS_VERSION}sr3 -unzip ../../download/bnu${BINUTILS_VERSION}sr3.zip || exit 1 -cd gnu/binutils-* || exit - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xjf ../../download/automake-${AUTOMAKE_VERSION}.tar.bz2 || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xjf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1j\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.bz2 || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --enable-fat --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/5.1.0 b/script/5.1.0 deleted file mode 100755 index 1c2cef3d..00000000 --- a/script/5.1.0 +++ /dev/null @@ -1,384 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=224 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=5.1.0 -GCC_VERSION_SHORT=5.10 -GMP_VERSION=6.0.0a -MPFR_VERSION=3.1.2 -MPC_VERSION=1.0.3 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.1 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -#CFLAGS="-O2 -g $CFLAGS -std=gnu11" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - if ! wget -U firefox $ARCHIVE; then - rm $FILE - exit 1 - fi - else - if ! curl -f $ARCHIVE -L -o $FILE; then - rm $FILE - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}s -cd bnu${BINUTILS_VERSION}s -unzip ../../download/bnu${BINUTILS_VERSION}s.zip || exit 1 -cd gnu/bnutl-* || exit - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xjf ../../download/automake-${AUTOMAKE_VERSION}.tar.bz2 || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xjf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1j\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.bz2 || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --enable-fat --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-plugin \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/5.2.0 b/script/5.2.0 deleted file mode 100755 index 86a9e86f..00000000 --- a/script/5.2.0 +++ /dev/null @@ -1,384 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=224 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=5.2.0 -GCC_VERSION_SHORT=5.20 -GMP_VERSION=6.0.0a -MPFR_VERSION=3.1.2 -MPC_VERSION=1.0.3 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.1 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -#CFLAGS="-O2 -g $CFLAGS -std=gnu11" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - if ! wget -U firefox $ARCHIVE; then - rm $FILE - exit 1 - fi - else - if ! curl -f $ARCHIVE -L -o $FILE; then - rm $FILE - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}s -cd bnu${BINUTILS_VERSION}s -unzip ../../download/bnu${BINUTILS_VERSION}s.zip || exit 1 -cd gnu/bnutl-* || exit - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xjf ../../download/automake-${AUTOMAKE_VERSION}.tar.bz2 || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xjf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1j\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.bz2 || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --enable-fat --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-plugin \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/5.3.0 b/script/5.3.0 deleted file mode 100755 index d360d250..00000000 --- a/script/5.3.0 +++ /dev/null @@ -1,384 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=224 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=5.3.0 -GCC_VERSION_SHORT=5.30 -GMP_VERSION=6.1.0 -MPFR_VERSION=3.1.3 -MPC_VERSION=1.0.3 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.1 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -#CFLAGS="-O2 -g $CFLAGS -std=gnu11" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - if ! wget -U firefox $ARCHIVE; then - rm $FILE - exit 1 - fi - else - if ! curl -f $ARCHIVE -L -o $FILE; then - rm $FILE - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}s -cd bnu${BINUTILS_VERSION}s -unzip ../../download/bnu${BINUTILS_VERSION}s.zip || exit 1 -cd gnu/bnutl-* || exit - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xjf ../../download/automake-${AUTOMAKE_VERSION}.tar.bz2 || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xjf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1j\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.bz2 || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --enable-fat --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-plugin \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/5.4.0 b/script/5.4.0 deleted file mode 100755 index 84983394..00000000 --- a/script/5.4.0 +++ /dev/null @@ -1,384 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=226 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=5.4.0 -GCC_VERSION_SHORT=5.40 -GMP_VERSION=6.1.0 -MPFR_VERSION=3.1.4 -MPC_VERSION=1.0.3 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.1 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -#CFLAGS="-O2 -g $CFLAGS -std=gnu11" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}sr3.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - if ! wget -U firefox $ARCHIVE; then - rm $FILE - exit 1 - fi - else - if ! curl -f $ARCHIVE -L -o $FILE; then - rm $FILE - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}sr3 -cd bnu${BINUTILS_VERSION}sr3 -unzip ../../download/bnu${BINUTILS_VERSION}sr3.zip || exit 1 -cd gnu/binutils-* || exit - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xjf ../../download/automake-${AUTOMAKE_VERSION}.tar.bz2 || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xjf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1j\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.bz2 || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --enable-fat --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-plugin \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/5.5.0 b/script/5.5.0 deleted file mode 100755 index d4ada305..00000000 --- a/script/5.5.0 +++ /dev/null @@ -1,391 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=226 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=5.5.0 -GCC_VERSION_SHORT=5.50 -GMP_VERSION=6.1.2 -MPFR_VERSION=3.1.6 -MPC_VERSION=1.0.3 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.1 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -#CFLAGS="-O2 -g $CFLAGS -std=gnu11" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}sr3.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# djcross-gcc-X.XX-tar.* maybe moved from /djgpp/rpms/ to /djgpp/deleted/rpms/ directory. -OLD_DJCROSS_GCC_ARCHIVE=${DJCROSS_GCC_ARCHIVE/rpms\//deleted\/rpms\/} - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $OLD_DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - DL_CMD="wget -U firefox $ARCHIVE" - else - DL_CMD="curl -f $ARCHIVE -L -o $FILE" - fi - echo "Command : $DL_CMD" - if ! eval $DL_CMD; then - if [ "$ARCHIVE" == "$DJCROSS_GCC_ARCHIVE" ]; then - echo "$FILE maybe moved to deleted/ directory." - else - rm $FILE - echo "Download $ARCHIVE failed." - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}sr3 -cd bnu${BINUTILS_VERSION}sr3 -unzip ../../download/bnu${BINUTILS_VERSION}sr3.zip || exit 1 -cd gnu/binutils-* || exit - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xjf ../../download/automake-${AUTOMAKE_VERSION}.tar.bz2 || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xJf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1J\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.xz || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --enable-fat --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-plugin \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/6.1.0 b/script/6.1.0 deleted file mode 100755 index 4e4d7fe0..00000000 --- a/script/6.1.0 +++ /dev/null @@ -1,384 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=224 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=6.1.0 -GCC_VERSION_SHORT=6.10 -GMP_VERSION=6.1.0 -MPFR_VERSION=3.1.4 -MPC_VERSION=1.0.3 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.6 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -#CFLAGS="-O2 -g $CFLAGS -std=gnu11" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - if ! wget -U firefox $ARCHIVE; then - rm $FILE - exit 1 - fi - else - if ! curl -f $ARCHIVE -L -o $FILE; then - rm $FILE - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}s -cd bnu${BINUTILS_VERSION}s -unzip ../../download/bnu${BINUTILS_VERSION}s.zip || exit 1 -cd gnu/bnutl-* || exit - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xJf ../../download/automake-${AUTOMAKE_VERSION}.tar.xz || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xjf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1j\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.bz2 || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --enable-fat --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-plugin \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/6.2.0 b/script/6.2.0 deleted file mode 100755 index f70ca3c4..00000000 --- a/script/6.2.0 +++ /dev/null @@ -1,384 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=226 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=6.2.0 -GCC_VERSION_SHORT=6.20 -GMP_VERSION=6.1.1 -MPFR_VERSION=3.1.4 -MPC_VERSION=1.0.3 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.6 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -#CFLAGS="-O2 -g $CFLAGS -std=gnu11" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}sr3.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - if ! wget -U firefox $ARCHIVE; then - rm $FILE - exit 1 - fi - else - if ! curl -f $ARCHIVE -L -o $FILE; then - rm $FILE - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}sr3 -cd bnu${BINUTILS_VERSION}sr3 -unzip ../../download/bnu${BINUTILS_VERSION}sr3.zip || exit 1 -cd gnu/binutils-* || exit - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xJf ../../download/automake-${AUTOMAKE_VERSION}.tar.xz || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xjf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1j\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.bz2 || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --enable-fat --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-plugin \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/6.3.0 b/script/6.3.0 deleted file mode 100755 index 6b250304..00000000 --- a/script/6.3.0 +++ /dev/null @@ -1,387 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=227 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=6.3.0 -GCC_VERSION_SHORT=6.30 -GMP_VERSION=6.1.2 -MPFR_VERSION=3.1.4 -MPC_VERSION=1.0.3 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.6 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -#CFLAGS="-O2 -g $CFLAGS -std=gnu11" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - if ! wget -U firefox $ARCHIVE; then - rm $FILE - exit 1 - fi - else - if ! curl -f $ARCHIVE -L -o $FILE; then - rm $FILE - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}s -cd bnu${BINUTILS_VERSION}s -unzip ../../download/bnu${BINUTILS_VERSION}s.zip || exit 1 -cd gnu/binutils-* || exit - -# patch for binutils 2.27 -patch bfd/init.c ../../../../patch/patch-bnu27-bfd-init.txt || exit 1 - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xJf ../../download/automake-${AUTOMAKE_VERSION}.tar.xz || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xjf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1j\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.bz2 || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --enable-fat --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-plugin \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/6.4.0 b/script/6.4.0 deleted file mode 100755 index 6d442573..00000000 --- a/script/6.4.0 +++ /dev/null @@ -1,395 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=227 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=6.4.0 -GCC_VERSION_SHORT=6.40 -GMP_VERSION=6.1.2 -MPFR_VERSION=3.1.4 -MPC_VERSION=1.0.3 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.6 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -#CFLAGS="-O2 -g $CFLAGS -std=gnu11" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# djcross-gcc-X.XX-tar.* maybe moved from /djgpp/rpms/ to /djgpp/deleted/rpms/ directory. -OLD_DJCROSS_GCC_ARCHIVE=${DJCROSS_GCC_ARCHIVE/rpms\//deleted\/rpms\/} - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $OLD_DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - DL_CMD="wget -U firefox $ARCHIVE" - else - DL_CMD="curl -f $ARCHIVE -L -o $FILE" - fi - echo "Command : $DL_CMD" - if ! eval $DL_CMD; then - if [ "$ARCHIVE" == "$DJCROSS_GCC_ARCHIVE" ]; then - echo "$FILE maybe moved to deleted/ directory." - else - rm $FILE - echo "Download $ARCHIVE failed." - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}s -cd bnu${BINUTILS_VERSION}s -unzip ../../download/bnu${BINUTILS_VERSION}s.zip || exit 1 -cd gnu/binutils-* || exit - -# patch for binutils 2.27 -patch bfd/init.c ../../../../patch/patch-bnu27-bfd-init.txt || exit 1 - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xJf ../../download/automake-${AUTOMAKE_VERSION}.tar.xz || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xJf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1J\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.xz || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --enable-fat --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-plugin \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --enable-libstdcxx-filesystem-ts \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/7.1.0 b/script/7.1.0 deleted file mode 100755 index 3134a572..00000000 --- a/script/7.1.0 +++ /dev/null @@ -1,387 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=227 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=7.1.0 -GCC_VERSION_SHORT=7.10 -GMP_VERSION=6.1.2 -MPFR_VERSION=3.1.5 -MPC_VERSION=1.0.3 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.6 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -#CFLAGS="-O2 -g $CFLAGS -std=gnu11" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.bz2" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.bz2" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - if ! wget -U firefox $ARCHIVE; then - rm $FILE - exit 1 - fi - else - if ! curl -f $ARCHIVE -L -o $FILE; then - rm $FILE - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}s -cd bnu${BINUTILS_VERSION}s -unzip ../../download/bnu${BINUTILS_VERSION}s.zip || exit 1 -cd gnu/binutils-* || exit - -# patch for binutils 2.27 -patch bfd/init.c ../../../../patch/patch-bnu27-bfd-init.txt || exit 1 - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xjf ../../download/autoconf-${AUTOCONF_VERSION}.tar.bz2 || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xJf ../../download/automake-${AUTOMAKE_VERSION}.tar.xz || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xjf ../../download/gmp-${GMP_VERSION}.tar.bz2 || exit 1 -tar xjf ../../download/mpfr-${MPFR_VERSION}.tar.bz2 || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xjf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1j\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.bz2 || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --enable-fat --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-plugin \ - --disable-lto \ - --enable-lto \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/7.2.0 b/script/7.2.0 deleted file mode 100755 index 63ea9817..00000000 --- a/script/7.2.0 +++ /dev/null @@ -1,392 +0,0 @@ -#!/usr/bin/env bash - -unset CDPATH - -# target directory -DJGPP_PREFIX=${DJGPP_PREFIX-/usr/local/djgpp} - -# enabled languages -#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,f95,objc,obj-c++} -ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++} - -#DJGPP_DOWNLOAD_BASE="ftp://ftp.delorie.com/pub" -DJGPP_DOWNLOAD_BASE="http://www.delorie.com/pub" - -# source tarball versions -BINUTILS_VERSION=229 -DJCRX_VERSION=205 -DJLSR_VERSION=205 -DJDEV_VERSION=205 - -GCC_VERSION=7.2.0 -GCC_VERSION_SHORT=7.20 -GMP_VERSION=6.1.2 -MPFR_VERSION=3.1.5 -MPC_VERSION=1.0.3 -AUTOCONF_VERSION=2.64 -AUTOMAKE_VERSION=1.11.6 - -CC=gcc -CXX=g++ - -# use gmake under FreeBSD -if [ `uname` = "FreeBSD" ]; then - MAKE=gmake - CC=clang - CXX=clang++ -else - MAKE=make -fi -#CFLAGS="-O2 -g $CFLAGS -std=gnu11" - -export CC CXX CFLAGS MAKE - -# tarball location -BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" -DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJCRX_VERSION}.zip" -DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJLSR_VERSION}.zip" -DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJDEV_VERSION}.zip" - -DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" -GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" -GMP_ARCHIVE="http://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.xz" -MPFR_ARCHIVE="http://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.xz" -MPC_ARCHIVE="http://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" -AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" -AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" - -# check required programs -REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch" - -# MinGW doesn't have curl, so we use wget. -if uname|grep "^MINGW32" > /dev/null; then - USE_WGET=1 -fi - -# use curl or wget? -if [ ! -z $USE_WGET ]; then - REQ_PROG_LIST+=" wget" -else - REQ_PROG_LIST+=" curl" -fi - -for REQ_PROG in $REQ_PROG_LIST; do - if ! which $REQ_PROG > /dev/null; then - echo "$REQ_PROG not installed" - exit 1 - fi -done - -# check GNU sed is installed or not. -# It is for OSX, which doesn't ship with GNU sed. -if ! sed --version 2>/dev/null |grep "GNU sed" > /dev/null ;then - echo GNU sed is not installed, need to download. - SED_VERSION=4.2.2 - SED_ARCHIVE="http://ftp.gnu.org/gnu/sed/sed-${SED_VERSION}.tar.bz2" -else - SED_ARCHIVE="" -fi - -# check zlib is installed -if ! ${CC} test-zlib.c -o test-zlib -lz; then - echo "zlib not installed" - exit 1 -fi -rm test-zlib 2>/dev/null -rm test-zlib.exe 2>/dev/null - -# djcross-gcc-X.XX-tar.* maybe moved from /djgpp/rpms/ to /djgpp/deleted/rpms/ directory. -OLD_DJCROSS_GCC_ARCHIVE=${DJCROSS_GCC_ARCHIVE/rpms\//deleted\/rpms\/} - -# download source files -ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE - $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $OLD_DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE - $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE - $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE" - -echo "Download source files..." -mkdir -p download || exit 1 -cd download - -for ARCHIVE in $ARCHIVE_LIST; do - FILE=`basename $ARCHIVE` - if ! [ -f $FILE ]; then - echo "Download $ARCHIVE ..." - if [ ! -z $USE_WGET ]; then - DL_CMD="wget -U firefox $ARCHIVE" - else - DL_CMD="curl -f $ARCHIVE -L -o $FILE" - fi - echo "Command : $DL_CMD" - if ! eval $DL_CMD; then - if [ "$ARCHIVE" == "$DJCROSS_GCC_ARCHIVE" ]; then - echo "$FILE maybe moved to deleted/ directory." - else - rm $FILE - echo "Download $ARCHIVE failed." - exit 1 - fi - fi - fi -done -cd .. - -# create target directory, check writable. -echo "Make prefix directory : $DJGPP_PREFIX" -mkdir -p $DJGPP_PREFIX - -if ! [ -d $DJGPP_PREFIX ]; then - echo "Unable to create prefix directory" - exit 1 -fi - -if ! [ -w $DJGPP_PREFIX ]; then - echo "prefix directory is not writable." - exit 1 -fi - -# make build dir -echo "Make build dir" -rm -rf build || exit 1 -mkdir -p build || exit 1 -cd build - -# build binutils -echo "Building binutils" -mkdir bnu${BINUTILS_VERSION}s -cd bnu${BINUTILS_VERSION}s -unzip ../../download/bnu${BINUTILS_VERSION}s.zip || exit 1 -cd gnu/binutils-* || exit - -# exec permission of some files are not set, fix it. -for EXEC_FILE in install-sh missing; do - echo "chmod a+x $EXEC_FILE" - chmod a+x $EXEC_FILE || exit 1 -done - -sh ./configure \ - --prefix=$DJGPP_PREFIX \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --disable-werror \ - --disable-nls \ - || exit 1 - -${MAKE} configure-bfd || exit 1 -${MAKE} -C bfd stmp-lcoff-h || exit 1 -${MAKE} || exit 1 - -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi - -${MAKE} install || exit 1 - -cd ../../.. -# binutils done - -# prepare djcrx -echo "Prepare djcrx" -mkdir djcrx${DJCRX_VERSION} -cd djcrx${DJCRX_VERSION} -unzip ../../download/djcrx${DJCRX_VERSION}.zip || exit 1 -patch -p1 -u < ../../patch/patch-djcrx205.txt || exit 1 - -cd src/stub -${CC} -O2 stubify.c -o stubify || exit 1 -${CC} -O2 stubedit.c -o stubedit || exit 1 - -cd ../.. - -mkdir -p $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include || exit 1 -cp -rp include/* $DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include/ || exit 1 -cp -rp lib $DJGPP_PREFIX/i586-pc-msdosdjgpp/ || exit 1 -cp -p src/stub/stubify $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cp -p src/stub/stubedit $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - -cd .. -# djcrx done - -# build gcc -tar -xjvf ../download/djcross-gcc-${GCC_VERSION}.tar.bz2 || exit 1 -cd djcross-gcc-${GCC_VERSION}/ - -BUILDDIR=`pwd` - -echo "Building autoconf" -cd $BUILDDIR -tar xJf ../../download/autoconf-${AUTOCONF_VERSION}.tar.xz || exit 1 -cd autoconf-${AUTOCONF_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -${MAKE} all install || exit 1 - -echo "Building automake" -cd $BUILDDIR -tar xJf ../../download/automake-${AUTOMAKE_VERSION}.tar.xz || exit 1 -cd automake-${AUTOMAKE_VERSION}/ -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -./configure --prefix=$BUILDDIR/tmpinst || exit 1 -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -${MAKE} all install || exit 1 - -# build GNU sed if needed. -SED=sed -if [ ! -z $SED_VERSION ]; then - echo "Building sed" - cd $BUILDDIR - tar xjf ../../download/sed-${SED_VERSION}.tar.bz2 || exit 1 - cd sed-${SED_VERSION}/ - ./configure --prefix=$BUILDDIR/tmpinst || exit 1 - ${MAKE} all install || exit 1 - SED=$BUILDDIR/tmpinst/bin/sed -fi - -cd $BUILDDIR -tar xJf ../../download/gmp-${GMP_VERSION}.tar.xz || exit 1 -tar xJf ../../download/mpfr-${MPFR_VERSION}.tar.xz || exit 1 -tar xzf ../../download/mpc-${MPC_VERSION}.tar.gz || exit 1 - -# gcc 4.8 or above unpack-gcc.sh needs to be patched for OSX -# patch from : -# ( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) -# to : -# ( cd gnu && tar xJf $top/$archive && echo $archive >$top/s-sources ) -echo "Patch unpack-gcc.sh" -$SED -i "s/\(cd gnu && tar x\)\(f [^ ]* \)\([^ ]* \)/\1J\2/" unpack-gcc.sh || exit 1 -if [ `uname` = "FreeBSD" ]; then - # The --verbose option is not recognized by BSD patch - $SED -i 's/patch --verbose/patch/' unpack-gcc.sh || exit 1 -fi - -echo "Running unpack-gcc.sh" -PATH="$BUILDDIR/tmpinst/bin:$PATH" sh unpack-gcc.sh --no-djgpp-source ../../download/gcc-${GCC_VERSION}.tar.xz || exit 1 - -# patch gnu/gcc-X.XX/gcc/doc/gcc.texi -echo "Patch gcc/doc/gcc.texi" -cd gnu/gcc-*/gcc/doc || exit 1 -$SED -i "s/[^^]@\(\(tex\)\|\(end\)\)/\n@\1/g" gcc.texi || exit 1 -cd - - -# copy stubify programs -cp $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/stubify $BUILDDIR/tmpinst/bin - -echo "Building gmp" -cd $BUILDDIR/gmp-*/ -# On some systems, building gmp will fail if CFLAGS is set. -# Unset CFLAGS during building gmp. -env -u CFLAGS ./configure --enable-fat --prefix=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpfr" -cd $BUILDDIR/mpfr-${MPFR_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building mpc" -cd $BUILDDIR/mpc-${MPC_VERSION}/ -./configure --prefix=$BUILDDIR/tmpinst --with-gmp=$BUILDDIR/tmpinst --with-mpfr=$BUILDDIR/tmpinst --enable-static --disable-shared || exit 1 -${MAKE} all || exit 1 -if [ ! -z $MAKE_CHECK ]; then - echo "Run ${MAKE} check" - ${MAKE} check || exit 1 -fi -${MAKE} install || exit 1 - -echo "Building gcc" -cd $BUILDDIR/ - -mkdir djcross -cd djcross - -PATH="$BUILDDIR//tmpinst/bin:$PATH" \ -../gnu/gcc-${GCC_VERSION_SHORT}/configure \ - --target=i586-pc-msdosdjgpp \ - --program-prefix=i586-pc-msdosdjgpp- \ - --prefix=$DJGPP_PREFIX \ - --disable-nls \ - --disable-plugin \ - --disable-lto \ - --enable-lto \ - --enable-libstdcxx-filesystem-ts \ - --enable-libquadmath-support \ - --with-gmp=$BUILDDIR/tmpinst \ - --with-mpfr=$BUILDDIR/tmpinst \ - --with-mpc=$BUILDDIR/tmpinst \ - --enable-version-specific-runtime-libs \ - --enable-languages=${ENABLE_LANGUAGES} \ - || exit 1 - -${MAKE} j=4 "PATH=$BUILDDIR/tmpinst/bin:$PATH" || exit 1 - -${MAKE} install-strip || exit 1 - -echo "Copy long name executables to short name." -( - cd $DJGPP_PREFIX || exit 1 - SHORT_NAME_LIST="gcc g++ c++ addr2line c++filt cpp size strings" - for SHORT_NAME in $SHORT_NAME_LIST; do - if [ -f bin/i586-pc-msdosdjgpp-gcc ]; then - cp bin/i586-pc-msdosdjgpp-$SHORT_NAME i586-pc-msdosdjgpp/bin/$SHORT_NAME - fi - done -) || exit 1 - -# gcc done - -# build djlsr (for dxegen / exe2coff) -echo "Prepare djlsr" -cd $BUILDDIR -cd .. -rm -rf djlsr${DJLSR_VERSION} -mkdir djlsr${DJLSR_VERSION} -cd djlsr${DJLSR_VERSION} -unzip ../../download/djlsr${DJLSR_VERSION}.zip || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*/*" || exit 1 -unzip -o ../../download/djdev${DJDEV_VERSION}.zip "include/*" || exit 1 -patch -p1 -u < ../../patch/patch-djlsr205.txt || exit 1 -if [ "$CC" == "gcc" ]; then - echo "Building DXE tools." - cd src - PATH=$DJGPP_PREFIX/bin/:$PATH make || exit 1 - cp dxe/dxegen dxe/dxe3gen dxe/dxe3res $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 - cd .. -else - echo "Building DXE tools requires gcc, skip." -fi -cd src/stub -${CC} -o exe2coff exe2coff.c || exit 1 -cp -p exe2coff $DJGPP_PREFIX/i586-pc-msdosdjgpp/bin/ || exit 1 -cd ../../.. -# djlsr done - -# copy setenv script -(cd $BUILDDIR/../../setenv/ && ./copyfile.sh $DJGPP_PREFIX) || exit 1 - -echo "Testing DJGPP." -cd $BUILDDIR -cd .. -echo "Use DJGPP to build a test C program." -$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc ../hello.c -o hello || exit 1 - -for x in $(echo $ENABLE_LANGUAGES | tr "," " ") -do - case $x in - c++) - echo "Use DJGPP to build a test C++ program." - $DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-c++ ../hello-cpp.cpp -o hello-cpp || exit 1 - ;; - esac -done - -echo "build-djgpp.sh done." diff --git a/script/build-avr-gcc.sh b/script/build-avr-gcc.sh new file mode 100644 index 00000000..3fd3de74 --- /dev/null +++ b/script/build-avr-gcc.sh @@ -0,0 +1,126 @@ +cd ${BASE}/build/ + +if [ ! -z ${AVRLIBC_VERSION} ]; then + if [ ! -e avr-libc-${AVRLIBC_VERSION}/avr-libc-unpacked ]; then + echo "Unpacking avr-libc..." + untar ${AVRLIBC_ARCHIVE} + cd avr-libc-${AVRLIBC_VERSION}/ + untar ${AVRLIBC_DOC_ARCHIVE} + touch avr-libc-unpacked + cd .. + fi + cd avr-libc-${AVRLIBC_VERSION}/ + ${SUDO} mkdir -p ${DST}/${TARGET}/include/ + install_files include/* ${DST}/${TARGET}/include/ | exit 1 + echo "Installing avr-libc documentation" + ${SUDO} mkdir -p ${DST}/${TARGET}/share/man/ + install_files man/* ${DST}/${TARGET}/share/man/ | exit 1 + cd .. +fi + +if [ ! -z ${GCC_VERSION} ]; then + if [ ! -e gcc-${GCC_VERSION}/gcc-unpacked ]; then + echo "Unpacking gcc..." + untar ${GCC_ARCHIVE} + + pushd gcc-${GCC_VERSION} || exit 1 + + if [ ! -z ${BUILD_DEB} ]; then + echo "Unpacking gcc dependencies" + for URL in $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE $ISL_ARCHIVE; do + FILE=`basename $URL` + untar ${FILE} + mv ${FILE%.*.*} ${FILE%%-*} || exit 1 + done + else + echo "Downloading gcc dependencies" + sed -i 's/ftp/http/g' contrib/download_prerequisites + ./contrib/download_prerequisites || exit 1 + fi + + touch gcc-unpacked + popd + fi + + echo "Building gcc (stage 1)" + + mkdir -p gcc-${GCC_VERSION}/build-${TARGET} + cd gcc-${GCC_VERSION}/build-${TARGET} || exit 1 + + TEMP_CFLAGS="$CFLAGS" + TEMP_CXXFLAGS="$CXXFLAGS" + export CFLAGS="$CFLAGS $GCC_EXTRA_CFLAGS" + export CXXFLAGS="$CXXFLAGS $GCC_EXTRA_CXXFLAGS" + + GCC_CONFIGURE_OPTIONS+=" --target=${TARGET} --prefix=${PREFIX} ${HOST_FLAG} ${BUILD_FLAG} + --enable-languages=${ENABLE_LANGUAGES} + --with-avrlibc" + strip_whitespace GCC_CONFIGURE_OPTIONS + + if [ ! -e configure-prefix ] || [ ! "`cat configure-prefix`" == "${GCC_CONFIGURE_OPTIONS}" ]; then + rm -rf * + rm -rf ${BASE}/build/avr-libc-${AVRLIBC_VERSION}/build-${TARGET}/* + eval "../configure ${GCC_CONFIGURE_OPTIONS}" || exit 1 + echo ${GCC_CONFIGURE_OPTIONS} > configure-prefix + else + echo "Note: gcc already configured. To force a rebuild, use: rm -rf $(pwd)" + [ -z ${BUILD_BATCH} ] && sleep 5 + fi + + ${MAKE_J} all-gcc || exit 1 + echo "Installing gcc (stage 1)" + ${SUDO} ${MAKE_J} install-gcc || exit 1 + + CFLAGS="$TEMP_CFLAGS" + CXXFLAGS="$TEMP_CXXFLAGS" +fi + +cd ${BASE}/build/ + +if [ ! -z ${AVRLIBC_VERSION} ]; then + echo "Building avr-libc" + mkdir -p avr-libc-${AVRLIBC_VERSION}/build-${TARGET} + cd avr-libc-${AVRLIBC_VERSION}/build-${TARGET} || exit 1 + + AVRLIBC_CONFIGURE_OPTIONS+=" --host=${TARGET} --prefix=${PREFIX} ${BUILD_FLAG}" + strip_whitespace AVRLIBC_CONFIGURE_OPTIONS + + if [ ! -z ${GCC_VERSION} ] || [ ! "`cat configure-options 2> /dev/null`" == "${AVRLIBC_CONFIGURE_OPTIONS}" ]; then + rm -rf * + CC=avr-gcc ../configure ${AVRLIBC_CONFIGURE_OPTIONS} || exit 1 + echo ${AVRLIBC_CONFIGURE_OPTIONS} > configure-options + else + echo "Note: avr-libc already configured. To force a rebuild, use: rm -rf $(pwd)" + [ -z ${BUILD_BATCH} ] && sleep 5 + fi + + ${MAKE_J} || exit 1 + [ ! -z $MAKE_CHECK ] && ${MAKE_J} -s check | tee ${BASE}/tests/avr-libc.log + echo "Installing avr-libc" + ${SUDO} ${MAKE_J} install || exit 1 +fi + +cd ${BASE}/build/ + +if [ ! -z ${GCC_VERSION} ]; then + echo "Building gcc (stage 2)" + cd gcc-${GCC_VERSION}/build-${TARGET} || exit 1 + + TEMP_CFLAGS="$CFLAGS" + TEMP_CXXFLAGS="$CXXFLAGS" + export CFLAGS="$CFLAGS $GCC_EXTRA_CFLAGS" + export CXXFLAGS="$CXXFLAGS $GCC_EXTRA_CXXFLAGS" + + export STAGE_CC_WRAPPER="${BASE}/script/destdir-hack.sh ${DST}/${TARGET}" + ${MAKE_J} || exit 1 + [ ! -z $MAKE_CHECK_GCC ] && ${MAKE_J} -s check-gcc | tee ${BASE}/tests/gcc.log + echo "Installing gcc" + ${SUDO} ${MAKE_J} install-strip || \ + ${SUDO} ${MAKE_J} install-strip || exit 1 + ${SUDO} ${MAKE_J} -C mpfr install DESTDIR=${BASE}/build/tmpinst + + CFLAGS="$TEMP_CFLAGS" + CXXFLAGS="$TEMP_CXXFLAGS" + + set_version gcc +fi diff --git a/script/build-binutils.sh b/script/build-binutils.sh new file mode 100644 index 00000000..bcc1efdf --- /dev/null +++ b/script/build-binutils.sh @@ -0,0 +1,31 @@ +mkdir -p build-${TARGET} +cd build-${TARGET} || exit 1 + +echo "Building binutils" + +BINUTILS_CONFIGURE_OPTIONS+=" --target=${TARGET} --prefix=${PREFIX} ${HOST_FLAG} ${BUILD_FLAG}" +strip_whitespace BINUTILS_CONFIGURE_OPTIONS + +if [ ! -e configure-prefix ] || [ ! "`cat configure-prefix`" = "${BINUTILS_CONFIGURE_OPTIONS}" ]; then + rm -rf * + ../configure ${BINUTILS_CONFIGURE_OPTIONS} || exit 1 + echo ${BINUTILS_CONFIGURE_OPTIONS} > configure-prefix +else + echo "Note: binutils already configured. To force a rebuild, use: rm -rf $(pwd)" + [ -z ${BUILD_BATCH} ] && sleep 5 +fi + +case $TARGET in +*-msdosdjgpp) + ${MAKE_J} configure-bfd || exit 1 + ${MAKE_J} -C bfd stmp-lcoff-h || exit 1 + ;; +*) ;; +esac + +${MAKE_J} || exit 1 +[ ! -z $MAKE_CHECK ] && ${MAKE_J} -s check | tee ${BASE}/tests/binutils.log +echo "Installing binutils" +${SUDO} ${MAKE_J} install || exit 1 + +set_version binutils diff --git a/script/build-gdb.sh b/script/build-gdb.sh new file mode 100644 index 00000000..f53c659d --- /dev/null +++ b/script/build-gdb.sh @@ -0,0 +1,32 @@ +cd ${BASE}/build + +if [ ! -z ${GDB_VERSION} ]; then + if [ ! -e gdb-${GDB_VERSION}/gdb-unpacked ]; then + echo "Unpacking gdb..." + untar ${GDB_ARCHIVE} || exit 1 + touch gdb-${GDB_VERSION}/gdb-unpacked + fi + mkdir -p gdb-${GDB_VERSION}/build-${TARGET} + cd gdb-${GDB_VERSION}/build-${TARGET} || exit 1 + + echo "Building gdb" + + GDB_CONFIGURE_OPTIONS+=" --target=${TARGET} --prefix=${PREFIX} ${HOST_FLAG} ${BUILD_FLAG}" + [ -e ${BASE}/build/tmpinst${PREFIX}/lib/libmpfr.a ] && GDB_CONFIGURE_OPTIONS+=" --with-mpfr=${BASE}/build/tmpinst${PREFIX}" + strip_whitespace GDB_CONFIGURE_OPTIONS + + if [ ! -e configure-prefix ] || [ ! "`cat configure-prefix`" = "${GDB_CONFIGURE_OPTIONS}" ]; then + rm -rf * + ../configure ${GDB_CONFIGURE_OPTIONS} || exit 1 + echo ${GDB_CONFIGURE_OPTIONS} > configure-prefix + else + echo "Note: gdb already configured. To force a rebuild, use: rm -rf $(pwd)" + [ -z ${BUILD_BATCH} ] && sleep 5 + fi + ${MAKE_J} || exit 1 + [ ! -z $MAKE_CHECK ] && ${MAKE_J} -s check | tee ${BASE}/tests/gdb.log + echo "Installing gdb" + ${SUDO} ${MAKE_J} install || exit 1 + + set_version gdb +fi diff --git a/script/build-newlib-gcc.sh b/script/build-newlib-gcc.sh new file mode 100644 index 00000000..cc028bfd --- /dev/null +++ b/script/build-newlib-gcc.sh @@ -0,0 +1,119 @@ +cd ${BASE}/build/ + +if [ ! -z ${NEWLIB_VERSION} ] && [ ! -e newlib-${NEWLIB_VERSION}/newlib-unpacked ]; then + echo "Unpacking newlib..." + untar ${NEWLIB_ARCHIVE} + ${SUDO} mkdir -p ${DST}/${TARGET}/include/ + install_files newlib-${NEWLIB_VERSION}/newlib/libc/include/* ${DST}/${TARGET}/include/ | exit 1 + touch newlib-${NEWLIB_VERSION}/newlib-unpacked +fi + +if [ ! -z ${GCC_VERSION} ]; then + if [ ! -e gcc-${GCC_VERSION}/gcc-unpacked ]; then + echo "Unpacking gcc..." + untar ${GCC_ARCHIVE} + + pushd gcc-${GCC_VERSION} || exit 1 + + if [ ! -z ${BUILD_DEB} ]; then + echo "Unpacking gcc dependencies" + for URL in $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE $ISL_ARCHIVE; do + FILE=`basename $URL` + untar ${FILE} + mv ${FILE%.*.*} ${FILE%%-*} || exit 1 + done + else + echo "Downloading gcc dependencies" + sed -i 's/ftp/http/g' contrib/download_prerequisites + ./contrib/download_prerequisites || exit 1 + fi + + touch gcc-unpacked + popd + else + echo "gcc already unpacked, skipping." + fi + + echo "Building gcc (stage 1)" + + mkdir -p gcc-${GCC_VERSION}/build-${TARGET} + cd gcc-${GCC_VERSION}/build-${TARGET} || exit 1 + + TEMP_CFLAGS="$CFLAGS" + TEMP_CXXFLAGS="$CXXFLAGS" + export CFLAGS="$CFLAGS $GCC_EXTRA_CFLAGS" + export CXXFLAGS="$CXXFLAGS $GCC_EXTRA_CXXFLAGS" + + GCC_CONFIGURE_OPTIONS+=" --target=${TARGET} --prefix=${PREFIX} ${HOST_FLAG} ${BUILD_FLAG} + --enable-languages=${ENABLE_LANGUAGES} + --with-newlib" + strip_whitespace GCC_CONFIGURE_OPTIONS + + if [ ! -e configure-prefix ] || [ ! "`cat configure-prefix`" == "${GCC_CONFIGURE_OPTIONS}" ]; then + rm -rf * + rm -rf ${BASE}/build/newlib-${NEWLIB_VERSION}/build-${TARGET}/* + eval "../configure ${GCC_CONFIGURE_OPTIONS}" || exit 1 + echo ${GCC_CONFIGURE_OPTIONS} > configure-prefix + else + echo "Note: gcc already configured. To force a rebuild, use: rm -rf $(pwd)" + [ -z ${BUILD_BATCH} ] && sleep 5 + fi + + ${MAKE_J} all-gcc || exit 1 + echo "Installing gcc (stage 1)" + ${SUDO} ${MAKE_J} install-gcc || exit 1 + + CFLAGS="$TEMP_CFLAGS" + CXXFLAGS="$TEMP_CXXFLAGS" +fi + +cd ${BASE}/build/ + +if [ ! -z ${NEWLIB_VERSION} ]; then + echo "Building newlib" + mkdir -p newlib-${NEWLIB_VERSION}/build-${TARGET} + cd newlib-${NEWLIB_VERSION}/build-${TARGET} || exit 1 + + NEWLIB_CONFIGURE_OPTIONS+=" --target=${TARGET} --prefix=${PREFIX} ${HOST_FLAG} ${BUILD_FLAG}" + strip_whitespace NEWLIB_CONFIGURE_OPTIONS + + if [ ! -z ${GCC_VERSION} ] || [ ! "`cat configure-options 2> /dev/null`" == "${NEWLIB_CONFIGURE_OPTIONS}" ]; then + rm -rf * + ../configure ${NEWLIB_CONFIGURE_OPTIONS} || exit 1 + echo ${NEWLIB_CONFIGURE_OPTIONS} > configure-options + else + echo "Note: newlib already configured. To force a rebuild, use: rm -rf $(pwd)" + [ -z ${BUILD_BATCH} ] && sleep 5 + fi + + ${MAKE_J} || exit 1 + [ ! -z $MAKE_CHECK ] && ${MAKE_J} -s check | tee ${BASE}/tests/newlib.log + echo "Installing newlib" + ${SUDO} ${MAKE_J} install || \ + ${SUDO} ${MAKE_J} install || exit 1 +fi + +cd ${BASE}/build/ + +if [ ! -z ${GCC_VERSION} ]; then + echo "Building gcc (stage 2)" + cd gcc-${GCC_VERSION}/build-${TARGET} || exit 1 + + TEMP_CFLAGS="$CFLAGS" + TEMP_CXXFLAGS="$CXXFLAGS" + export CFLAGS="$CFLAGS $GCC_EXTRA_CFLAGS" + export CXXFLAGS="$CXXFLAGS $GCC_EXTRA_CXXFLAGS" + export STAGE_CC_WRAPPER="${BASE}/script/destdir-hack.sh ${DST}/${TARGET}" + + ${MAKE_J} || exit 1 + [ ! -z $MAKE_CHECK_GCC ] && ${MAKE_J} -s check-gcc | tee ${BASE}/tests/gcc.log + echo "Installing gcc" + ${SUDO} ${MAKE_J} install-strip || \ + ${SUDO} ${MAKE_J} install-strip || exit 1 + ${SUDO} ${MAKE_J} -C mpfr install DESTDIR=${BASE}/build/tmpinst + + CFLAGS="$TEMP_CFLAGS" + CXXFLAGS="$TEMP_CXXFLAGS" + + set_version gcc +fi diff --git a/script/build-tools.sh b/script/build-tools.sh new file mode 100644 index 00000000..ca7bad1a --- /dev/null +++ b/script/build-tools.sh @@ -0,0 +1,20 @@ +mkdir -p ${BASE}/build/tmpinst +export PATH="${BASE}/build/tmpinst/bin:$PATH" + +cd ${BASE}/build || exit 1 + +# build GNU sed if needed. +if [ ! -z "${SED_VERSION}" ]; then + if [ ! "$(${BASE}/build/tmpinst/sed-version 2> /dev/null)" == "${SED_VERSION}" ]; then + echo "Building sed" + untar ${SED_ARCHIVE} || exit 1 + cd sed-${SED_VERSION}/ + TEMP_CFLAGS="$CFLAGS" + export CFLAGS="${CFLAGS//-w}" # configure fails if warnings are disabled. + ./configure --prefix=${BASE}/build/tmpinst || exit 1 + ${MAKE_J} || exit 1 + ${MAKE_J} DESTDIR= install || exit 1 + CFLAGS="$TEMP_CFLAGS" + echo ${SED_VERSION} > ${BASE}/build/tmpinst/sed-version + fi +fi diff --git a/script/check-deps-and-confirm.sh b/script/check-deps-and-confirm.sh new file mode 100644 index 00000000..8dce597c --- /dev/null +++ b/script/check-deps-and-confirm.sh @@ -0,0 +1,176 @@ +if [ -z ${IGNORE_DEPENDENCIES} ]; then + for DEP in ${DEPS}; do + case $DEP in + djgpp) [ -z "$(get_version djgpp)" ] && add_pkg djgpp ;; + newlib) [ -z "$(get_version newlib)" ] && add_pkg newlib ;; + avr-libc) [ -z "$(get_version avr-libc)" ] && add_pkg avr-libc ;; + binutils) [ -z "$(get_version binutils)" ] && add_pkg binutils ;; + gcc) [ -z "$(get_version gcc)" ] && add_pkg gcc ;; + gdb) [ -z "$(get_version gdb)" ] && add_pkg gdb ;; + esac + done +fi + +if [ ! -z ${GCC_VERSION} ] && [ -z ${DJCROSS_GCC_ARCHIVE} ]; then + DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" + # djcross-gcc-X.XX-tar.* maybe moved from /djgpp/rpms/ to /djgpp/deleted/rpms/ directory. + OLD_DJCROSS_GCC_ARCHIVE=${DJCROSS_GCC_ARCHIVE/rpms\//deleted\/rpms\/} +fi + +case $TARGET in +*-msdosdjgpp) ;; +*) unset DJCROSS_GCC_ARCHIVE OLD_DJCROSS_GCC_ARCHIVE ;; +esac + +if [ ! -z ${BUILD_DEB} ] && [ ! -z ${GCC_VERSION} ]; then + GMP_VERSION=${GMP_VERSION:-6.2.1} + MPFR_VERSION=${MPFR_VERSION:-4.1.0} + MPC_VERSION=${MPC_VERSION:-1.2.0} + ISL_VERSION=${ISL_VERSION:-0.24} + + GMP_ARCHIVE="http://ftpmirror.gnu.org/gnu/gmp/gmp-${GMP_VERSION}.tar.xz" + MPFR_ARCHIVE="http://ftpmirror.gnu.org/gnu/mpfr/mpfr-${MPFR_VERSION}.tar.xz" + MPC_ARCHIVE="http://ftpmirror.gnu.org/gnu/mpc/mpc-${MPC_VERSION}.tar.gz" + ISL_ARCHIVE="http://gcc.gnu.org/pub/gcc/infrastructure/isl-${ISL_VERSION}.tar.bz2" +fi + +# check GNU sed is installed or not. +# It is for OSX, which doesn't ship with GNU sed. +if ! sed --version 2>/dev/null | grep "GNU sed" > /dev/null ;then + echo GNU sed is not installed, need to download. + SED_VERSION=4.4 + SED_ARCHIVE="http://ftpmirror.gnu.org/sed/sed-${SED_VERSION}.tar.xz" +else + SED_ARCHIVE="" +fi + +if [ -z ${NO_DOWNLOAD} ]; then + # MinGW32 doesn't have curl, so we use wget. + if ! which curl > /dev/null; then + USE_WGET=1 + if ! which wget > /dev/null; then + echo "curl or wget not installed" + exit 1 + fi + fi +fi + +[ ! -z ${ONLY_DOWNLOAD} ] && return + +if [ -z ${TARGET} ]; then + echo "Please specify a target with: --target=..." + exit 1 +fi + +DST="${DESTDIR}${PREFIX}" +export DESTDIR + +# check python version for gdb +if [ ! -z ${GDB_VERSION} ]; then + let GDB_VERSION_MAJOR=${GDB_VERSION%%.*} + if (( ${GDB_VERSION_MAJOR} >= 9 )); then + PYTHON=python3 + else + PYTHON=python2 + fi + if ! which ${PYTHON} > /dev/null; then + echo "WARNING: ${PYTHON} not installed" + prepend GDB_CONFIGURE_OPTIONS "--with-python=no" + else + prepend GDB_CONFIGURE_OPTIONS "--with-python=`which ${PYTHON}`" + fi +fi + +# check required programs +REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch tar xz bunzip2 gunzip" + +[ ! -z "${WATT32_VERSION}" ] && REQ_PROG_LIST+=" nasm" + +for REQ_PROG in $REQ_PROG_LIST; do + if ! which $REQ_PROG > /dev/null; then + echo "$REQ_PROG not installed" + exit 1 + fi +done + +# check zlib is installed +if ! ${CC} ${BASE}/script/test-zlib.c -o test-zlib -lz; then + echo "zlib not installed" + exit 1 +fi +rm test-zlib 2>/dev/null +rm test-zlib.exe 2>/dev/null + +echo "You are about to build and install:" +[ -z ${DJGPP_VERSION} ] || echo " - DJGPP libraries and utilities ${DJGPP_VERSION}" +[ -z ${NEWLIB_VERSION} ] || echo " - newlib ${NEWLIB_VERSION}" +[ -z ${BINUTILS_VERSION} ] || echo " - binutils ${BINUTILS_VERSION}" +[ -z ${GCC_VERSION} ] || echo " - gcc ${GCC_VERSION}" +[ -z ${GDB_VERSION} ] || echo " - gdb ${GDB_VERSION}" +[ -z ${AVRLIBC_VERSION} ] || echo " - avr-libc ${AVRLIBC_VERSION}" +[ -z ${AVRDUDE_VERSION} ] || echo " - AVRDUDE ${AVRDUDE_VERSION}" +[ -z ${AVARICE_VERSION} ] || echo " - AVaRICE ${AVARICE_VERSION}" +[ -z ${SIMULAVR_VERSION} ] || echo " - SimulAVR ${SIMULAVR_VERSION}" +[ -z ${WATT32_VERSION} ] || echo " - Watt-32 ${WATT32_VERSION}" + +echo "" +echo "With the following options:" +[ ! -z ${IGNORE_DEPENDENCIES} ] && echo " IGNORE_DEPENDENCIES=${IGNORE_DEPENDENCIES}" +[ ! -z ${DESTDIR} ] && echo " DESTDIR=${DESTDIR}" +echo " TARGET=${TARGET}" +echo " HOST=${HOST}" +echo " BUILD=${BUILD}" +echo " PREFIX=${PREFIX}" +echo " CC=${CC}" +echo " CXX=${CXX}" +echo " CFLAGS=${CFLAGS}" +echo " CXXFLAGS=${CXXFLAGS}" +echo " CFLAGS_FOR_TARGET=${CFLAGS_FOR_TARGET}" +echo " CXXFLAGS_FOR_TARGET=${CXXFLAGS_FOR_TARGET}" +echo " LDFLAGS=${LDFLAGS}" +echo " MAKE=${MAKE}" +echo " MAKE_JOBS=${MAKE_JOBS}" +echo " MAKE_CHECK=${MAKE_CHECK}" +echo " MAKE_CHECK_GCC=${MAKE_CHECK_GCC}" +if [ ! -z ${HOST} ]; then + echo " HOST_CC=`echo ${HOST_CC}`" + echo " HOST_CXX=`echo ${HOST_CXX}`" +fi +if [ ! -z ${GCC_VERSION} ]; then + echo " ENABLE_LANGUAGES=${ENABLE_LANGUAGES}" + echo " GCC_CONFIGURE_OPTIONS=`echo ${GCC_CONFIGURE_OPTIONS}`" +fi +if [ ! -z ${BINUTILS_VERSION} ]; then + echo " BINUTILS_CONFIGURE_OPTIONS=`echo ${BINUTILS_CONFIGURE_OPTIONS}`" +fi +if [ ! -z ${GDB_VERSION} ]; then + echo " GDB_CONFIGURE_OPTIONS=`echo ${GDB_CONFIGURE_OPTIONS}`" +fi +if [ ! -z ${NEWLIB_VERSION} ]; then + echo " NEWLIB_CONFIGURE_OPTIONS=`echo ${NEWLIB_CONFIGURE_OPTIONS}`" +fi +if [ ! -z ${AVRLIBC_VERSION} ]; then + echo " AVRLIBC_CONFIGURE_OPTIONS=`echo ${AVRLIBC_CONFIGURE_OPTIONS}`" +fi +echo "" + +mkdir -p ${DST} 2> /dev/null + +if [ ! -d ${DST} ] || [ ! -w ${DST} ]; then + if [ ! -z ${BUILD_BATCH} ]; then + if ! sudo -n : 2> /dev/null; then + echo "ERROR: no write access to ${DST} (requires sudo)" + exit 1 + fi + else + echo "WARNING: no write access to ${DST}" + echo "You may need to enter your sudo password several times during the build process." + echo "" + fi + SUDO=sudo +fi + +if [ -z ${BUILD_BATCH} ]; then + echo "If you wish to change anything, press CTRL-C now. Otherwise, press any other key to continue." + read -s -n 1 +fi diff --git a/script/destdir-hack.sh b/script/destdir-hack.sh new file mode 100755 index 00000000..cd469b33 --- /dev/null +++ b/script/destdir-hack.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +DIR=$1 +shift +GCC=$1 +shift +exec ${GCC} -B${DIR}/lib/ -isystem ${DIR}/watt/inc/ -isystem ${DIR}/sys-include/ -isystem ${DIR}/include/ "$@" diff --git a/script/download.sh b/script/download.sh new file mode 100644 index 00000000..4f1642d2 --- /dev/null +++ b/script/download.sh @@ -0,0 +1,138 @@ +# download source files +ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE + $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $OLD_DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE + $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE $GDB_ARCHIVE $NEWLIB_ARCHIVE + $AVRLIBC_ARCHIVE $AVRLIBC_DOC_ARCHIVE $AVRDUDE_ARCHIVE $AVARICE_ARCHIVE + $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE $ISL_ARCHIVE" + +# these variables are of the form "git://url/repo.git::branch" +# if 'branch' is empty then the default branch is checked out. +GIT_LIST="$DJGPP_GIT $GCC_GIT $BINUTILS_GIT $NEWLIB_GIT $SIMULAVR_GIT $WATT32_GIT" + +mkdir -p download +cd download/ || exit 1 + +# Remove files that don't belong in the Debian package. +if [ ! -z "$BUILD_DEB" ]; then + for FILE in $(find * -maxdepth 0 -type f); do + for ARCHIVE in $ARCHIVE_LIST; do + [ "$FILE" == "$(basename $ARCHIVE)" ] && continue 2 + done + for REPO in $GIT_LIST; do + REPO=${REPO%::*} + REPO=${REPO%.*} + [ "$FILE" == "$(basename $REPO)-git.tar" ] && continue 2 + done + rm -f $FILE + done +fi + +if [ -z ${NO_DOWNLOAD} ]; then + echo "Download source files..." + + for ARCHIVE in $ARCHIVE_LIST; do + FILE=`basename $ARCHIVE` + if ! [ -f $FILE ]; then + echo "Download $ARCHIVE ..." + if [ ! -z $USE_WGET ]; then + DL_CMD="wget -U firefox $ARCHIVE" + else + DL_CMD="curl -f $ARCHIVE -L -o $FILE" + fi + while true; do + if eval $DL_CMD; then + break + else + if [ "$ARCHIVE" == "$DJCROSS_GCC_ARCHIVE" ]; then + echo "$FILE maybe moved to deleted/ directory." + break + else + rm $FILE + echo "Download $FILE failed, retrying in 5 seconds... (press CTRL-C to abort)" + sleep 5 + fi + fi + done + fi + done +fi + +download_git() +{ + local repo=$(basename $1) + repo=${repo%.*} + if [ ! -d $repo/ ] || [ "`cd $repo/ && git remote get-url origin`" != "$1" ]; then + if [ -f $repo-git.tar ]; then + untar $repo-git.tar + fi + if [ ! -d $repo/ ] || [ "`cd $repo/ && git remote get-url origin`" != "$1" ]; then + if [ -z ${NO_DOWNLOAD} ]; then + echo "Downloading $repo..." + rm -rf $repo/ + git clone $1 --depth 1 $([ "$2" != "" ] && echo "--branch $2") + else + echo "Missing: $repo" + exit 1 + fi + fi + fi + cd $repo/ || exit 1 + if [ -z ${NO_GIT_RESET} ]; then + git reset --hard HEAD + git checkout $2 + if [ -z ${NO_DOWNLOAD} ]; then + git fetch origin + git reset --hard origin/$2 || exit 1 + fi + fi + cd ${BASE}/download/ || exit 1 + if [ ! -z ${ONLY_DOWNLOAD} ] && [ ! -z ${BUILD_DEB} ]; then + # Pack git sources for Debian package. + find $repo/* ! -wholename '*/.git/*' -delete 2>&1 > /dev/null + tar -c -f $repo-git.tar $repo + return + fi + mkdir -p ${BASE}/build + rm -rf ${BASE}/build/$repo + ln -fs ../download/$repo ${BASE}/build/$repo || exit 1 +} + +for REPO in $GIT_LIST; do + download_git ${REPO%::*} ${REPO##*::} +done + +for ARCHIVE in $ARCHIVE_LIST; do + FILE=`basename $ARCHIVE` + if ! [ -f $FILE ]; then + echo "Missing: $FILE" + exit 1 + fi +done + +if [ ! -z ${ONLY_DOWNLOAD} ]; then + if [ ! -z ${BUILD_DEB} ]; then + # Remove git sources that don't belong in the Debian package. + rm -rf ${BASE}/download/*/ + fi + exit 0 +fi + +cd ${BASE}/ || exit 1 + +echo "Creating install directory: ${DST}" +[ -d ${DST} ] || ${SUDO} mkdir -p ${DST} || exit 1 +[ -d ${DST}/${TARGET}/etc/ ] || ${SUDO} mkdir -p ${DST}/${TARGET}/etc/ || exit 1 + +export PATH="${DST}/bin:${PREFIX}/bin:$PATH" + +if which ${TARGET}-gcc 2>&1 > /dev/null; then + echo "Removing previously-installed specs file" + for i in {"${DST}","${PREFIX}"}/lib/gcc/${TARGET}/$(${TARGET}-gcc -dumpversion)/specs; do + if [ -e "$i" ]; then + ${SUDO} rm -f "$i" || exit 1 + fi + done +fi + +rm -rf ${BASE}/tests +mkdir -p ${BASE}/tests diff --git a/script/finalize.sh b/script/finalize.sh new file mode 100644 index 00000000..af2ff8e3 --- /dev/null +++ b/script/finalize.sh @@ -0,0 +1,164 @@ +echo "Copy long name executables to short name." +pushd ${DST} || exit 1 +${SUDO} mkdir -p ${TARGET}/bin +SHORT_NAME_LIST="dxegen dxe3gen dxe3res exe2coff stubify stubedit djasm gdb + g++ c++ cpp gcc gprof gcc-nm gcov-tool gcc-ranlib gcc-ar gcov-dump gcov + strings ld readelf ld.bfd size addr2line strip objcopy c++filt ar gprof ranlib as nm elfedit objdump" +for SHORT_NAME in $SHORT_NAME_LIST; do + if [ -f bin/${TARGET}-$SHORT_NAME ]; then + install_files -p bin/${TARGET}-$SHORT_NAME ${TARGET}/bin/$SHORT_NAME 2> /dev/null + fi +done +if [ ! -z ${GCC_VERSION} ]; then + install_files bin/${TARGET}-gcc bin/${TARGET}-gcc-${GCC_VERSION} 2> /dev/null + install_files bin/${TARGET}-g++ bin/${TARGET}-g++-${GCC_VERSION} 2> /dev/null + install_files ${TARGET}/bin/gcc ${TARGET}/bin/gcc-${GCC_VERSION} 2> /dev/null + install_files ${TARGET}/bin/g++ ${TARGET}/bin/g++-${GCC_VERSION} 2> /dev/null +fi +popd + +cat << STOP > ${BASE}/build/${TARGET}-setenv +#!/usr/bin/env bash +case "\$1" in +-*) cat << EOF >&2 +Usage: [source] \$(basename \$0) [command [arguments ...]] + +Set up environment variables for convenient access to the cross-compiling +toolchain targeting ${TARGET}. +This allows you to invoke the toolchain utilities via their short names (eg. +'gcc'), access target-specific documentation via 'man' and 'info', and locate +target libraries via 'pkg-config'. + +This script may be invoked in one of three ways: + * With no arguments: starts a new shell. + * With a command : executes the specified command. + * Via 'source' : exports variables into the current shell (Bash only). +EOF +exit 1 +;; +esac + +export PATH="${PREFIX}/${TARGET}/local/bin:${PREFIX}/${TARGET}/bin:${PREFIX}/bin:\$PATH" +export GCC_EXEC_PREFIX="${PREFIX}/lib/gcc/" +export MANPATH="${PREFIX}/${TARGET}/local/share/man:${PREFIX}/${TARGET}/share/man:${PREFIX}/share/man:\$MANPATH" +export INFOPATH="${PREFIX}/${TARGET}/local/share/info:${PREFIX}/${TARGET}/share/info:${PREFIX}/share/info:\$INFOPATH" +export PKG_CONFIG_LIBDIR="${PREFIX}/${TARGET}/local/lib/pkgconfig:${PREFIX}/${TARGET}/local/share/pkgconfig:${PREFIX}/${TARGET}/lib/pkgconfig:${PREFIX}/${TARGET}/share/pkgconfig" +unset PKG_CONFIG_PATH +STOP + +cat << STOP > ${BASE}/build/${TARGET}-setenv.cmd +@echo off +PATH=%~dp0..\\${TARGET}\\bin;%~dp0..\\bin;%PATH% +set GCC_EXEC_PREFIX=%~dp0..\\lib\\gcc\\ +STOP + +case $TARGET in +*-msdosdjgpp) + echo "export DJDIR=\"${PREFIX}/${TARGET}\"" >> ${BASE}/build/${TARGET}-setenv + echo "set DJDIR=%~dp0..\\${TARGET}" >> ${BASE}/build/${TARGET}-setenv.cmd + ;; +esac + +prepend_specs() +{ + sed -i "/\*$1:/{n;s#\(.*\)#$2 \1#}" ${BASE}/build/specs +} + +if [ ! -z "$(get_version gcc)" ]; then + ${TARGET}-gcc -dumpspecs > ${BASE}/build/specs +fi + +if [ ! -z "$(get_version watt32)" ]; then + WATT_ROOT="${PREFIX}/${TARGET}/watt" + WATT_INCLUDE="${WATT_ROOT}/inc" + echo "export WATT_ROOT=\"${WATT_ROOT}\"" >> ${BASE}/build/${TARGET}-setenv + case $(uname) in + MSYS*|MINGW*) + WATT_ROOT="$(cygpath -m "$WATT_ROOT")" + WATT_INCLUDE="$(cygpath -m "$WATT_INCLUDE")" + ;; + esac + echo "set WATT_ROOT=${WATT_ROOT}" >> ${BASE}/build/${TARGET}-setenv.cmd + + for i in cpp cc1plus; do + prepend_specs $i "-isystem ${WATT_INCLUDE}" + done +fi + +if [ ! -z "$(get_version gcc)" ]; then + for i in cpp cc1plus; do + prepend_specs $i "-I${PREFIX}/${TARGET}/local/include" + done + prepend_specs link "-L${PREFIX}/${TARGET}/local/lib" + + echo "Installing specs file" + install_files ${BASE}/build/specs ${DST}/lib/gcc/${TARGET}/$(${TARGET}-gcc -dumpversion)/ || exit 1 +fi + +cat << STOP >> ${BASE}/build/${TARGET}-setenv +if [ -z "\$BASH_VERSION" ] || [ "\${BASH_SOURCE[0]}" = "\$0" ]; then + if [ ! -z "\$1" ]; then + exec "\$@" + else + echo 'Entering new shell for target environment: ${TARGET}' >&2 + exec \$SHELL + fi +fi +echo 'Environment variables set up for target: ${TARGET}' >&2 +STOP + +case $TARGET in +i586-pc-msdosdjgpp) ;; +*-pc-msdosdjgpp) cat << STOP > ${BASE}/build/${TARGET}-link-i586 +#!/usr/bin/env bash +echo "Linking i586-pc-msdosdjgpp-* to ${TARGET}-*" +for PROG in ${PREFIX}/bin/${TARGET}-*; do + ln -fs \`basename \$PROG\` \${PROG/$TARGET/i586-pc-msdosdjgpp} +done +STOP + echo "Installing ${TARGET}-link-i586" + chmod +x ${BASE}/build/${TARGET}-link-i586 + install_files ${BASE}/build/${TARGET}-link-i586 ${DST}/bin/ + ;; +esac + +cat << STOP > ${BASE}/build/${TARGET}-pkg-config +#!/usr/bin/env bash +exec ${TARGET}-setenv pkg-config "\$@" +STOP + +echo "Installing ${TARGET}-setenv" +chmod +x ${BASE}/build/${TARGET}-setenv +install_files ${BASE}/build/${TARGET}-setenv ${DST}/bin/ +case `uname` in +MINGW*|MSYS*) install_files ${BASE}/build/setenv-${TARGET}.cmd ${DST}/bin/ 2> /dev/null ;; +esac + +echo "Installing ${TARGET}-pkg-config" +chmod +x ${BASE}/build/${TARGET}-pkg-config +install_files ${BASE}/build/${TARGET}-pkg-config ${DST}/bin/ + +if [ ! -z "$(get_version gcc)" ]; then + for x in $(echo $ENABLE_LANGUAGES | tr "," " ") + do + case $x in + c++) + echo "Testing C++ compiler: " + (${DST}/bin/${TARGET}-c++ ${BASE}/script/hello.c -o hello && echo "PASS") || echo "FAIL" + ;; + c) + echo "Testing C compiler: " + if ${DST}/bin/${TARGET}-gcc ${BASE}/script/hello.c -o hello; then + echo "PASS" + else + echo "FAIL" + exit 1 + fi + ;; + esac + done +fi + +echo "Done." +echo "To remove temporary build files, use: rm -rf build/" +echo "To remove downloaded source packages, use: rm -rf download/" diff --git a/script/hello.c b/script/hello.c new file mode 100644 index 00000000..6ae766ea --- /dev/null +++ b/script/hello.c @@ -0,0 +1,5 @@ +#include +int main() +{ + printf("Hello world.\n"); +} diff --git a/script/init.sh b/script/init.sh new file mode 100644 index 00000000..c5edb8e8 --- /dev/null +++ b/script/init.sh @@ -0,0 +1,180 @@ +unset CDPATH +unset SUDO +unset MAKEFLAGS +unset INSTALL + +umask 022 + +BASE=`pwd` + +# number of parallel build threads +if nproc > /dev/null 2>&1 ; then + MAKE_JOBS=${MAKE_JOBS-`nproc --all`} +else + MAKE_JOBS=${MAKE_JOBS-`sysctl -n hw.physicalcpu`} +fi + +# use gmake/clang under FreeBSD +if [ `uname` = "FreeBSD" ]; then + MAKE=${MAKE-gmake} + CC=${CC-clang} + CXX=${CXX-clang++} +else + MAKE=${MAKE-make} + CC=${CC-gcc} + CXX=${CXX-g++} +fi + +MAKE_J="${MAKE} -j${MAKE_JOBS}" + +case `uname -s` in +Darwin*) ;; +*) MAKE_J+=" -Otarget" ;; +esac + +export CC CXX MAKE + +[ ! -z ${BUILD} ] && BUILD_FLAG="--build=${BUILD}" +if [ ! -z ${HOST} ]; then + HOST_FLAG="--host=${HOST}" + IGNORE_DEPENDENCIES=yes + HOST_CC=${HOST_CC-$HOST-$CC} + HOST_CXX=${HOST_CXX-$HOST-$CXX} +else + HOST_FLAG="" + HOST_CC=${CC} + HOST_CXX=${CXX} +fi + +export CFLAGS_FOR_TARGET=${CFLAGS_FOR_TARGET-"-O2 -g -ffunction-sections -fdata-sections"} +export CXXFLAGS_FOR_TARGET=${CXXFLAGS_FOR_TARGET-"-O2 -g -ffunction-sections -fdata-sections"} +export CFLAGS CXXFLAGS LDFLAGS + +# check if cp understands --preserve (for MacOS) +if cp --preserve=mode,timestamps script/hello.c ./hello.c > /dev/null 2>&1; then + CP='cp --preserve=mode,timestamps' +else + CP='cp' +fi +rm -f hello.c 2> /dev/null + +case $(uname) in +MINGW*) + # Make sure MSYS2 Perl is used on mingw-w64 (see issue #27) + export PERL=/usr/bin/perl + # Required to build gcc on recent mingw-w64 (see issue #41) + GCC_EXTRA_CFLAGS+=' -DWIN32_LEAN_AND_MEAN' + GCC_EXTRA_CXXFLAGS+=' -DWIN32_LEAN_AND_MEAN' + ;; +esac + +install_files() +{ + ${SUDO} ${CP} -R -f "$@" +} + +untar() +{ + [ -z $1 ] && return + local file=$(basename $1) + local ext=${file##*.} + local param="-a" + case $ext in + xz) param="-J" ;; + bz2) param="-j" ;; + gz) param="-z" ;; + tar) param="" ;; + esac + tar -x ${param} -f ${BASE}/download/${file} || exit 1 +} + +strip_whitespace() { eval "$1=\"`echo ${!1}`\""; } + +prepend() { eval "$1=\"$2 ${!1}\""; } + +uppercase() { echo "$@" | tr '[:lower:]' '[:upper:]'; } +lowercase() { echo "$@" | tr '[:upper:]' '[:lower:]'; } + +get_version() +{ + local var=$(uppercase $1 | tr -d '_-')_VERSION + if [ ! -z "${!var}" ]; then + # Currently being installed + echo ${!var} + return + fi + local name=$(lowercase $1) + local version=$(cat ${PREFIX}/${TARGET}/etc/build-gcc/${name}-version 2> /dev/null) + if [ ! -z "${version}" ]; then + # Already installed + echo ${version} + return + fi + local old_version_file=$(ls ${PREFIX}/${TARGET}/etc/${name}-*-installed 2> /dev/null) + # Already installed, using old-style version file + echo $old_version_file | sed -n "s/^.*\/$name-\(.*\)-installed$/\1/p" +} + +set_version() +{ + local name=$(lowercase $1) + local var=$(uppercase $1 | tr -d '_-')_VERSION + ${SUDO} rm -f ${PREFIX}/${TARGET}/etc/${name}-*-installed + ${SUDO} mkdir -p ${DST}/${TARGET}/etc/build-gcc + ${SUDO} sh -c "echo ${!var} > ${DST}/${TARGET}/etc/build-gcc/${name}-version" +} + +unset ANY_PACKAGES_SPECIFIED + +add_pkg() +{ + for DIR in ${PACKAGE_SOURCES}; do + if [ -e $DIR/$1 ]; then + source $DIR/$1 + ANY_PACKAGES_SPECIFIED=y + return + fi + done + echo "Unrecognized option or invalid package: $1" + exit 1 +} + +prepend GCC_CONFIGURE_OPTIONS "$GLOBAL_CONFIGURE_OPTIONS" +prepend GDB_CONFIGURE_OPTIONS "$GLOBAL_CONFIGURE_OPTIONS" +prepend BINUTILS_CONFIGURE_OPTIONS "$GLOBAL_CONFIGURE_OPTIONS" +prepend NEWLIB_CONFIGURE_OPTIONS "$GLOBAL_CONFIGURE_OPTIONS" +prepend AVRLIBC_CONFIGURE_OPTIONS "$GLOBAL_CONFIGURE_OPTIONS" + +for A in "$@"; do + case $A in + --no-git-reset) NO_GIT_RESET=y ;; + --no-download) NO_DOWNLOAD=y ;; + --only-download) ONLY_DOWNLOAD=y ;; + --ignore-dependencies) IGNORE_DEPENDENCIES=y ;; + --batch) BUILD_BATCH=y ;; + --build-deb) BUILD_DEB=y ;; + --destdir=*) DESTDIR=${A#*=} ;; + --prefix=*) PREFIX=${A#*=} ;; + --target=*) TARGET=${A#*=} ;; + --enable-languages=*) ENABLE_LANGUAGES=${A#*=} ;; + *) add_pkg $A ;; + esac +done + +if [ -z "${ANY_PACKAGES_SPECIFIED}" ]; then + echo "Usage: $0 [options...] [packages...]" + echo "Commonly used options:" + echo " --prefix=[...]" + echo " --target=[...]" + echo " --enable-languages=[...]" + echo "Available packages:" + find ${PACKAGE_SOURCES} -type f | xargs -n 1 basename | sort -u | column + exit 1 +fi + +# install directory +PREFIX=${PREFIX-/usr/local/cross} + +# enabled languages +#ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,lto,f95,objc,obj-c++} +ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,lto} diff --git a/script/select-script.sh b/script/select-script.sh new file mode 100755 index 00000000..1fece6d3 --- /dev/null +++ b/script/select-script.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -e + +case $TARGET in +*-msdosdjgpp) SCRIPT=./build-djgpp.sh ;; +ia16*) SCRIPT=./build-ia16.sh ;; +avr) SCRIPT=./build-avr.sh ;; +*) SCRIPT=./build-newlib.sh ;; +esac + +${SCRIPT} --batch --target=${TARGET} ${PACKAGES} "$@" diff --git a/test-zlib.c b/script/test-zlib.c similarity index 100% rename from test-zlib.c rename to script/test-zlib.c diff --git a/script/unpack-build-binutils.sh b/script/unpack-build-binutils.sh new file mode 100644 index 00000000..2e00156f --- /dev/null +++ b/script/unpack-build-binutils.sh @@ -0,0 +1,21 @@ +cd ${BASE}/build/ || exit 1 + +if [ ! -z ${BINUTILS_VERSION} ]; then + if [ ! -e binutils-${BINUTILS_VERSION}/binutils-unpacked ]; then + echo "Unpacking binutils..." + untar ${BINUTILS_ARCHIVE} || exit 1 + + cd binutils-${BINUTILS_VERSION}/ || exit 1 + case ${BINUTILS_VERSION} in + 2.33.1) patch libctf/swap.h ${BASE}/patch/patch-binutils-2.33.1-swap.txt || exit 1 ;; + 2.34) patch libctf/swap.h ${BASE}/patch/patch-binutils-2.34-swap.txt || exit 1 ;; + esac + cat ${BASE}/patch/binutils-${BINUTILS_VERSION}/* | patch -p1 -u || exit 1 + + touch binutils-unpacked + else + cd binutils-${BINUTILS_VERSION}/ || exit 1 + fi + + source ${BASE}/script/build-binutils.sh +fi diff --git a/setenv/copyfile.sh b/setenv/copyfile.sh deleted file mode 100755 index 7fb8d724..00000000 --- a/setenv/copyfile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -if [ -z $1 ]; then - echo "Missing target directory." - exit 1 -fi - -echo "Copy setenv script" -cp setenv $1/ -if uname|grep "^MINGW" > /dev/null; then - cp setenv.bat $1/ -elif uname|grep "^CYGWIN" > /dev/null; then - cp setenv.bat $1/ -fi diff --git a/setenv/setenv b/setenv/setenv deleted file mode 100644 index 1b1b878f..00000000 --- a/setenv/setenv +++ /dev/null @@ -1,3 +0,0 @@ -export PATH="$(cd "$(dirname "$0")"; pwd)"/i586-pc-msdosdjgpp/bin/:"$(cd "$(dirname "$0")"; pwd)"/bin/:$PATH -export GCC_EXEC_PREFIX="$(cd "$(dirname "$0")"; pwd)"/lib/gcc/ -export DJDIR="$(cd "$(dirname "$0")"; pwd)"/i586-pc-msdosdjgpp diff --git a/setenv/setenv.bat b/setenv/setenv.bat deleted file mode 100644 index 044a9b3e..00000000 --- a/setenv/setenv.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -PATH=%~dp0i586-pc-msdosdjgpp\bin;%~dp0bin;%PATH% -set GCC_EXEC_PREFIX=%~dp0lib\gcc\ -set DJDIR=%~dp0i586-pc-msdosdjgpp