├── .gitattributes ├── .github └── workflows │ ├── deploy.yml │ └── main.yml ├── .gitignore ├── LICENSE ├── README.md ├── avr ├── all ├── avarice ├── avarice-2.13 ├── avarice-2.14 ├── avr-libc ├── avr-libc-2.0.0 ├── avr-libc-2.1.0 ├── avrdude ├── avrdude-6.3 ├── avrdude-6.4 ├── avrdude-7.0 ├── minimal ├── simulavr └── simulavr-git ├── binutils ├── binutils ├── binutils-2.29.1 ├── binutils-2.30 ├── binutils-2.31 ├── binutils-2.31.1 ├── binutils-2.32 ├── binutils-2.33.1 ├── binutils-2.34 ├── binutils-2.35 ├── binutils-2.35.1 ├── binutils-2.35.2 ├── binutils-2.36 ├── binutils-2.36.1 ├── binutils-2.37 ├── binutils-2.38 ├── binutils-2.39 ├── binutils-2.40 ├── binutils-2.41 ├── binutils-2.42 ├── binutils-2.43 ├── binutils-2.43.1 └── binutils-2.44 ├── build-avr.sh ├── build-djgpp.sh ├── build-ia16.sh ├── build-newlib.sh ├── common ├── gcc ├── gcc-10.1.0 ├── gcc-10.2.0 ├── gcc-10.3.0 ├── gcc-11.1.0 ├── gcc-11.2.0 ├── gcc-12.1.0 ├── gcc-12.2.0 ├── gcc-13.1.0 ├── gcc-13.2.0 ├── gcc-14.1.0 ├── gcc-14.2.0 ├── gcc-4.7.3 ├── gcc-4.8.4 ├── gcc-4.8.5 ├── gcc-4.9.2 ├── gcc-4.9.3 ├── gcc-4.9.4 ├── gcc-5.1.0 ├── gcc-5.2.0 ├── gcc-5.3.0 ├── gcc-5.4.0 ├── gcc-5.5.0 ├── gcc-6.1.0 ├── gcc-6.2.0 ├── gcc-6.3.0 ├── gcc-6.4.0 ├── gcc-7.1.0 ├── gcc-7.2.0 ├── gcc-7.3.0 ├── gcc-8.1.0 ├── gcc-8.2.0 ├── gcc-8.3.0 ├── gcc-9.1.0 ├── gcc-9.2.0 ├── gcc-9.3.0 ├── gdb ├── gdb-10.1 ├── gdb-10.2 ├── gdb-11.1 ├── gdb-11.2 ├── gdb-12.1 ├── gdb-13.1 ├── gdb-13.2 ├── gdb-14.1 ├── gdb-14.2 ├── gdb-15.1 ├── gdb-15.2 ├── gdb-16.1 ├── gdb-16.2 ├── gdb-16.3 ├── gdb-7.12.1 ├── gdb-8.0 ├── gdb-8.0.1 ├── gdb-8.1 ├── gdb-8.1.1 ├── gdb-8.2 ├── gdb-8.2.1 ├── gdb-8.3 ├── gdb-8.3.1 ├── gdb-9.1 └── gdb-9.2 ├── debian ├── binutils-djgpp-doc.install ├── binutils-djgpp.install ├── binutils-djgpp.manpages ├── changelog ├── compat ├── control ├── djgpp-dev-doc.install ├── djgpp-dev.copyright ├── djgpp-dev.install ├── djgpp-utils.install ├── gcc-djgpp-doc.install ├── gcc-djgpp.copyright ├── gcc-djgpp.install ├── gcc-djgpp.manpages ├── gdb-djgpp-doc.install ├── gdb-djgpp.install ├── gdb-djgpp.manpages ├── libwatt-djgpp-dev.install ├── pgp-secret.asc ├── rules └── source │ └── format ├── djgpp ├── all ├── binutils ├── binutils-2.29.1 ├── binutils-2.30 ├── binutils-2.31.1 ├── binutils-2.32 ├── binutils-2.33.1 ├── binutils-2.34 ├── djgpp ├── djgpp-2.05 ├── djgpp-cvs ├── gcc ├── gdb ├── minimal ├── watt32 └── watt32-git ├── ia16 ├── all ├── binutils ├── binutils-ia16 ├── gcc ├── minimal └── newlib ├── lib ├── gmp ├── gmp-6.3.0 ├── isl ├── isl-0.15 ├── isl-0.24 ├── mpc ├── mpc-1.3.1 ├── mpfr └── mpfr-4.2.1 ├── newlib ├── all ├── minimal ├── newlib ├── newlib-3.0.0 ├── newlib-3.0.0.20180226 ├── newlib-3.0.0.20180720 ├── newlib-3.0.0.20180802 ├── newlib-3.1.0 ├── newlib-3.2.0 ├── newlib-3.3.0 ├── newlib-4.0.0 ├── newlib-4.1.0 ├── newlib-4.2.0.20211231 └── newlib-4.3.0.20230120 ├── patch ├── avarice-2.13 │ └── 0000.patch ├── avarice-2.14 │ ├── 0000-throw-specifier.patch │ └── 0001-attribute-unused.patch ├── binutils-2.39 │ └── go32stub.patch ├── binutils-2.40 │ └── go32stub.patch ├── binutils-2.41 │ └── go32stub.patch ├── binutils-2.42 │ └── go32stub.patch ├── binutils-2.43.1 │ └── go32stub.patch ├── binutils-2.43 │ └── go32stub.patch ├── binutils-2.44 │ └── go32stub.patch ├── djgpp-binutils-227 │ └── 0001.patch ├── djgpp-binutils-2331 │ └── 0001-byteswap.patch ├── djgpp-binutils-234 │ ├── 0001-clear-CONTENTS-flag-if-b-flag-is-given-for-COFF-sect.patch │ └── 0002-ldscript.patch ├── djgpp-gcc-10.3.0 │ └── watt32-errno.patch ├── djgpp-gcc-13.1.0 │ ├── 0000-djcross.patch │ └── 0001-lto.patch ├── djgpp-gcc-13.2.0 │ ├── 0000-djcross.patch │ └── 0001-lto.patch ├── djgpp-gcc-14.1.0 │ ├── 0000-djcross.patch │ └── 0001-lto.patch ├── djgpp-gcc-14.2.0 │ ├── 0000-djcross.patch │ └── 0001-lto.patch ├── djgpp-gcc-8.1.0 │ └── 0001.patch ├── djgpp-gcc-8.2.0 │ └── 0001.patch ├── djgpp-gcc-9.3.0 │ └── 0001-djgpp-emit-b-flag-for-named-bss-sections.patch ├── djlsr205 │ ├── 0001-append-to-CFLAGS-in-libc-posix-regex-makefile-instea.patch │ ├── 0001-compile-separate-ident-file-for-emu387-dxe.patch │ ├── 0001-fix-handling-of-empty-environment.patch │ ├── 0001-fix-multiple-definition-errors-with-gcc-10.patch │ ├── 0001-process-make-descriptor-leak-work-around-conditional.patch │ └── patch-djlsr205.txt ├── gdb-15.1 │ └── 0000-dwarf2-read.patch ├── gdb-15.2 │ └── 0000-dwarf2-read.patch ├── gdb-8.2.1 │ └── 0000-readline.patch ├── patch-binutils-2.33.1-swap.txt ├── patch-binutils-2.34-swap.txt ├── patch-djcrx205.txt ├── patch-gcc-ia16.txt ├── patch-unpack-gcc-4.7.3.txt ├── patch-unpack-gcc-4.8.0.txt ├── patch-unpack-gcc.txt ├── watt32-djgpp-205 │ ├── djgpp.err │ └── syserr.c ├── watt32-djgpp-cvs │ ├── djgpp.err │ └── syserr.c └── watt32.patch └── script ├── build-avr-gcc.sh ├── build-binutils.sh ├── build-gdb.sh ├── build-newlib-gcc.sh ├── build-tools.sh ├── check-deps-and-confirm.sh ├── destdir-hack.sh ├── download.sh ├── finalize.sh ├── hello.c ├── init.sh ├── select-script.sh ├── test-zlib.c └── unpack-build-binutils.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | * eol=lf 3 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy PPA 2 | 3 | on: 4 | push: 5 | branches: djgpp-ppa 6 | 7 | jobs: 8 | check: 9 | runs-on: ubuntu-latest 10 | outputs: 11 | good: ${{ steps.docheck.outputs.good }} 12 | steps: 13 | - uses: actions/checkout@v4 14 | - id: docheck 15 | name: Check release state 16 | run: | 17 | echo "good=$([ -z "$(head -n 1 debian/changelog | grep 'UNRELEASED')" ] && echo 'true' || echo 'false')" >> "$GITHUB_OUTPUT" 18 | 19 | build: 20 | runs-on: ubuntu-latest 21 | needs: check 22 | if: needs.check.outputs.good == 'true' 23 | strategy: 24 | matrix: 25 | ubuntu-version: [ bionic, focal, jammy, noble, oracular, plucky ] 26 | 27 | steps: 28 | - uses: actions/checkout@v4 29 | 30 | - name: Install dependencies 31 | run: | 32 | sudo apt-get update 33 | sudo apt-get install curl git debhelper devscripts dput gpg 34 | 35 | - name: Setup package files 36 | env: 37 | UBUNTU_VERSION: ${{ matrix.ubuntu-version }} 38 | run: | 39 | mv debian/pgp-secret.asc /tmp/ 40 | sed -i "s/) unstable/~$UBUNTU_VERSION) $UBUNTU_VERSION/g" debian/changelog 41 | 42 | - name: Make source package 43 | run: | 44 | debuild -S --no-sign -d 45 | 46 | - name: Import signing key 47 | env: 48 | DECRYPT_KEY: ${{ secrets.DECRYPT_KEY }} 49 | run: | 50 | gpg --batch -k > /dev/null 51 | gpg --batch --quiet --passphrase "$DECRYPT_KEY" -d /tmp/pgp-secret.asc | gpg --batch --import 52 | rm -f /tmp/pgp-secret.asc 53 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 197C3D6E652B6B1C2B7F9EDF84089D0351487AB8 54 | 55 | - name: Sign package 56 | run: | 57 | debsign -k197C3D6E652B6B1C2B7F9EDF84089D0351487AB8 ../*.changes 58 | 59 | - name: Delete key 60 | if: always() 61 | run: | 62 | sudo shred -fu $(gpgconf --list-dirs | grep homedir | sed 's/homedir://')/priv*/* 63 | 64 | - name: Upload package 65 | run: | 66 | dput ppa:jwt27/djgpp-toolchain ../*.changes 67 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Test builds 2 | 3 | on: 4 | push: 5 | branches-ignore: djgpp-ppa 6 | pull_request: 7 | 8 | jobs: 9 | build: 10 | runs-on: ${{ matrix.os }} 11 | strategy: 12 | fail-fast: false 13 | matrix: 14 | os: [ ubuntu-latest, macos-latest ] 15 | env: 16 | - 17 | TARGET: i386-pc-msdosdjgpp 18 | PACKAGES: binutils gcc djgpp-2.05 watt32 19 | - 20 | TARGET: i386-pc-msdosdjgpp 21 | PACKAGES: binutils gcc djgpp-cvs watt32 22 | - 23 | TARGET: i386-pc-msdosdjgpp 24 | PACKAGES: gdb 25 | - 26 | TARGET: arm-eabi 27 | PACKAGES: binutils gcc newlib 28 | - 29 | TARGET: arm-eabi 30 | PACKAGES: gdb 31 | - 32 | TARGET: avr 33 | PACKAGES: binutils gcc avr-libc 34 | - 35 | TARGET: avr 36 | PACKAGES: gdb avarice simulavr avrdude 37 | - 38 | TARGET: ia16-elf 39 | PACKAGES: binutils gcc newlib 40 | 41 | steps: 42 | - uses: actions/checkout@v4 43 | 44 | - name: Clear brew package cache 45 | if: contains(matrix.os, 'macos') 46 | run: | 47 | rm -rf $(brew --cache) 48 | 49 | - name: Cache brew package cache 50 | uses: actions/cache@v4 51 | if: contains(matrix.os, 'macos') 52 | with: 53 | path: ~/Library/Caches/Homebrew 54 | key: testbuild-brew-cache-${{ github.sha }} 55 | restore-keys: | 56 | testbuild-brew-cache- 57 | 58 | - name: Install dependencies (ubuntu) 59 | if: contains(matrix.os, 'ubuntu') 60 | run: | 61 | sudo add-apt-repository ppa:ubuntu-toolchain-r/test 62 | sudo apt-get update 63 | 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 python3-dev nasm libslang2-dev ccache 64 | echo "CC=gcc-12" >> $GITHUB_ENV 65 | echo "CXX=g++-12" >> $GITHUB_ENV 66 | mkdir -p $HOME/.ccache 67 | echo "CCACHE_DIR=$HOME/.ccache" >> $GITHUB_ENV 68 | echo "/usr/lib/ccache" >> $GITHUB_PATH 69 | 70 | - name: Install dependencies (macos) 71 | if: contains(matrix.os, 'macos') 72 | run: | 73 | brew update -q 74 | brew install -q --formula bash curl make texinfo gzip xz dos2unix libtool cmake help2man nasm s-lang ccache 75 | mkdir -p $HOME/.ccache 76 | echo "CCACHE_DIR=$HOME/.ccache" >> $GITHUB_ENV 77 | echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH 78 | 79 | - name: Cache sources 80 | uses: actions/cache@v4 81 | with: 82 | path: download 83 | key: testbuild-sources-${{ matrix.os }}-${{ matrix.env.TARGET }}-${{ matrix.env.PACKAGES }}-${{ github.sha }} 84 | restore-keys: | 85 | testbuild-sources-${{ matrix.os }}-${{ matrix.env.TARGET }}-${{ matrix.env.PACKAGES }}- 86 | 87 | - name: Cache ccache 88 | uses: actions/cache@v4 89 | with: 90 | path: ${{ env.CCACHE_DIR }} 91 | key: testbuild-ccache-${{ matrix.os }}-${{ matrix.env.TARGET }}-${{ matrix.env.PACKAGES }}-${{ github.sha }} 92 | restore-keys: | 93 | testbuild-ccache-${{ matrix.os }}-${{ matrix.env.TARGET }}-${{ matrix.env.PACKAGES }}- 94 | 95 | - name: Download sources 96 | env: 97 | TARGET: ${{ matrix.env.TARGET }} 98 | PACKAGES: ${{ matrix.env.PACKAGES }} 99 | run: ./script/select-script.sh --only-download 100 | 101 | - name: Build 102 | env: 103 | TARGET: ${{ matrix.env.TARGET }} 104 | run: ./script/select-script.sh --no-download --prefix=${{ github.workspace }}-${{ github.sha }} ${{ matrix.env.PACKAGES }} 105 | 106 | - name: Clear and pack git sources before caching 107 | run: | 108 | find download/*/* ! -wholename '*/.git/*' -delete || true 109 | cd download 110 | for DIR in */; do 111 | DIR=${DIR%/} 112 | tar -c -f $DIR-git.tar $DIR 113 | done 114 | rm -rf */ 115 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | download/ 3 | install/ 4 | /Makefile 5 | debian/*/* 6 | debian/*.log 7 | debian/*.substvars 8 | debian/files 9 | debian/debhelper-build-stamp 10 | debian/*copyright 11 | !debian/source/ 12 | !debian/djgpp-dev.copyright 13 | !debian/gcc-djgpp.copyright 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Build gcc cross compiler on Windows, Mac OSX, Linux and FreeBSD. 2 | 3 | ### Upgrade notes: 4 | 5 | * 2020-02-13: default target for djgpp has changed to `i386-pc-msdosdjgpp`. 6 | If you require compatibility with distributions that use `i586`, you can either: 7 | - run `sudo i386-pc-msdosdjgpp-link-i586` after installing, or 8 | - build with `./build-djgpp.sh --target=i586-pc-msdosdjgpp`. 9 | * 2020-02-07: setenv script is now installed to `$PREFIX/bin/$TARGET-setenv`. 10 | * 2019-06-06: `master` is now the default branch again. 11 | 12 | ### Current package versions, as of 2025-05-28: 13 | 14 | * gcc 14.2.0 15 | * binutils 2.44 16 | * gdb 16.3 17 | * djgpp 2.05 / cvs 18 | * watt-32 git 19 | * newlib 4.3.0.20230120 20 | * avr-libc 2.1.0 21 | * avrdude 7.0 22 | * avarice 2.14 23 | * simulavr git 24 | 25 | ### Tested targets: 26 | 27 | * i386-pc-msdosdjgpp 28 | * ia16 29 | * arm-eabi 30 | * avr 31 | 32 | 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. 33 | 34 | ### Requirements 35 | 36 | Before running this script, you need to install these programs first: 37 | 38 | * g++ 39 | * gcc 40 | * unzip 41 | * tar 42 | * bzip2 43 | * gzip 44 | * xz 45 | * bison 46 | * flex 47 | * make (or gmake for FreeBSD) 48 | * makeinfo 49 | * patch 50 | * zlib header/library 51 | * curl or wget 52 | * bash (for FreeBSD) 53 | * python2 headers (for gdb) 54 | * python3 headers (for gdb >= 9.0) 55 | * m4 56 | * dos2unix 57 | * nasm 58 | 59 | Depending on your system, installation procedure maybe different. 60 | 61 | On Debian/Ubuntu, you can install these programs by : 62 | 63 | ```console 64 | $ sudo apt-get update 65 | $ sudo apt-get install bison flex curl gcc g++ make texinfo zlib1g-dev tar bzip2 gzip xz-utils unzip python3-dev m4 dos2unix nasm 66 | ``` 67 | 68 | Fedora : 69 | 70 | ```console 71 | $ sudo yum install gcc-c++ which bison flex texinfo patch zlib-devel tar bzip2 gzip xz unzip python-devel m4 dos2unix nasm 72 | ``` 73 | 74 | mingw-w64 (msys2) : 75 | 76 | ```console 77 | $ pacman -Syuu base-devel mingw-w64-x86_64-{toolchain,curl,zlib,python3} compression m4 dos2unix nasm 78 | ``` 79 | 80 | ### Configuration 81 | 82 | The following command line options are recognized: 83 | ```sh 84 | --prefix=... # Install location (default: /usr/local/cross) 85 | --target=... # Target name 86 | --enable-languages=... # Comma-separated list of languages to build compilers for (default: c,c++) 87 | --no-download # Do not download any files 88 | --only-download # Download source files, then exit 89 | --ignore-dependencies # Do not check package dependencies 90 | --batch # Run in batch mode (will not prompt or delay to confirm settings) 91 | ``` 92 | 93 | Several environment variables also control the build process: 94 | ```sh 95 | GCC_CONFIGURE_OPTIONS= # Extra options to pass to gcc's ./configure 96 | BINUTILS_CONFIGURE_OPTIONS= # Same, for binutils 97 | GDB_CONFIGURE_OPTIONS= # Same, for gdb 98 | NEWLIB_CONFIGURE_OPTIONS= # Same, for newlib 99 | AVRLIBC_CONFIGURE_OPTIONS= # Same, for avr-libc 100 | GLOBAL_CONFIGURE_OPTIONS= # Extra options added to all variables listed above 101 | MAKE_JOBS= # Number of parallel build threads (auto-detected) 102 | CFLAGS_FOR_TARGET= # CFLAGS used to build target libraries 103 | HOST= # The platform you are building for, when building a cross-cross compiler 104 | BUILD= # The platform you are building on (auto-detected) 105 | MAKE_CHECK= # Run test suites on built programs. 106 | MAKE_CHECK_GCC= # Run gcc test suites. 107 | ``` 108 | 109 | ### Building 110 | 111 | Pick the script you want to use: 112 | ```sh 113 | build-djgpp.sh # builds a toolchain targeting djgpp (default TARGET: i386-pc-msdosdjgpp) 114 | build-newlib.sh # builds a toolchain with the newlib C library 115 | build-ia16.sh # builds a toolchain targeting 8086 processors, with the newlib C library (fixed TARGET: ia16-elf) 116 | build-avr.sh # builds a toolchain targeting AVR microcontrollers (fixed TARGET: avr) 117 | ``` 118 | 119 | To build DJGPP, just run: 120 | ```console 121 | $ ./build-djgpp.sh [options...] [packages...] 122 | ``` 123 | Run with no arguments to see a list of supported packages and versions. 124 | 125 | For example, to build gcc 9.2.0 with the latest djgpp C library from CVS and latest binutils: 126 | ```console 127 | $ ./build-djgpp.sh --prefix=/usr/local djgpp-cvs binutils gcc-9.2.0 128 | ``` 129 | 130 | To install or upgrade all packages: 131 | ```console 132 | $ ./build-djgpp.sh --prefix=/usr/local all 133 | ``` 134 | 135 | It will download all necessary files, build DJGPP compiler, binutils, and gdb, and install it. 136 | 137 | ### Using 138 | 139 | (In the following examples, it is assumed that you built the toolchain with 140 | options `--prefix=/home/me/.local` and `--target=i386-pc-msdosdjgpp`. 141 | Substitute as necessary for your configuration.) 142 | 143 | To use your new compiler, you must add its `bin` directory to your `PATH`. 144 | You can then access the toolchain through its target-prefixed name: 145 | 146 | ```console 147 | $ PATH="/home/me/.local/bin:$PATH" 148 | $ i386-pc-msdosdjgpp-g++ hello.cpp 149 | ``` 150 | 151 | A `setenv` script will also be installed. This sets up environment variables 152 | so that you can use the toolchain as if you were working on the target machine. 153 | The toolchain utilities are then accessible through their short names (`gcc`, 154 | `ld`, etc), and you can access target-specific documentation and locate target 155 | libraries (via `man`/`info` and `pkg-config`, respectively). 156 | 157 | This script can be used either with no arguments, to start a new shell: 158 | 159 | ```console 160 | $ i386-pc-msdosdjgpp-setenv 161 | Entering new shell for target environment: i386-pc-msdosdjgpp 162 | $ which gcc 163 | /home/me/.local/i386-pc-msdosdjgpp/bin//gcc 164 | $ gcc -v 2>&1 | grep 'Target' 165 | Target: i386-pc-msdosdjgpp 166 | ``` 167 | 168 | With a single command: 169 | 170 | ```console 171 | $ i386-pc-msdosdjgpp-setenv info libc 172 | # (shows documentation for djgpp's C library) 173 | ``` 174 | 175 | Or `source`d into the current shell: (Bash only) 176 | 177 | ```console 178 | $ which gcc 179 | /usr/bin/gcc 180 | $ source i386-pc-msdosdjgpp-setenv 181 | Environment variables set up for target: i386-pc-msdosdjgpp 182 | $ which gcc 183 | /home/me/.local/i386-pc-msdosdjgpp/bin/gcc 184 | ``` 185 | 186 | ### Supported DJGPP utilities 187 | 188 | * dxe3gen 189 | * dxe3res 190 | * dxegen 191 | * exe2coff 192 | * stubedit 193 | * stubify 194 | * djasm 195 | 196 | ### Supported AVR utilities 197 | 198 | * avrdude 199 | * avarice 200 | * simulavr 201 | 202 | ### Thanks 203 | 204 | These scripts are based on Andrew Wu's build-djgpp script: 205 | 206 | Which in turn is based on spec file from DJGPP source rpm files by Andris Pavenis: 207 | 208 | -------------------------------------------------------------------------------- /avr/all: -------------------------------------------------------------------------------- 1 | source avr/minimal 2 | source common/gdb 3 | source avr/avrdude 4 | source avr/avarice 5 | source avr/simulavr 6 | -------------------------------------------------------------------------------- /avr/avarice: -------------------------------------------------------------------------------- 1 | source avr/avarice-2.14 2 | -------------------------------------------------------------------------------- /avr/avarice-2.13: -------------------------------------------------------------------------------- 1 | AVARICE_VERSION=2.13 2 | AVARICE_ARCHIVE=https://downloads.sourceforge.net/project/avarice/avarice/avarice-$AVARICE_VERSION/avarice-$AVARICE_VERSION.tar.bz2 3 | -------------------------------------------------------------------------------- /avr/avarice-2.14: -------------------------------------------------------------------------------- 1 | AVARICE_VERSION=2.14 2 | AVARICE_ARCHIVE=https://downloads.sourceforge.net/project/avarice/avarice/avarice-$AVARICE_VERSION/avarice-$AVARICE_VERSION.tar.bz2 3 | -------------------------------------------------------------------------------- /avr/avr-libc: -------------------------------------------------------------------------------- 1 | source avr/avr-libc-2.1.0 2 | -------------------------------------------------------------------------------- /avr/avr-libc-2.0.0: -------------------------------------------------------------------------------- 1 | AVRLIBC_VERSION=2.0.0 2 | AVRLIBC_ARCHIVE=http://download.savannah.gnu.org/releases/avr-libc/avr-libc-$AVRLIBC_VERSION.tar.bz2 3 | AVRLIBC_DOC_ARCHIVE=http://download.savannah.gnu.org/releases/avr-libc/avr-libc-manpages-$AVRLIBC_VERSION.tar.bz2 4 | -------------------------------------------------------------------------------- /avr/avr-libc-2.1.0: -------------------------------------------------------------------------------- 1 | AVRLIBC_VERSION=2.1.0 2 | AVRLIBC_ARCHIVE=http://download.savannah.gnu.org/releases/avr-libc/avr-libc-$AVRLIBC_VERSION.tar.bz2 3 | AVRLIBC_DOC_ARCHIVE=http://download.savannah.gnu.org/releases/avr-libc/avr-libc-manpages-$AVRLIBC_VERSION.tar.bz2 -------------------------------------------------------------------------------- /avr/avrdude: -------------------------------------------------------------------------------- 1 | source avr/avrdude-7.0 2 | -------------------------------------------------------------------------------- /avr/avrdude-6.3: -------------------------------------------------------------------------------- 1 | AVRDUDE_VERSION=6.3 2 | AVRDUDE_ARCHIVE=http://download.savannah.gnu.org/releases/avrdude/avrdude-$AVRDUDE_VERSION.tar.gz 3 | -------------------------------------------------------------------------------- /avr/avrdude-6.4: -------------------------------------------------------------------------------- 1 | AVRDUDE_VERSION=6.4 2 | AVRDUDE_ARCHIVE=http://download.savannah.gnu.org/releases/avrdude/avrdude-$AVRDUDE_VERSION.tar.gz 3 | -------------------------------------------------------------------------------- /avr/avrdude-7.0: -------------------------------------------------------------------------------- 1 | AVRDUDE_VERSION=7.0 2 | AVRDUDE_ARCHIVE=http://download.savannah.gnu.org/releases/avrdude/avrdude-$AVRDUDE_VERSION.tar.gz 3 | -------------------------------------------------------------------------------- /avr/minimal: -------------------------------------------------------------------------------- 1 | source avr/avr-libc 2 | source binutils/binutils 3 | source common/gcc 4 | -------------------------------------------------------------------------------- /avr/simulavr: -------------------------------------------------------------------------------- 1 | source avr/simulavr-git 2 | -------------------------------------------------------------------------------- /avr/simulavr-git: -------------------------------------------------------------------------------- 1 | SIMULAVR_VERSION=git 2 | SIMULAVR_GIT="https://git.savannah.nongnu.org/git/simulavr.git::master" 3 | -------------------------------------------------------------------------------- /binutils/binutils: -------------------------------------------------------------------------------- 1 | source binutils/binutils-2.44 2 | -------------------------------------------------------------------------------- /binutils/binutils-2.29.1: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.29.1 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.30: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.30 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.31: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.31 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.31.1: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.31.1 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.32: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.32 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.33.1: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.33.1 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.34: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.34 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.35: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.35 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.35.1: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.35.1 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.35.2: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.35.2 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.36: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.36 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.36.1: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.36.1 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.37: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.37 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.38: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.38 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.39: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.39 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.40: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.40 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.41: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.41 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.42: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.42 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.43: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.43 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.43.1: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.43.1 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /binutils/binutils-2.44: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2.44 2 | BINUTILS_ARCHIVE="http://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /build-avr.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PACKAGE_SOURCES="avr binutils common" 4 | source script/init.sh 5 | 6 | TARGET="avr" 7 | 8 | prepend BINUTILS_CONFIGURE_OPTIONS "--disable-werror 9 | --disable-nls" 10 | 11 | prepend GCC_CONFIGURE_OPTIONS "--disable-nls 12 | --enable-version-specific-runtime-libs 13 | --enable-fat" 14 | 15 | prepend GDB_CONFIGURE_OPTIONS "--disable-werror 16 | --disable-nls" 17 | 18 | prepend AVRLIBC_CONFIGURE_OPTIONS "--enable-device-lib" 19 | 20 | DEPS="" 21 | [ ! -z ${GCC_VERSION} ] && DEPS+=" avr-libc binutils" 22 | [ ! -z ${AVRLIBC_VERSION} ] && DEPS+=" gcc binutils" 23 | 24 | source ${BASE}/script/check-deps-and-confirm.sh 25 | source ${BASE}/script/download.sh 26 | source ${BASE}/script/build-tools.sh 27 | source ${BASE}/script/unpack-build-binutils.sh 28 | source ${BASE}/script/build-avr-gcc.sh 29 | 30 | cd ${BASE}/build/ 31 | 32 | if [ ! -z ${SIMULAVR_VERSION} ]; then 33 | echo "Building simulavr" 34 | cd simulavr/ || exit 1 35 | [ -e .git/shallow ] && git fetch --prune --unshallow 36 | git fetch --tags 37 | case `uname` in 38 | MINGW*) sed -i 's/CMAKE_CONFIG_OPTS=/CMAKE_CONFIG_OPTS=-G "MSYS Makefiles" /' Makefile ;; 39 | esac 40 | sed -i "s@-DCMAKE_INSTALL_PREFIX=@-DCMAKE_INSTALL_PREFIX=${DST} #@" Makefile 41 | sed -i 's/@make/$(MAKE)/g' Makefile 42 | sed -i 's@/bin/@@' cmake/GetGitInfo.cmake 43 | ${MAKE_J} build || exit 1 44 | ${MAKE_J} doc || exit 1 45 | [ ! -z $MAKE_CHECK ] && ${MAKE_J} -s check | tee ${BASE}/tests/simulavr.log 46 | echo "Installing simulavr" 47 | ${SUDO} ${MAKE} -C build install || exit 1 48 | cd ${BASE}/build/ || exit 1 49 | fi 50 | 51 | if [ ! -z ${AVARICE_VERSION} ]; then 52 | echo "Building AVaRICE" 53 | untar ${AVARICE_ARCHIVE} 54 | cd avarice-${AVARICE_VERSION} 55 | cat ${BASE}/patch/avarice-${AVARICE_VERSION}/* | patch -p1 -u || exit 1 56 | mkdir -p build-avr/ 57 | cd build-avr/ || exit 1 58 | rm -rf * 59 | ../configure --prefix=${PREFIX} || exit 1 60 | ${MAKE_J} || exit 1 61 | [ ! -z $MAKE_CHECK ] && ${MAKE_J} -s check | tee ${BASE}/tests/avarice.log 62 | echo "Installing AVaRICE" 63 | ${SUDO} ${MAKE_J} install || exit 1 64 | cd ${BASE}/build/ || exit 1 65 | fi 66 | 67 | if [ ! -z ${AVRDUDE_VERSION} ]; then 68 | echo "Building AVRDUDE" 69 | untar ${AVRDUDE_ARCHIVE} 70 | cd avrdude-${AVRDUDE_VERSION} 71 | mkdir -p build-avr/ 72 | cd build-avr/ || exit 1 73 | rm -rf * 74 | ../configure --prefix=${PREFIX} || exit 1 75 | ${MAKE_J} || exit 1 76 | [ ! -z $MAKE_CHECK ] && ${MAKE_J} -s check | tee ${BASE}/tests/avrdude.log 77 | echo "Installing AVRDUDE" 78 | ${SUDO} ${MAKE_J} install || exit 1 79 | cd ${BASE}/build/ || exit 1 80 | fi 81 | 82 | source ${BASE}/script/build-gdb.sh 83 | source ${BASE}/script/finalize.sh 84 | -------------------------------------------------------------------------------- /build-ia16.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PACKAGE_SOURCES="ia16 binutils" 4 | source script/init.sh 5 | 6 | TARGET="ia16-elf" 7 | 8 | prepend BINUTILS_CONFIGURE_OPTIONS "--disable-werror 9 | --disable-nls 10 | --disable-gdb 11 | --disable-sim 12 | --enable-x86-hpa-segelf=yes 13 | --enable-ld=default 14 | --enable-gold=yes" 15 | 16 | prepend GCC_CONFIGURE_OPTIONS "--disable-nls 17 | --enable-fat 18 | --disable-libstdcxx-dual-abi 19 | --disable-extern-template 20 | --disable-wchar_t 21 | --disable-libstdcxx-verbose" 22 | 23 | prepend GDB_CONFIGURE_OPTIONS "--disable-werror 24 | --disable-nls" 25 | 26 | prepend NEWLIB_CONFIGURE_OPTIONS "--enable-newlib-elix-level=2 --disable-elks-libc 27 | --disable-newlib-wide-orient --enable-newlib-nano-malloc 28 | --disable-newlib-multithread --enable-newlib-global-atexit 29 | --enable-newlib-reent-small --disable-newlib-fseek-optimization 30 | --disable-newlib-unbuf-stream-opt --enable-target-optspace 31 | --enable-newlib-io-c99-formats --enable-newlib-mb --enable-newlib-iconv 32 | --enable-newlib-iconv-encodings=utf_8,utf_16,cp850,cp852,koi8_uni" 33 | 34 | DEPS="" 35 | [ ! -z ${GCC_VERSION} ] && DEPS+=" newlib binutils" 36 | [ ! -z ${NEWLIB_VERSION} ] && DEPS+=" gcc binutils" 37 | 38 | source ${BASE}/script/check-deps-and-confirm.sh 39 | source ${BASE}/script/download.sh 40 | source ${BASE}/script/build-tools.sh 41 | 42 | cd ${BASE}/build/ || exit 1 43 | if [ "$BINUTILS_VERSION" = "ia16" ]; then 44 | cd binutils-${BINUTILS_VERSION} || exit 1 45 | source ${BASE}/script/build-binutils.sh 46 | else 47 | source ${BASE}/script/unpack-build-binutils.sh 48 | fi 49 | 50 | if [ ! -z ${GCC_VERSION} ]; then 51 | cd ${BASE}/build/gcc-ia16/ 52 | patch -p1 -u < ../../patch/patch-gcc-ia16.txt || exit 1 53 | cd - 54 | fi 55 | 56 | source ${BASE}/script/build-newlib-gcc.sh 57 | source ${BASE}/script/build-gdb.sh 58 | source ${BASE}/script/finalize.sh 59 | -------------------------------------------------------------------------------- /build-newlib.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PACKAGE_SOURCES="newlib binutils common" 4 | source script/init.sh 5 | 6 | prepend BINUTILS_CONFIGURE_OPTIONS "--disable-werror 7 | --disable-nls" 8 | 9 | prepend GCC_CONFIGURE_OPTIONS "--disable-nls 10 | --enable-libquadmath-support 11 | --enable-version-specific-runtime-libs 12 | --enable-fat" 13 | 14 | prepend GDB_CONFIGURE_OPTIONS "--disable-werror 15 | --disable-nls" 16 | 17 | DEPS="" 18 | [ ! -z ${GCC_VERSION} ] && DEPS+=" newlib binutils" 19 | [ ! -z ${NEWLIB_VERSION} ] && DEPS+=" gcc binutils" 20 | 21 | source ${BASE}/script/check-deps-and-confirm.sh 22 | source ${BASE}/script/download.sh 23 | source ${BASE}/script/build-tools.sh 24 | source ${BASE}/script/unpack-build-binutils.sh 25 | source ${BASE}/script/build-newlib-gcc.sh 26 | source ${BASE}/script/build-gdb.sh 27 | source ${BASE}/script/finalize.sh 28 | -------------------------------------------------------------------------------- /common/gcc: -------------------------------------------------------------------------------- 1 | source common/gcc-14.2.0 2 | -------------------------------------------------------------------------------- /common/gcc-10.1.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=10.1.0 2 | GCC_VERSION_SHORT=10.10 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-10.2.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=10.2.0 2 | GCC_VERSION_SHORT=10.20 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-10.3.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=10.3.0 2 | GCC_VERSION_SHORT=10.30 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-11.1.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=11.1.0 2 | GCC_VERSION_SHORT=11.10 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-11.2.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=11.2.0 2 | GCC_VERSION_SHORT=11.20 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-12.1.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=12.1.0 2 | GCC_VERSION_SHORT=12.10 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-12.2.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=12.2.0 2 | GCC_VERSION_SHORT=12.20 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-13.1.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=13.1.0 2 | GCC_VERSION_SHORT=13.10 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | 14 | DJCROSS_METHOD=patch 15 | -------------------------------------------------------------------------------- /common/gcc-13.2.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=13.2.0 2 | GCC_VERSION_SHORT=13.20 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | 14 | DJCROSS_METHOD=patch 15 | -------------------------------------------------------------------------------- /common/gcc-14.1.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=14.1.0 2 | GCC_VERSION_SHORT=14.10 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | 14 | DJCROSS_METHOD=patch 15 | -------------------------------------------------------------------------------- /common/gcc-14.2.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=14.2.0 2 | GCC_VERSION_SHORT=14.20 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | 14 | DJCROSS_METHOD=patch 15 | -------------------------------------------------------------------------------- /common/gcc-4.7.3: -------------------------------------------------------------------------------- 1 | GCC_VERSION=4.7.3 2 | GCC_VERSION_SHORT=4.73 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" 9 | 10 | GCC_CONFIGURE_OPTIONS="${GCC_CONFIGURE_OPTIONS}" 11 | 12 | GCC_EXTRA_CFLAGS="-std=gnu90" 13 | -------------------------------------------------------------------------------- /common/gcc-4.8.4: -------------------------------------------------------------------------------- 1 | GCC_VERSION=4.8.4 2 | GCC_VERSION_SHORT=4.84 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" 9 | 10 | GCC_CONFIGURE_OPTIONS="--enable-lto \ 11 | ${GCC_CONFIGURE_OPTIONS}" 12 | 13 | GCC_EXTRA_CFLAGS="-std=gnu90" 14 | -------------------------------------------------------------------------------- /common/gcc-4.8.5: -------------------------------------------------------------------------------- 1 | GCC_VERSION=4.8.5 2 | GCC_VERSION_SHORT=4.85 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" 9 | 10 | GCC_CONFIGURE_OPTIONS="--enable-lto \ 11 | ${GCC_CONFIGURE_OPTIONS}" 12 | 13 | GCC_EXTRA_CFLAGS="-std=gnu90" 14 | -------------------------------------------------------------------------------- /common/gcc-4.9.2: -------------------------------------------------------------------------------- 1 | GCC_VERSION=4.9.2 2 | GCC_VERSION_SHORT=4.92 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" 9 | 10 | GCC_CONFIGURE_OPTIONS="--enable-lto \ 11 | ${GCC_CONFIGURE_OPTIONS}" 12 | 13 | GCC_EXTRA_CFLAGS="-std=gnu90" 14 | -------------------------------------------------------------------------------- /common/gcc-4.9.3: -------------------------------------------------------------------------------- 1 | GCC_VERSION=4.9.3 2 | GCC_VERSION_SHORT=4.93 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" 9 | 10 | GCC_CONFIGURE_OPTIONS="--enable-lto \ 11 | ${GCC_CONFIGURE_OPTIONS}" 12 | 13 | GCC_EXTRA_CFLAGS="-std=gnu90" 14 | -------------------------------------------------------------------------------- /common/gcc-4.9.4: -------------------------------------------------------------------------------- 1 | GCC_VERSION=4.9.4 2 | GCC_VERSION_SHORT=4.94 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" 9 | 10 | GCC_CONFIGURE_OPTIONS="--enable-lto \ 11 | ${GCC_CONFIGURE_OPTIONS}" 12 | 13 | GCC_EXTRA_CFLAGS="-std=gnu90" 14 | -------------------------------------------------------------------------------- /common/gcc-5.1.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=5.1.0 2 | GCC_VERSION_SHORT=5.10 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-5.2.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=5.2.0 2 | GCC_VERSION_SHORT=5.20 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-5.3.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=5.3.0 2 | GCC_VERSION_SHORT=5.30 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-5.4.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=5.4.0 2 | GCC_VERSION_SHORT=5.40 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-5.5.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=5.5.0 2 | GCC_VERSION_SHORT=5.50 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.bz2" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-6.1.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=6.1.0 2 | GCC_VERSION_SHORT=6.10 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.6 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-6.2.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=6.2.0 2 | GCC_VERSION_SHORT=6.20 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.6 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-6.3.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=6.3.0 2 | GCC_VERSION_SHORT=6.30 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.6 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-6.4.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=6.4.0 2 | GCC_VERSION_SHORT=6.40 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.6 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | --enable-libstdcxx-filesystem-ts \ 13 | ${GCC_CONFIGURE_OPTIONS}" 14 | -------------------------------------------------------------------------------- /common/gcc-7.1.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=7.1.0 2 | GCC_VERSION_SHORT=7.10 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.6 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | --enable-libstdcxx-filesystem-ts \ 13 | ${GCC_CONFIGURE_OPTIONS}" 14 | -------------------------------------------------------------------------------- /common/gcc-7.2.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=7.2.0 2 | GCC_VERSION_SHORT=7.20 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.6 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | --enable-libstdcxx-filesystem-ts \ 13 | ${GCC_CONFIGURE_OPTIONS}" 14 | -------------------------------------------------------------------------------- /common/gcc-7.3.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=7.3.0 2 | GCC_VERSION_SHORT=7.30 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.6 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | --enable-libstdcxx-filesystem-ts \ 13 | ${GCC_CONFIGURE_OPTIONS}" 14 | -------------------------------------------------------------------------------- /common/gcc-8.1.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=8.1.0 2 | GCC_VERSION_SHORT=8.10 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.6 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | --enable-libstdcxx-filesystem-ts \ 13 | ${GCC_CONFIGURE_OPTIONS}" 14 | -------------------------------------------------------------------------------- /common/gcc-8.2.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=8.2.0 2 | GCC_VERSION_SHORT=8.20 3 | AUTOCONF_VERSION=2.64 4 | AUTOMAKE_VERSION=1.11.6 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | DJCROSS_GCC_ARCHIVE="http://ap1.pp.fi/djgpp/gcc/${GCC_VERSION}/rpm/djcross-gcc-${GCC_VERSION}.tar.bz2" 11 | 12 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 13 | --enable-lto \ 14 | --enable-libstdcxx-filesystem-ts \ 15 | ${GCC_CONFIGURE_OPTIONS}" 16 | -------------------------------------------------------------------------------- /common/gcc-8.3.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=8.3.0 2 | GCC_VERSION_SHORT=8.30 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | --enable-libstdcxx-filesystem-ts \ 13 | ${GCC_CONFIGURE_OPTIONS}" 14 | -------------------------------------------------------------------------------- /common/gcc-9.1.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=9.1.0 2 | GCC_VERSION_SHORT=9.10 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-9.2.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=9.2.0 2 | GCC_VERSION_SHORT=9.20 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gcc-9.3.0: -------------------------------------------------------------------------------- 1 | GCC_VERSION=9.3.0 2 | GCC_VERSION_SHORT=9.30 3 | AUTOCONF_VERSION=2.69 4 | AUTOMAKE_VERSION=1.15.1 5 | 6 | GCC_ARCHIVE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" 7 | AUTOCONF_ARCHIVE="http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.xz" 8 | AUTOMAKE_ARCHIVE="http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.xz" 9 | 10 | GCC_CONFIGURE_OPTIONS="--disable-plugin \ 11 | --enable-lto \ 12 | ${GCC_CONFIGURE_OPTIONS}" 13 | -------------------------------------------------------------------------------- /common/gdb: -------------------------------------------------------------------------------- 1 | source common/gdb-16.3 2 | -------------------------------------------------------------------------------- /common/gdb-10.1: -------------------------------------------------------------------------------- 1 | GDB_VERSION=10.1 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-10.2: -------------------------------------------------------------------------------- 1 | GDB_VERSION=10.2 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-11.1: -------------------------------------------------------------------------------- 1 | GDB_VERSION=11.1 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-11.2: -------------------------------------------------------------------------------- 1 | GDB_VERSION=11.2 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-12.1: -------------------------------------------------------------------------------- 1 | GDB_VERSION=12.1 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-13.1: -------------------------------------------------------------------------------- 1 | GDB_VERSION=13.1 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-13.2: -------------------------------------------------------------------------------- 1 | GDB_VERSION=13.2 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-14.1: -------------------------------------------------------------------------------- 1 | GDB_VERSION=14.1 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-14.2: -------------------------------------------------------------------------------- 1 | GDB_VERSION=14.2 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-15.1: -------------------------------------------------------------------------------- 1 | GDB_VERSION=15.1 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-15.2: -------------------------------------------------------------------------------- 1 | GDB_VERSION=15.2 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-16.1: -------------------------------------------------------------------------------- 1 | GDB_VERSION=16.1 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-16.2: -------------------------------------------------------------------------------- 1 | GDB_VERSION=16.2 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-16.3: -------------------------------------------------------------------------------- 1 | GDB_VERSION=16.3 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-7.12.1: -------------------------------------------------------------------------------- 1 | GDB_VERSION=7.12.1 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-8.0: -------------------------------------------------------------------------------- 1 | GDB_VERSION=8.0 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-8.0.1: -------------------------------------------------------------------------------- 1 | GDB_VERSION=8.0.1 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-8.1: -------------------------------------------------------------------------------- 1 | GDB_VERSION=8.1 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-8.1.1: -------------------------------------------------------------------------------- 1 | GDB_VERSION=8.1.1 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-8.2: -------------------------------------------------------------------------------- 1 | GDB_VERSION=8.2 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-8.2.1: -------------------------------------------------------------------------------- 1 | GDB_VERSION=8.2.1 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-8.3: -------------------------------------------------------------------------------- 1 | GDB_VERSION=8.3 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-8.3.1: -------------------------------------------------------------------------------- 1 | GDB_VERSION=8.3.1 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-9.1: -------------------------------------------------------------------------------- 1 | GDB_VERSION=9.1 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /common/gdb-9.2: -------------------------------------------------------------------------------- 1 | GDB_VERSION=9.2 2 | GDB_ARCHIVE="http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /debian/binutils-djgpp-doc.install: -------------------------------------------------------------------------------- 1 | usr/i386-pc-msdosdjgpp/share/info/gprof.info 2 | usr/i386-pc-msdosdjgpp/share/info/binutils.info 3 | usr/i386-pc-msdosdjgpp/share/info/as.info 4 | usr/i386-pc-msdosdjgpp/share/info/ld.info 5 | usr/i386-pc-msdosdjgpp/share/info/bfd.info 6 | -------------------------------------------------------------------------------- /debian/binutils-djgpp.install: -------------------------------------------------------------------------------- 1 | usr/i*86-pc-msdosdjgpp/lib/ldscripts/* 2 | usr/i*86-pc-msdosdjgpp/bin/strings 3 | usr/i*86-pc-msdosdjgpp/bin/ld 4 | usr/i*86-pc-msdosdjgpp/bin/readelf 5 | usr/i*86-pc-msdosdjgpp/bin/ld.bfd 6 | usr/i*86-pc-msdosdjgpp/bin/size 7 | usr/i*86-pc-msdosdjgpp/bin/addr2line 8 | usr/i*86-pc-msdosdjgpp/bin/strip 9 | usr/i*86-pc-msdosdjgpp/bin/objcopy 10 | usr/i*86-pc-msdosdjgpp/bin/c++filt 11 | usr/i*86-pc-msdosdjgpp/bin/ar 12 | usr/i*86-pc-msdosdjgpp/bin/gprof 13 | usr/i*86-pc-msdosdjgpp/bin/ranlib 14 | usr/i*86-pc-msdosdjgpp/bin/as 15 | usr/i*86-pc-msdosdjgpp/bin/nm 16 | usr/i*86-pc-msdosdjgpp/bin/elfedit 17 | usr/i*86-pc-msdosdjgpp/bin/objdump 18 | usr/bin/i*86-pc-msdosdjgpp-strings 19 | usr/bin/i*86-pc-msdosdjgpp-ld 20 | usr/bin/i*86-pc-msdosdjgpp-readelf 21 | usr/bin/i*86-pc-msdosdjgpp-ld.bfd 22 | usr/bin/i*86-pc-msdosdjgpp-size 23 | usr/bin/i*86-pc-msdosdjgpp-addr2line 24 | usr/bin/i*86-pc-msdosdjgpp-strip 25 | usr/bin/i*86-pc-msdosdjgpp-objcopy 26 | usr/bin/i*86-pc-msdosdjgpp-c++filt 27 | usr/bin/i*86-pc-msdosdjgpp-ar 28 | usr/bin/i*86-pc-msdosdjgpp-gprof 29 | usr/bin/i*86-pc-msdosdjgpp-ranlib 30 | usr/bin/i*86-pc-msdosdjgpp-as 31 | usr/bin/i*86-pc-msdosdjgpp-nm 32 | usr/bin/i*86-pc-msdosdjgpp-elfedit 33 | usr/bin/i*86-pc-msdosdjgpp-objdump 34 | -------------------------------------------------------------------------------- /debian/binutils-djgpp.manpages: -------------------------------------------------------------------------------- 1 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gprof.1 2 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-ar.1 3 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-ranlib.1 4 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-windmc.1 5 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-objdump.1 6 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-c++filt.1 7 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-strings.1 8 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-readelf.1 9 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-ld.1 10 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-size.1 11 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-objcopy.1 12 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-as.1 13 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-strip.1 14 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-dlltool.1 15 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-addr2line.1 16 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-nm.1 17 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-elfedit.1 18 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-windres.1 19 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | djgpp-toolchain (14) UNRELEASED; urgency=medium 2 | 3 | * gdb version 16.3. 4 | * binutils version 2.44. 5 | 6 | -- jwt27 Wed, 28 May 2025 17:01:58 +0200 7 | 8 | djgpp-toolchain (13.1) unstable; urgency=medium 9 | 10 | * binutils version 2.43.1. 11 | * gdb version 15.1. 12 | * gcc version 14.2.0. 13 | 14 | -- jwt27 Mon, 23 Sep 2024 20:02:06 +0200 15 | 16 | djgpp-toolchain (12.1) unstable; urgency=medium 17 | 18 | * Set 'Architecture: all' for library packages. 19 | * binutils version 2.43. 20 | * gcc version 14.1.0. 21 | 22 | -- jwt27 Sun, 18 Aug 2024 17:10:30 +0200 23 | 24 | djgpp-toolchain (11) unstable; urgency=medium 25 | 26 | * Add wrapper script for pkg-config: i386-pc-msdosdjgpp-pkg-config 27 | * Fix libc bug in ioctl()/fcntl() that prevented arguments from being passed 28 | through to fsext handlers (socket library). 29 | * binutils version 2.41. 30 | 31 | -- jwt27 Sun, 29 Oct 2023 14:26:37 +0100 32 | 33 | djgpp-toolchain (10) unstable; urgency=medium 34 | 35 | * dxe3gen version 1.0.5. This now uses gcc to invoke the assembler and 36 | linker. As a result, it is no longer necessary to set any environment 37 | variables before use. 38 | * binutils version 2.40. 39 | 40 | -- jwt27 Thu, 18 May 2023 14:32:45 +0200 41 | 42 | djgpp-toolchain (9) unstable; urgency=medium 43 | 44 | * Update go32 stub in binutils to match libc version. 45 | 46 | -- jwt27 Sun, 20 Nov 2022 23:02:05 +0100 47 | 48 | djgpp-toolchain (8) unstable; urgency=low 49 | 50 | * Add virtual packages for gcc and libc. 51 | * Set architecture for doc packages to 'all'. 52 | 53 | -- jwt27 Wed, 28 Sep 2022 18:54:18 +0200 54 | 55 | djgpp-toolchain (7.1) unstable; urgency=low 56 | 57 | * Move meta-packages to new repository. 58 | * The compiler now looks for locally-installed libraries in 59 | /usr/i386-pc-msdosdjgpp/local/. 60 | 61 | -- jwt27 Sun, 25 Sep 2022 02:21:08 +0200 62 | 63 | djgpp-toolchain (6) unstable; urgency=low 64 | 65 | * Improve Debian package system. 66 | * Compile target libraries with '-ffunction-sections -fdata-sections'. 67 | * Configure gcc with '--libexecdir=/usr/lib'. 68 | * Add convenience packages 'djgpp' and 'djgpp-doc'. 69 | * Install documentation in exec-prefix (/usr/i386-pc-msdosdjgpp/). 70 | * Drop 'extra' packages and install their contents in exec-prefix. 71 | 72 | -- jwt27 Mon, 19 Sep 2022 19:20:38 +0200 73 | 74 | djgpp-toolchain (5) unstable; urgency=low 75 | 76 | * gcc version 12.2.0 77 | * binutils version 2.39 78 | 79 | -- jwt27 Tue, 23 Aug 2022 22:48:50 +0200 80 | 81 | djgpp-toolchain (4) unstable; urgency=low 82 | 83 | * Enhanced setenv script. It now has the ability to start a new shell or 84 | execute an single command in the target environment. 85 | 86 | -- jwt27 Tue, 16 Aug 2022 18:51:10 +0200 87 | 88 | djgpp-toolchain (3) unstable; urgency=low 89 | 90 | * Keep ubuntu release name in binary package version numbers. 91 | 92 | -- jwt27 Mon, 15 Aug 2022 17:21:34 +0200 93 | 94 | djgpp-toolchain (2) unstable; urgency=low 95 | 96 | * Correct bash path in rules script. 97 | 98 | -- jwt27 Mon, 15 Aug 2022 16:41:32 +0200 99 | 100 | djgpp-toolchain (1) unstable; urgency=low 101 | 102 | * Binary packages for each component now have correct version numbers, and 103 | the source package version is changed to just a single number. 104 | * As a result of the above change, binutils-djgpp from this package now 105 | overrides the one that comes with Debian. 106 | * Target libraries are no longer stripped. 107 | * Package 'djgpp' has been split into 'djgpp-dev' and 'djgpp-utils'. 108 | 109 | -- jwt27 Mon, 15 Aug 2022 16:24:08 +0200 110 | 111 | djgpp-toolchain (0.20220523.0+gcc12.1.0+bnu2.38.0+gdb8.2.1+djcvs) unstable; urgency=low 112 | 113 | * gcc version 12.1.0 114 | 115 | -- jwt27 Mon, 23 May 2022 16:43:08 +0200 116 | 117 | djgpp-toolchain (0.20220317.0+gcc10.3.0+bnu2.38.0+gdb8.2.1+djcvs) unstable; urgency=low 118 | 119 | * fix build on i386. 120 | 121 | -- jwt27 Thu, 17 Mar 2022 00:53:38 +0100 122 | 123 | djgpp-toolchain (0.20220316.2+gcc10.3.0+bnu2.38.0+gdb8.2.1+djcvs) unstable; urgency=low 124 | 125 | * new package: libwatt-djgpp-dev 126 | 127 | -- jwt27 Wed, 16 Mar 2022 19:08:24 +0100 128 | 129 | djgpp-toolchain (0.20220215.0+gcc10.3.0+bnu2.38.0+gdb8.2.1+djcvs) unstable; urgency=low 130 | 131 | * binutils version 2.38. 132 | 133 | -- jwt27 Tue, 15 Feb 2022 17:49:47 +0100 134 | 135 | djgpp-toolchain (0.20211110.0+gcc10.3.0+bnu2.37.0+gdb8.2.1+djcvs) unstable; urgency=low 136 | 137 | * gcc version 10.3.0. 138 | * binutils version 2.37. 139 | 140 | -- jwt27 Wed, 10 Nov 2021 11:35:08 +0100 141 | 142 | djgpp-toolchain (0.20210430.0+gcc10.2.0+bnu2.36.1+gdb8.2.1+djcvs) unstable; urgency=low 143 | 144 | * binutils version 2.36.1. 145 | 146 | -- jwt27 Fri, 30 Apr 2021 20:55:58 +0200 147 | 148 | djgpp-toolchain (0.20210203.0+gcc10.2.0+bnu2.36.0+gdb8.2.1+djcvs) unstable; urgency=low 149 | 150 | * binutils version 2.36. 151 | 152 | -- jwt27 Wed, 03 Feb 2021 00:14:56 +0100 153 | 154 | djgpp-toolchain (0.20201102.0+gcc10.2.0+bnu2.35.1+gdb8.2.1+djcvs) unstable; urgency=low 155 | 156 | * binutils version 2.35.1. 157 | 158 | -- jwt27 Mon, 02 Nov 2020 21:11:19 +0100 159 | 160 | djgpp-toolchain (0.20200730.0+gcc10.2.0+bnu2.34.0+gdb8.2.1+djcvs) unstable; urgency=low 161 | 162 | * gcc version 10.2.0. 163 | 164 | -- jwt27 Thu, 30 Jul 2020 12:36:44 +0200 165 | 166 | djgpp-toolchain (0.20200509.0+gcc10.1.0+bnu2.34.0+gdb8.2.1+djcvs) unstable; urgency=low 167 | 168 | * gcc version 10.1.0. 169 | 170 | -- jwt27 Sat, 09 May 2020 17:36:20 +0200 171 | 172 | djgpp-toolchain (0.20200505.0+gcc9.3.0+bnu2.34.0+gdb8.2.1+djcvs) unstable; urgency=low 173 | 174 | * gcc version 9.3.0. 175 | * patch binutils and gcc to use "b" flag for bss sections. 176 | 177 | -- jwt27 Tue, 05 May 2020 16:35:24 +0200 178 | 179 | djgpp-toolchain (0.20200310.0+gcc9.2.0+bnu2.34.0+gdb8.2.1+djcvs) unstable; urgency=low 180 | 181 | * binutils version 2.34. 182 | 183 | -- jwt27 Tue, 10 Mar 2020 21:31:14 +0100 184 | 185 | djgpp-toolchain (0.20200229.0+gcc9.2.0+bnu2.33.1+gdb8.2.1+djcvs) unstable; urgency=low 186 | 187 | * make gcc-djgpp in focal depend on 2.34-3ubuntu1+1.4 188 | 189 | -- jwt27 Sat, 29 Feb 2020 16:37:17 +0100 190 | 191 | djgpp-toolchain (0.20200213.2+gcc9.2.0+bnu2.33.1+gdb8.2.1+djcvs) unstable; urgency=low 192 | 193 | * remove binutils-djgpp and binutils-djgpp-doc for focal and require upstream binutils-djgpp. 194 | 195 | -- jwt27 Thu, 13 Feb 2020 21:51:35 +0100 196 | 197 | djgpp-toolchain (0.20200213.1+gcc9.2.0+bnu2.33.1+gdb8.2.1+djcvs) unstable; urgency=low 198 | 199 | * fix package names in control file. 200 | 201 | -- jwt27 Thu, 13 Feb 2020 16:27:55 +0100 202 | 203 | djgpp-toolchain (0.20200213.0+gcc9.2.0+bnu2.33.1+gdb8.2.1+djcvs) unstable; urgency=medium 204 | 205 | * Initial Release. 206 | 207 | -- jwt27 Thu, 13 Feb 2020 02:40:22 +0100 208 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 11 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: djgpp-toolchain 2 | Section: devel 3 | Priority: optional 4 | Maintainer: jwt27 5 | Build-Depends: 6 | git, 7 | bash, 8 | make, 9 | unzip, 10 | wget, 11 | bison, 12 | flex, 13 | texinfo, 14 | patch, 15 | tar, 16 | xz-utils, 17 | bzip2, 18 | gzip, 19 | dos2unix, 20 | zlib1g-dev, 21 | nasm, 22 | libslang2-dev, 23 | pkg-config, 24 | debhelper (>= 11) 25 | Standards-Version: 4.1.2 26 | Homepage: https://github.com/jwt27/build-gcc 27 | 28 | Package: djgpp-dev 29 | Architecture: all 30 | Depends: ${misc:Depends} 31 | Recommends: binutils-djgpp, gcc-djgpp, djgpp-utils 32 | Suggests: djgpp-dev-doc 33 | Provides: libc-djgpp-dev (= ${binary:Version}) 34 | Conflicts: libc-djgpp-dev 35 | Description: DJGPP development kit -- libraries 36 | 37 | Package: djgpp-utils 38 | Architecture: any 39 | Depends: ${shlibs:Depends}, ${misc:Depends} 40 | Recommends: binutils-djgpp, gcc-djgpp, djgpp-dev 41 | Description: DJGPP development kit -- utilities 42 | Various utilities used to develop djgpp applications: 43 | * djasm 44 | * dxegen 45 | * dxe3gen 46 | * dxe3res 47 | * exe2coff 48 | * setenv 49 | * stubedit 50 | * stubify 51 | 52 | Package: djgpp-dev-doc 53 | Architecture: all 54 | Depends: ${misc:Depends} 55 | Suggests: djgpp-dev 56 | Description: DJGPP development kit -- documentation 57 | 58 | Package: gcc-djgpp 59 | Architecture: any 60 | Depends: ${shlibs:Depends}, ${misc:Depends}, 61 | djgpp-utils, 62 | binutils-djgpp (>= 2.35.2) 63 | Recommends: djgpp-dev 64 | Suggests: gcc-djgpp-doc 65 | Provides: 66 | gcc-i386-pc-msdosdjgpp (= ${binary:Version}), 67 | g++-i386-pc-msdosdjgpp (= ${binary:Version}), 68 | g++-djgpp (= ${binary:Version}), 69 | libstdc++-djgpp-dev (= ${binary:Version}) 70 | Conflicts: 71 | gcc-i386-pc-msdosdjgpp, 72 | g++-i386-pc-msdosdjgpp, 73 | g++-djgpp, 74 | libstdc++-djgpp-dev 75 | Description: GNU Compiler Collection 76 | Cross-compiler targeting djgpp. This package contains both gcc, g++, and 77 | libstdc++. 78 | If you need compiler support for other languages, please let me know. 79 | 80 | Package: gcc-djgpp-doc 81 | Architecture: all 82 | Depends: ${misc:Depends} 83 | Suggests: gcc-djgpp 84 | Description: GNU Compiler Collection -- documentation 85 | 86 | Package: binutils-djgpp 87 | Architecture: any 88 | Depends: ${shlibs:Depends}, ${misc:Depends} 89 | Recommends: djgpp-utils 90 | Suggests: binutils-djgpp-doc 91 | Description: GNU Binutils 92 | Linker, assembler and other binary utilities targeting djgpp. 93 | 94 | Package: binutils-djgpp-doc 95 | Architecture: all 96 | Depends: ${misc:Depends} 97 | Suggests: binutils-djgpp 98 | Description: GNU Binutils -- documentation 99 | 100 | Package: gdb-djgpp 101 | Architecture: any 102 | Depends: ${shlibs:Depends}, ${misc:Depends} 103 | Suggests: gdb-djgpp-doc 104 | Description: GNU Debugger 105 | Used to debug djgpp programs over a serial connection. 106 | 107 | Package: gdb-djgpp-doc 108 | Architecture: all 109 | Depends: ${misc:Depends} 110 | Suggests: gdb-djgpp 111 | Description: GNU Debugger -- documentation 112 | 113 | Package: libwatt-djgpp-dev 114 | Architecture: all 115 | Depends: ${misc:Depends} 116 | Recommends: djgpp-dev, gcc-djgpp 117 | Description: Watt-32 TCP socket library for DJGPP 118 | -------------------------------------------------------------------------------- /debian/djgpp-dev-doc.install: -------------------------------------------------------------------------------- 1 | usr/i386-pc-msdosdjgpp/share/info/libm.info 2 | usr/i386-pc-msdosdjgpp/share/info/libc.info 3 | usr/i386-pc-msdosdjgpp/share/info/kb.info 4 | -------------------------------------------------------------------------------- /debian/djgpp-dev.install: -------------------------------------------------------------------------------- 1 | usr/i*86-pc-msdosdjgpp/lib/libg.a 2 | usr/i*86-pc-msdosdjgpp/lib/libm.a 3 | usr/i*86-pc-msdosdjgpp/lib/libemu.a 4 | usr/i*86-pc-msdosdjgpp/lib/libpc.a 5 | usr/i*86-pc-msdosdjgpp/lib/crt0.o 6 | usr/i*86-pc-msdosdjgpp/lib/djgpp.djl 7 | usr/i*86-pc-msdosdjgpp/lib/gcrt0.o 8 | usr/i*86-pc-msdosdjgpp/lib/libc.a 9 | usr/i*86-pc-msdosdjgpp/lib/libdbg.a 10 | usr/i*86-pc-msdosdjgpp/lib/libtz.a 11 | usr/i*86-pc-msdosdjgpp/sys-include/* 12 | -------------------------------------------------------------------------------- /debian/djgpp-utils.install: -------------------------------------------------------------------------------- 1 | usr/i*86-pc-msdosdjgpp/lib/dxe.ld 2 | usr/i*86-pc-msdosdjgpp/bin/stubedit 3 | usr/i*86-pc-msdosdjgpp/bin/dxe3gen 4 | usr/i*86-pc-msdosdjgpp/bin/dxe3res 5 | usr/i*86-pc-msdosdjgpp/bin/djasm 6 | usr/i*86-pc-msdosdjgpp/bin/stubify 7 | usr/i*86-pc-msdosdjgpp/bin/dxegen 8 | usr/i*86-pc-msdosdjgpp/bin/exe2coff 9 | usr/bin/i*86-pc-msdosdjgpp-djasm 10 | usr/bin/i*86-pc-msdosdjgpp-dxe3gen 11 | usr/bin/i*86-pc-msdosdjgpp-exe2coff 12 | usr/bin/i*86-pc-msdosdjgpp-stubify 13 | usr/bin/i*86-pc-msdosdjgpp-dxegen 14 | usr/bin/i*86-pc-msdosdjgpp-stubedit 15 | usr/bin/i*86-pc-msdosdjgpp-dxe3res 16 | usr/bin/i*86-pc-msdosdjgpp-setenv 17 | usr/bin/i*86-pc-msdosdjgpp-pkg-config 18 | -------------------------------------------------------------------------------- /debian/gcc-djgpp-doc.install: -------------------------------------------------------------------------------- 1 | usr/i386-pc-msdosdjgpp/share/info/libquadmath.info 2 | usr/i386-pc-msdosdjgpp/share/info/gccint.info 3 | usr/i386-pc-msdosdjgpp/share/info/gcc.info 4 | usr/i386-pc-msdosdjgpp/share/info/cpp.info 5 | usr/i386-pc-msdosdjgpp/share/info/cppinternals.info 6 | usr/i386-pc-msdosdjgpp/share/info/gccinstall.info 7 | usr/i386-pc-msdosdjgpp/share/man/man7/fsf-funding.7 8 | usr/i386-pc-msdosdjgpp/share/man/man7/gpl.7 9 | usr/i386-pc-msdosdjgpp/share/man/man7/gfdl.7 10 | -------------------------------------------------------------------------------- /debian/gcc-djgpp.install: -------------------------------------------------------------------------------- 1 | usr/lib/gcc/i*86-pc-msdosdjgpp/* 2 | usr/i*86-pc-msdosdjgpp/bin/g++ 3 | usr/i*86-pc-msdosdjgpp/bin/gcc-nm 4 | usr/i*86-pc-msdosdjgpp/bin/c++ 5 | usr/i*86-pc-msdosdjgpp/bin/cpp 6 | usr/i*86-pc-msdosdjgpp/bin/gcc 7 | usr/i*86-pc-msdosdjgpp/bin/gcc-*.*.* 8 | usr/i*86-pc-msdosdjgpp/bin/gcov-tool 9 | usr/i*86-pc-msdosdjgpp/bin/gcc-ranlib 10 | usr/i*86-pc-msdosdjgpp/bin/gcc-ar 11 | usr/i*86-pc-msdosdjgpp/bin/g++-*.*.* 12 | usr/i*86-pc-msdosdjgpp/bin/gcov-dump 13 | usr/i*86-pc-msdosdjgpp/bin/gcov 14 | usr/bin/i*86-pc-msdosdjgpp-g++ 15 | usr/bin/i*86-pc-msdosdjgpp-gcc-nm 16 | usr/bin/i*86-pc-msdosdjgpp-c++ 17 | usr/bin/i*86-pc-msdosdjgpp-cpp 18 | usr/bin/i*86-pc-msdosdjgpp-gcc 19 | usr/bin/i*86-pc-msdosdjgpp-gcc-*.*.* 20 | usr/bin/i*86-pc-msdosdjgpp-gcov-tool 21 | usr/bin/i*86-pc-msdosdjgpp-gcc-ranlib 22 | usr/bin/i*86-pc-msdosdjgpp-gcc-ar 23 | usr/bin/i*86-pc-msdosdjgpp-g++-*.*.* 24 | usr/bin/i*86-pc-msdosdjgpp-gcov-dump 25 | usr/bin/i*86-pc-msdosdjgpp-gcov 26 | usr/i386-pc-msdosdjgpp/share/gcc-*/python/libstdcxx/v6/printers.py 27 | usr/i386-pc-msdosdjgpp/share/gcc-*/python/libstdcxx/v6/__init__.py 28 | usr/i386-pc-msdosdjgpp/share/gcc-*/python/libstdcxx/v6/xmethods.py 29 | usr/i386-pc-msdosdjgpp/share/gcc-*/python/libstdcxx/__init__.py 30 | -------------------------------------------------------------------------------- /debian/gcc-djgpp.manpages: -------------------------------------------------------------------------------- 1 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gcov-dump.1 2 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-cpp.1 3 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gcov.1 4 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-g++.1 5 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gcov-tool.1 6 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gcc.1 7 | -------------------------------------------------------------------------------- /debian/gdb-djgpp-doc.install: -------------------------------------------------------------------------------- 1 | usr/i386-pc-msdosdjgpp/share/info/annotate.info 2 | usr/i386-pc-msdosdjgpp/share/info/gdb.info 3 | usr/i386-pc-msdosdjgpp/share/info/stabs.info 4 | -------------------------------------------------------------------------------- /debian/gdb-djgpp.install: -------------------------------------------------------------------------------- 1 | usr/i*86-pc-msdosdjgpp/bin/gdb 2 | usr/bin/i*86-pc-msdosdjgpp-gdb 3 | usr/bin/i*86-pc-msdosdjgpp-gdb-add-index 4 | usr/i*86-pc-msdosdjgpp/etc/build-gcc/gdb-version 5 | usr/i386-pc-msdosdjgpp/share/gdb/system-gdbinit/elinos.py 6 | usr/i386-pc-msdosdjgpp/share/gdb/system-gdbinit/wrs-linux.py 7 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/aarch64-linux.xml 8 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/s390-linux.xml 9 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/mips-n32-linux.xml 10 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/sparc64-linux.xml 11 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/s390x-linux.xml 12 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/ppc64-linux.xml 13 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/arm-linux.xml 14 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/amd64-linux.xml 15 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/mips-n64-linux.xml 16 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/freebsd.xml 17 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/i386-linux.xml 18 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/ppc-linux.xml 19 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/sparc-linux.xml 20 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/mips-o32-linux.xml 21 | usr/i386-pc-msdosdjgpp/share/gdb/syscalls/gdb-syscalls.dtd 22 | -------------------------------------------------------------------------------- /debian/gdb-djgpp.manpages: -------------------------------------------------------------------------------- 1 | usr/i386-pc-msdosdjgpp/share/man/man5/i386-pc-msdosdjgpp-gdbinit.5 2 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gdbserver.1 3 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gdb.1 4 | usr/i386-pc-msdosdjgpp/share/man/man1/i386-pc-msdosdjgpp-gdb-add-index.1 5 | -------------------------------------------------------------------------------- /debian/libwatt-djgpp-dev.install: -------------------------------------------------------------------------------- 1 | usr/i*86-pc-msdosdjgpp/watt/* 2 | usr/i*86-pc-msdosdjgpp/lib/libwatt.a 3 | usr/i*86-pc-msdosdjgpp/lib/libsocket.a 4 | -------------------------------------------------------------------------------- /debian/pgp-secret.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP MESSAGE----- 2 | 3 | jA0ECQMC9U4w6T6btxDH0uwBAz22e3Wdz5Cuqnkzqd+bfRRqgIv9Y10BAJBszWAy 4 | nLNiUkxHiPz4K7r1Fd3IyIwT+fABqOfjbf06351ftHRr4SE4rxdM87sNVwGnkWyT 5 | uUx3/FMnYTmeMmvDtP0BpvdxmTW7a2Rvu/HBgauFHqD16lnwerA8jgWLHdlgORyr 6 | oUItL3iex2mr+epg+xugrLFw8QaQNQQNOsKt+40V4+eDOw95yVfl7WS8hAQ+nUqx 7 | kgoqhCW8/CsIepZJMKa1y3FrRVqcFmZLJvbmiWmzFb9onBteHXAmXd8RXqh6N6f2 8 | chHkuyL2uEnlmAkl85ojfiQfj+zorbXGmsVaVTJseKQElNNeretpLeJx/44uZCME 9 | hgWujojfz0BHJAHj/hSoeRL9hSUFUf/DPZfKNKjVNgQCo+/6VjvOQ5qAievmpTGV 10 | K9ageAgzeJvSxOM/6RChLI8x2NASrDhTPnT+m7cczv7shoLKpem1xRwZZy/m3Ii+ 11 | eGC6+jyg3jfKsjPupVsu2kSx06uSLUqk9GFo+UqR4W91ySP5tvV4L5m7dgkVoeUC 12 | ANS8+ostbAdgrGEXKTWx0UMjO5gkB8GINibloAxm7JZKiVW8b2HDXNO73OiQAzcc 13 | Jg/VHYajkNWWSxQy1biRlhI21+T/Tnls6tp+3i5r+8SnXiU7wOnG/K9Ilw8HiR/I 14 | VNmQ3VJTvUijK2ui979YeXLQgDofhtP6byYDgZ92QnC68V4Tghx8ru42pEmiOB9a 15 | mwNGTQ1RpS4XPwgHTTjzaYqZWt6rklvVhBlIJS6tG6HsACnKSWJjSa2PmRQkQgt3 16 | qrPkaVCau/nrzlA9BxaJycTHoyR4zu9dwtoKN6ykl8aOZAg43BxuEqCf3xvxrNdt 17 | N0jHN0DsrRn5UOPqFXOSJiZEDZ/48KlPLJFoXkgqRgI385SZaYgZRVt5cQ6JOaeo 18 | CUy2+qXPWS4lI7CheLhbjWUIdQo0bGaSzyAqHH0h5WwQ5Iu4KxmjZxA+DR702v3J 19 | HMjEIqCUD/CPh5Tf35KFFlHqo5pTpa8x3Tmbt2UMB7wD5xDzL4QN5K4J0R6Kk0Oi 20 | mkEMfal9WehYFdP7vBlVhyUCG1RwN4apjbni+K9xeEZz0sywAmlRGYnmSgSVO5oG 21 | gzWh8gY3KOE50+BhosWbL2/dbPgWxEgrPDuIVRwWwLt1KdqMH++FP/a6C0g+EjCN 22 | /TSvpStOy1y3eR5rAR2rREup0Aqes9UbAWeohXZxxghyH72kNPX63U1+7rvlseUU 23 | hPOXBcP7l4FdDuRMRwj0xYFDcNiX1lU71TGxPjW7cplADm1L17dPkPiPinvgCMgb 24 | K/QL7vaU6FxmXu/E7Eo7lK7yjcU+bJLkJiAFxWyARKHE1a4fC5FjXcMgmJFXT47m 25 | hvEs47UlDwhSdszdrrCts9AfezGmKrWNcHfHhLVYs/moMMlmduZmYKMWLT6qqoHM 26 | ta79vbTubULM0wVYcGJPCss9471RIes9n/wShA5ufQWQyWUaCjM04VuyPVsORCMi 27 | oqcRmIz8ULVpYN0RXJ0qh30m7CrhUmziHKoGEzu2BeUWFSN3qkkAwHuDyUn5EXR6 28 | 8le5EB/RAP4A3Sw1OF2jClsrW1a4L7r1Dy/s2cOFw339GhyP4WCkUzwc+7M1tL5L 29 | be3zBRSpBtqBSwzMnu9HHVcT+QT1SWQmRhjbiw7/yqX7m3ZCsWMyVp39G+4o0hAa 30 | KUdRUSSsEe+n0Hkx60tHfh7Y2W5MTgV6BAoDiyl6iPsZD7ooc8K5wlK76dl+lWdD 31 | uGYp3imHAI/PsmLPtw6T0Ex59xNiTuuhzmjAodsMAGbR4np5vEbhueg8/O8h7AS2 32 | KTVcX1WQwAI2YSavJj0dFMzEtLksOAVXz4wiushbqRXdp7f5ojeEXjEhsZb3fTMk 33 | m4EBndpAxVJ6tB0/SczknpGCicxHfnVMOj9UrOfYToXJ1eD0/QaerIeFoFq1geIY 34 | Z0DRI2vvTXBA8DlpmNxqSYn6U2N9s8U6PPTglnRi/gZJQTT8ZVEhKE8CSXk4MxJs 35 | tt65ey70A7y6WEvO5RUFCdFbE2tWgITg8cfD3v9YVzjUI6G2t89tK9dLhskhYVzR 36 | LxnCyi+bh2vkdnQCyvLf67LZnzhTRuuYAeE6bkLKBYkBXK5kQFkOud3ts9oLrQnP 37 | i3mzEUFK7LkaiLgt4/I1sl6xAkwkh/2AYRogKYqMV4gwcV2CV8MEcYjT8Qq8bIKm 38 | s1E3kAuqM13bMPZq2VayXoFDgPHu94YV3H2CXDYukf8Sy90n+mDcZTkNy1GpEoxi 39 | y4ley0BzKJBgV6sDDca7y6Tb/keJiDFLLt0cBLOSh2R0+w7Hk1hVLmM0KtD6LLMx 40 | wp9XscbjkkUylorYILBag0R6vYaFdtCMaw2Ra8yq1HDzLTx1h1Xwa4sbrYvh5Uxe 41 | Ti5tO4xWGFltJ8PzIdHGXV3GiynuvIw/1pfqZibPB5y5XQwBznQLCJtVYRgvv5Sq 42 | 4xMY3BeisEB7FFAb2ryK1orb4QdEC4S4uhvcgEVxcZZpAyyuUkjchTtZKU6wzgho 43 | uZJ4fdHxPcGgg4ygV1NOOFrfv7yLroIxq6JhQ6Ahno71VBgRxvXXpeJ6jcqKbWO/ 44 | UikgWapMG+ZEW/cr2p2ejZ2088KecKmc7uO+B4ZrM5SijK/6BJ7cHgz5rXveZZ1o 45 | 2unKFVK+/0JbXRU/QcIf0gV75S46LB6kEubkQ1iT2NoSM9VWrTnxCutcw3wiQlvc 46 | k8cjx4CSTaoO/Yq4hi1DsQLAoXtbAZYTRMOKLjnLqlv+Xst56oQvdSXNR5KC2xth 47 | P0Hxx3pok+aite8RF5aiaGf16lqrAqYjmRdod3UrjlE/i+WyvM73/96hohMpBHVI 48 | N6uCd6id3b29DTtHQLeBWJ2dfCSCRXMAubhPkOaCXysW2576wqaGMShxKIcJs68j 49 | /mAizU6IhDwtHnHr6oP4G9xuKhXYeWb16Y0LI+Ob0EzyDipXKpeYiUAWqrUrlN7t 50 | O1cWi+F9X/K5iS+2F8ZFIFF3+PgW+KUPniim8XwFPuAJz7jB1GdrUSkqftpYUbah 51 | sFzI71d4wQsQXdd5nWfPXNGziuXjKafjtTzkThTjgDxK3EAFyvNR4Ad/5RFE+jMR 52 | JDIA9AMVa28mmoa9OJnXpDO/5IeUNz2d4jTeGbLnaXT7PZT2mb7ZGIzVUZs+xkmP 53 | oq3cujscdzAQk7ep5qqVlueDoa2/dwTwPDDnclJaOFf8tB+5QBLUPINfF+wbQamD 54 | tAOgs6DDiucV5jGRS+ZQ1l3N/bd4RcQ8IJ3XoOZXdPfYW1I7tyYhUpM7YWpGp7SU 55 | qEEWLRNyj1Cy+4sGNoyVFWx0qQ27rs1Jb9ab/4zVfuc+SdizlvbdoA4dYZuD/TwY 56 | k8viTtq5gTMDOUBFvVnNfmbBJEIGXIVGwfJu0eXACaTbRCbzqSYFqxlPNoqyihif 57 | xH89Tgc7BxLQwbwfYl3VBSD7bY2tQV6rDAloh9ubFADgeIC5Mvb9gCV8SeF/1kap 58 | fIRBE57kyyRMsIqOQueSx10FU97rEDurj72oHwMyZLrqGhoutL5AOZEmNvTnYeR3 59 | 3tyQrzH9eZjXkIJ61OYBJ729+XBhvZoCQCnPKLuBXa81WBjTzjJzStnj9TFm6Jo3 60 | mTp8mCriKwnOYagmi0H6pYjlFhvJJsom0KewyznoveeQN56JOOySeCJTPZ4yy4I6 61 | NuXsF2TSpVJ3cLwvguuiJShmIE3m3GmipWPFKgYi4uGbB8ArZKCm6uXY9/6PFcMm 62 | ElZQ3o8YAUAHuwj0ZmQBHC83QyB/aKo9pZbPqqXbkZcmAL5SDOQU0b1XrvLuhlGO 63 | cdZmWM6GeSnLBp2bEJ7tOSnoVggp0fq5l8EZ3QrZ5aLOs2zaKxy7tDHzrbtDAgmz 64 | U67WMWXeZY2YZfVLyqPfEEavIrLlenit0uz9ajSllSPGjEL0fVbGqZBCbXZAa9rr 65 | DSAZ5NO+QeIVLaFivcyVhbb9ydSYMfRXIdmzjRCjzTTIXZRlEGEAkd2rjL+bnLDk 66 | fF+vq3rWVgcZ9QDhZjWMTeIJBKNOAf8WJx2AbxCRTDQEysNeH4343SkclvmE6/X9 67 | ndmgjkx2dpll7fryIggUCQMvOm7RVYEGW0q3hudo0afVMkOXR58Q08q1N44iHW/v 68 | /pNsyJyYqBfpPOhGQewehXS0FFtoAp0ryO01FiFtPfvRlGvm8hQEOb4zZ/pNCXoO 69 | eLRv6vdcMvMT9OD7YQCocKcMUaDDCD9Ay1uHDmtYb+TpdRm08M6kQZyqMVa8PPPq 70 | MOp2oSQ5m9/CC1T9Je+yftRwtpi3cI8BLnIBi1djy989WPiL5JDVUR7Re6YPI7cf 71 | eYGYgl7ESIUuXggsyugZhk0Cj7VFWMtu8aJBiJdZwY9FzYN3oEVc37NOPAx+MJIM 72 | zjlzznq7uBOu0Tag7YDjjkCmLbvX+RpFDUyT64c9BRzSqgAuEgPjYL2/7mk8RVgp 73 | paMI15zt6nH8TSei2JRKj2ZgF+ABpGvDuI/ssLJ3TP+oYvIxp9QzofJRWY2KQndN 74 | hyITDc0cd/kyA5IGzXc9azkeVg1ISOTBV78k45JzvWKdHJrkD2cjFq1Kbmt+dBam 75 | 5MKlTNaG5ckz15PRI2VBhJvTEsiqCvk2mXW4kCuxJOcmub3dcnnHnvJO2xJlMOOt 76 | x1/sMQElsYHUvrlgpyjn7h42QnY6ZFfZh2FxO/d+Lzbk0h4GfMmPvx6DnmktJHzY 77 | LSL6vH4JX0vhnMIG/oEkA7oQtoSUvK6Tl94asqjUB9h4fcpwZRw5Cbcqm9EtmR8a 78 | knOGEa5bJsSMQkkmRSPzsdqhkRgs+i1YT+T8zViR/TV0arAWdtjIBI2nKV+t0peR 79 | i/HfBTFkynX1O0twH28l+5Xcr7GwxkpqTG0EPKmBVuwD/oN2nKGC2D0owJADovTS 80 | U/1/54SiIKo7OYX1LqQtwx2K7HGdsMvbicnwo++SQO0qpMb1CCGCB1flUgz31qgX 81 | 5+KlhW3fVUv430XlbQo58hzdYlXPR9YZGrugg+ogimpBgV16130iPlEI1OzDbCvE 82 | tccDJ6UYQCTlvWyiCrDv+912WufJGvfzhYPdRLclg158I3mRyQT++lPQTj+ORCsV 83 | YzbBTC1H6wYBcpo/H/gcTNVdeVbBLwN4nv3WT2lHGyBLJ4mmz+rK2Vpx5xBUDdG/ 84 | ASzHztv2H9TL5EgddRCbN612JgNq+dI9cvwtIP7BoXoGbKLzwj/zF4FT+Hax/LFR 85 | iV2fQxUa5NmOqv0QPYpqu+76WSdflRza94EJ03Sxvks/qwn+xJlKUmEn9wzuD2MH 86 | WtaXXcHEyurTkc8GxnCGkTu7jUI1ahNskkmzWfMS3tGhnt0tDaT18BUKV53/wPW2 87 | cnIvc+XDMk8I9FEGiWiktH8LDKHG2c+5Hz3F3qZnzTcNyb34tl0AN1aexHKIPzju 88 | H901BNW4MInOi3e04dFzefR1ntfW3qZ2tdpvH4iRQseQwLx1Hc/HaZ20KH2a3IiY 89 | GVbghBT6wGGMbEzIq4gr/vvz5HJvzo3RTrHJe1lDajBCxVensdRtOMDD0aB18p0C 90 | +7Y+Sy3WdLBpJd5lRDvh3LsErP2P2S04Ev0msXUukJ8xzxigNptzKRIZ+xvdU3Z2 91 | rfAklyyT8rbLG/oVb8g8oNo6Arc4mzQnX2jCAYwwBMSzkHoUwDmAm6mMccHrbudQ 92 | Sz3gDun9EiFYP4pJs7srIAO9onDIN/r+J7s4I+mEER8gFcovui4VxzjSAZ4VBcpH 93 | PfMBfUsUiy3KGgPpNSOKphxsJB4jmyyxEgLnWSwqfaqICMkToQEyDGND/N+sxfrf 94 | qt6IrQOH+fDOmDqKUdbhe9l2dUegHcWmH7Pa4NkY58TFa+EWpy29MRKr4dVSVhY0 95 | 21pBGX0VoXrf/KOHPwRrvPLp/Qckabduyzzf91uHNTBal8pAeYTW96Wf/O6rVWRG 96 | a9X0KYsFkEMyoygezAo2nSK3jORQpbfh4zQufB06BQ== 97 | =3fzz 98 | -----END PGP MESSAGE----- 99 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | DPKG_EXPORT_BUILDFLAGS := 1 4 | include /usr/share/dpkg/default.mk 5 | 6 | SHELL := /bin/bash 7 | 8 | PACKAGES := djgpp-cvs binutils gcc gdb watt32 9 | 10 | git_date = $(shell date --date='$(shell cd $(1) && git log -1 --format=%cI)' -u +%4Y%m%d.%H%M) 11 | 12 | GCC_VERSION = $(shell source ./djgpp/gcc && echo $$GCC_VERSION) 13 | BINUTILS_VERSION = $(shell source ./djgpp/binutils && echo $$BINUTILS_VERSION) 14 | GDB_VERSION = $(shell source ./djgpp/gdb && echo $$GDB_VERSION) 15 | DJGPP_VERSION = 2.05.cvs.$(call git_date, download/djgpp-cvs) 16 | WATT32_VERSION = 2.2.11.git.$(call git_date, download/Watt-32) 17 | 18 | %: 19 | dh $@ 20 | 21 | override_dh_gencontrol: 22 | dh_gencontrol 23 | dh_gencontrol -pdjgpp-utils -- -v$(DJGPP_VERSION)+$(DEB_VERSION) 24 | dh_gencontrol -pdjgpp-dev -- -v$(DJGPP_VERSION)+$(DEB_VERSION) 25 | dh_gencontrol -pdjgpp-dev-doc -- -v$(DJGPP_VERSION)+$(DEB_VERSION) 26 | dh_gencontrol -pgcc-djgpp -- -v$(GCC_VERSION)+$(DEB_VERSION) 27 | dh_gencontrol -pgcc-djgpp-doc -- -v$(GCC_VERSION)+$(DEB_VERSION) 28 | dh_gencontrol -pbinutils-djgpp -- -v$(BINUTILS_VERSION)+$(DEB_VERSION) 29 | dh_gencontrol -pbinutils-djgpp-doc -- -v$(BINUTILS_VERSION)+$(DEB_VERSION) 30 | dh_gencontrol -pgdb-djgpp -- -v$(GDB_VERSION)+$(DEB_VERSION) 31 | dh_gencontrol -pgdb-djgpp-doc -- -v$(GDB_VERSION)+$(DEB_VERSION) 32 | dh_gencontrol -plibwatt-djgpp-dev -- -v$(WATT32_VERSION)+$(DEB_VERSION) 33 | 34 | override_dh_strip: 35 | dh_strip --exclude=.a 36 | 37 | override_dh_auto_clean: 38 | cp LICENSE debian/copyright 39 | cp LICENSE debian/binutils-djgpp.copyright 40 | cp LICENSE debian/gdb-djgpp.copyright 41 | cp debian/djgpp-dev.copyright debian/djgpp-utils.copyright 42 | cp debian/djgpp-dev.copyright debian/djgpp-dev-doc.copyright 43 | cp debian/gcc-djgpp.copyright debian/gcc-djgpp-doc.copyright 44 | cp debian/binutils-djgpp.copyright debian/binutils-djgpp-doc.copyright 45 | cp debian/gdb-djgpp.copyright debian/gdb-djgpp-doc.copyright 46 | ./build-djgpp.sh --batch --build-deb --only-download $(PACKAGES) 47 | -rm -rf build/ install/ debian/pgp-secret.asc 48 | 49 | override_dh_auto_configure: 50 | 51 | override_dh_auto_build: 52 | GLOBAL_CONFIGURE_OPTIONS='--datarootdir=/usr/i386-pc-msdosdjgpp/share --libexecdir=/usr/lib' \ 53 | CFLAGS="$(CFLAGS) -Wno-error=format-security" \ 54 | CXXFLAGS="$(CXXFLAGS) -Wno-error=format-security" \ 55 | CFLAGS_FOR_TARGET='-O2 -g -ffunction-sections -fdata-sections -mtune=pentium' \ 56 | CXXFLAGS_FOR_TARGET='-O2 -g -ffunction-sections -fdata-sections -mtune=pentium' \ 57 | ./build-djgpp.sh --batch --build-deb --no-download --prefix=/usr --destdir=$(CURDIR)/install $(PACKAGES) 58 | 59 | override_dh_auto_install: 60 | sed -i 's#in /#in #' install/usr/bin/i386-pc-msdosdjgpp-link-i586 61 | cd install/ && ./usr/bin/i386-pc-msdosdjgpp-link-i586 62 | mkdir -p debian/tmp 63 | mv -f install/* debian/tmp/ 64 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /djgpp/all: -------------------------------------------------------------------------------- 1 | source djgpp/default 2 | source djgpp/gdb 3 | source djgpp/watt32 4 | -------------------------------------------------------------------------------- /djgpp/binutils: -------------------------------------------------------------------------------- 1 | source binutils/binutils 2 | -------------------------------------------------------------------------------- /djgpp/binutils-2.29.1: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2291 2 | BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" 3 | -------------------------------------------------------------------------------- /djgpp/binutils-2.30: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=230 2 | BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" 3 | -------------------------------------------------------------------------------- /djgpp/binutils-2.31.1: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2311 2 | BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" 3 | -------------------------------------------------------------------------------- /djgpp/binutils-2.32: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=232 2 | BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" 3 | -------------------------------------------------------------------------------- /djgpp/binutils-2.33.1: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=2331 2 | BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/deleted/v2gnu/bnu${BINUTILS_VERSION}s.zip" 3 | -------------------------------------------------------------------------------- /djgpp/binutils-2.34: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=234 2 | BINUTILS_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2gnu/bnu${BINUTILS_VERSION}s.zip" 3 | -------------------------------------------------------------------------------- /djgpp/djgpp: -------------------------------------------------------------------------------- 1 | source djgpp/djgpp-cvs 2 | -------------------------------------------------------------------------------- /djgpp/djgpp-2.05: -------------------------------------------------------------------------------- 1 | DJGPP_VERSION=205 2 | 3 | DJCRX_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djcrx${DJGPP_VERSION}.zip" 4 | DJLSR_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djlsr${DJGPP_VERSION}.zip" 5 | DJDEV_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/current/v2/djdev${DJGPP_VERSION}.zip" 6 | -------------------------------------------------------------------------------- /djgpp/djgpp-cvs: -------------------------------------------------------------------------------- 1 | DJGPP_VERSION=cvs 2 | DJGPP_GIT="https://github.com/jwt27/djgpp-cvs.git::jwt27" 3 | -------------------------------------------------------------------------------- /djgpp/gcc: -------------------------------------------------------------------------------- 1 | source common/gcc 2 | -------------------------------------------------------------------------------- /djgpp/gdb: -------------------------------------------------------------------------------- 1 | source common/gdb 2 | -------------------------------------------------------------------------------- /djgpp/minimal: -------------------------------------------------------------------------------- 1 | source djgpp/djgpp 2 | source djgpp/binutils 3 | source djgpp/gcc 4 | -------------------------------------------------------------------------------- /djgpp/watt32: -------------------------------------------------------------------------------- 1 | source djgpp/watt32-git 2 | -------------------------------------------------------------------------------- /djgpp/watt32-git: -------------------------------------------------------------------------------- 1 | WATT32_VERSION=git 2 | WATT32_GIT='https://github.com/gvanem/Watt-32.git::master' 3 | -------------------------------------------------------------------------------- /ia16/all: -------------------------------------------------------------------------------- 1 | source ia16/minimal 2 | -------------------------------------------------------------------------------- /ia16/binutils: -------------------------------------------------------------------------------- 1 | source ia16/binutils-ia16 2 | -------------------------------------------------------------------------------- /ia16/binutils-ia16: -------------------------------------------------------------------------------- 1 | BINUTILS_VERSION=ia16 2 | BINUTILS_GIT="https://github.com/tkchia/binutils-ia16.git::binutils-ia16-tkchia" 3 | -------------------------------------------------------------------------------- /ia16/gcc: -------------------------------------------------------------------------------- 1 | GCC_VERSION="ia16" 2 | 3 | GCC_GIT="https://github.com/tkchia/gcc-ia16.git::gcc-6_3_0-ia16-tkchia" 4 | 5 | GCC_CONFIGURE_OPTIONS="--disable-plugin 6 | --enable-lto 7 | --disable-libstdcxx-dual-abi 8 | ${GCC_CONFIGURE_OPTIONS}" 9 | 10 | source lib/isl-0.15 11 | -------------------------------------------------------------------------------- /ia16/minimal: -------------------------------------------------------------------------------- 1 | source ia16/binutils 2 | source ia16/gcc 3 | source ia16/newlib 4 | -------------------------------------------------------------------------------- /ia16/newlib: -------------------------------------------------------------------------------- 1 | NEWLIB_VERSION="ia16" 2 | NEWLIB_GIT="https://github.com/tkchia/newlib-ia16.git::newlib-2_4_0-ia16-tkchia" 3 | -------------------------------------------------------------------------------- /lib/gmp: -------------------------------------------------------------------------------- 1 | source lib/gmp-6.3.0 2 | -------------------------------------------------------------------------------- /lib/gmp-6.3.0: -------------------------------------------------------------------------------- 1 | GMP_VERSION=6.3.0 2 | GMP_ARCHIVE="http://ftpmirror.gnu.org/gnu/gmp/gmp-${GMP_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /lib/isl: -------------------------------------------------------------------------------- 1 | source lib/isl-0.24 2 | -------------------------------------------------------------------------------- /lib/isl-0.15: -------------------------------------------------------------------------------- 1 | ISL_VERSION=0.15 2 | ISL_ARCHIVE="http://gcc.gnu.org/pub/gcc/infrastructure/isl-${ISL_VERSION}.tar.bz2" 3 | -------------------------------------------------------------------------------- /lib/isl-0.24: -------------------------------------------------------------------------------- 1 | ISL_VERSION=0.24 2 | ISL_ARCHIVE="http://gcc.gnu.org/pub/gcc/infrastructure/isl-${ISL_VERSION}.tar.bz2" 3 | -------------------------------------------------------------------------------- /lib/mpc: -------------------------------------------------------------------------------- 1 | source lib/mpc-1.3.1 2 | -------------------------------------------------------------------------------- /lib/mpc-1.3.1: -------------------------------------------------------------------------------- 1 | MPC_VERSION=1.3.1 2 | MPC_ARCHIVE="http://ftpmirror.gnu.org/gnu/mpc/mpc-${MPC_VERSION}.tar.gz" 3 | -------------------------------------------------------------------------------- /lib/mpfr: -------------------------------------------------------------------------------- 1 | source lib/mpfr-4.2.1 2 | -------------------------------------------------------------------------------- /lib/mpfr-4.2.1: -------------------------------------------------------------------------------- 1 | MPFR_VERSION=4.2.1 2 | MPFR_ARCHIVE="http://ftpmirror.gnu.org/gnu/mpfr/mpfr-${MPFR_VERSION}.tar.xz" 3 | -------------------------------------------------------------------------------- /newlib/all: -------------------------------------------------------------------------------- 1 | source newlib/minimal 2 | source common/gdb 3 | -------------------------------------------------------------------------------- /newlib/minimal: -------------------------------------------------------------------------------- 1 | source newlib/newlib 2 | source binutils/binutils 3 | source common/gcc 4 | -------------------------------------------------------------------------------- /newlib/newlib: -------------------------------------------------------------------------------- 1 | source newlib/newlib-4.3.0.20230120 2 | -------------------------------------------------------------------------------- /newlib/newlib-3.0.0: -------------------------------------------------------------------------------- 1 | NEWLIB_VERSION=3.0.0 2 | NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" 3 | -------------------------------------------------------------------------------- /newlib/newlib-3.0.0.20180226: -------------------------------------------------------------------------------- 1 | NEWLIB_VERSION=3.0.0.20180226 2 | NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" 3 | -------------------------------------------------------------------------------- /newlib/newlib-3.0.0.20180720: -------------------------------------------------------------------------------- 1 | NEWLIB_VERSION=3.0.0.20180720 2 | NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" 3 | -------------------------------------------------------------------------------- /newlib/newlib-3.0.0.20180802: -------------------------------------------------------------------------------- 1 | NEWLIB_VERSION=3.0.0.20180802 2 | NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" 3 | -------------------------------------------------------------------------------- /newlib/newlib-3.1.0: -------------------------------------------------------------------------------- 1 | NEWLIB_VERSION=3.1.0 2 | NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" 3 | -------------------------------------------------------------------------------- /newlib/newlib-3.2.0: -------------------------------------------------------------------------------- 1 | NEWLIB_VERSION=3.2.0 2 | NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" 3 | -------------------------------------------------------------------------------- /newlib/newlib-3.3.0: -------------------------------------------------------------------------------- 1 | NEWLIB_VERSION=3.3.0 2 | NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" 3 | -------------------------------------------------------------------------------- /newlib/newlib-4.0.0: -------------------------------------------------------------------------------- 1 | NEWLIB_VERSION=4.0.0 2 | NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" 3 | -------------------------------------------------------------------------------- /newlib/newlib-4.1.0: -------------------------------------------------------------------------------- 1 | NEWLIB_VERSION=4.1.0 2 | NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" 3 | -------------------------------------------------------------------------------- /newlib/newlib-4.2.0.20211231: -------------------------------------------------------------------------------- 1 | NEWLIB_VERSION=4.2.0.20211231 2 | NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" 3 | -------------------------------------------------------------------------------- /newlib/newlib-4.3.0.20230120: -------------------------------------------------------------------------------- 1 | NEWLIB_VERSION=4.3.0.20230120 2 | NEWLIB_ARCHIVE="http://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz" 3 | -------------------------------------------------------------------------------- /patch/avarice-2.13/0000.patch: -------------------------------------------------------------------------------- 1 | Description: Fix FTBFS for GCC 5 2 | Author: Tobias Frost 3 | Bug: https://sourceforge.net/p/avarice/patches/34/ 4 | Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777789 5 | Last-Update: 2015-05-18 6 | --- 7 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ 8 | --- a/src/pragma.h 9 | +++ b/src/pragma.h 10 | @@ -28,9 +28,10 @@ 11 | */ 12 | #if defined(__GNUC__) 13 | # if __GNUC__ > 4 14 | -# define PRAGMA_DIAG_PUSH _Pragma(GCC diagnostic push) 15 | -# define PRAGMA_DIAG_POP _Pragma(GCC diagnostic pop) 16 | -# define PRAGMA_DIAG_IGNORED(x) _Pragma(GCC diagnostic ignored x) 17 | +# define PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push") 18 | +# define PRAGMA_DIAG_POP _Pragma("GCC diagnostic pop") 19 | +# define PRAGMA_(x) _Pragma(#x) 20 | +# define PRAGMA_DIAG_IGNORED(x) PRAGMA_(GCC diagnostic ignored x) 21 | # elif __GNUC__ == 4 22 | # if __GNUC_MINOR__ >= 6 23 | # define PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push") 24 | 25 | --- a/src/jtagrw.cc 2018-06-27 21:49:14 UTC 26 | +++ b/src/jtagrw.cc 27 | @@ -131,7 +131,7 @@ uchar *jtag1::jtagRead(unsigned long add 28 | else 29 | numLocations = (numBytes + 1) / 2; 30 | if (numLocations > 256) 31 | - return false; 32 | + return NULL; 33 | 34 | command[1] = whichSpace; 35 | command[2] = numLocations - 1; 36 | -------------------------------------------------------------------------------- /patch/avarice-2.14/0000-throw-specifier.patch: -------------------------------------------------------------------------------- 1 | From c339b0d7c1d0c98274be6ea6db93ad477dbfe530 Mon Sep 17 00:00:00 2001 2 | From: Joerg Wunsch 3 | Date: Mon, 23 Aug 2021 20:57:14 +0000 4 | Subject: [PATCH] patch #40 Remove old style exception throw specifier 5 | 6 | Submitted by Joris Putcuyps 7 | 8 | resolves bug #34 AVaRICE 2.14 won't compile on Arch Linux 9 | 10 | 11 | 12 | 13 | git-svn-id: svn://svn.code.sf.net/p/avarice/code/trunk/avarice@391 a7e36acc-7495-4a18-91ca-7b9a7881be12 14 | --- 15 | ChangeLog | 10 ++++++++++ 16 | NEWS | 5 +++-- 17 | src/jtag2.h | 2 +- 18 | src/jtag2io.cc | 1 - 19 | src/jtag3.h | 4 ++-- 20 | src/jtag3io.cc | 2 -- 21 | 6 files changed, 16 insertions(+), 8 deletions(-) 22 | 23 | diff --git a/src/jtag2.h b/src/jtag2.h 24 | index f763594..3497fb8 100644 25 | --- a/src/jtag2.h 26 | +++ b/src/jtag2.h 27 | @@ -156,7 +156,7 @@ class jtag2: public jtag 28 | **/ 29 | void doJtagCommand(uchar *command, int commandSize, 30 | uchar *&response, int &responseSize, 31 | - bool retryOnTimeout = true) throw(jtag_exception); 32 | + bool retryOnTimeout = true); 33 | 34 | /** Simplified form of doJtagCommand: 35 | Send 1-byte command 'cmd' to JTAG ICE, with retries, expecting a 36 | diff --git a/src/jtag2io.cc b/src/jtag2io.cc 37 | index 40ade22..86ae19e 100644 38 | --- a/src/jtag2io.cc 39 | +++ b/src/jtag2io.cc 40 | @@ -366,7 +366,6 @@ bool jtag2::sendJtagCommand(uchar *command, int commandSize, int &tries, 41 | void jtag2::doJtagCommand(uchar *command, int commandSize, 42 | uchar *&response, int &responseSize, 43 | bool retryOnTimeout) 44 | - throw (jtag_exception) 45 | { 46 | int sizeseen = 0; 47 | uchar code = 0; 48 | diff --git a/src/jtag3.h b/src/jtag3.h 49 | index 453ffc5..51914f0 100644 50 | --- a/src/jtag3.h 51 | +++ b/src/jtag3.h 52 | @@ -311,7 +311,7 @@ class jtag3: public jtag 53 | **/ 54 | void doJtagCommand(uchar *command, int commandSize, 55 | const char *name, 56 | - uchar *&response, int &responseSize) throw(jtag_exception); 57 | + uchar *&response, int &responseSize); 58 | 59 | /** Simplified form of doJtagCommand: 60 | Send 1-byte command 'cmd' to JTAG ICE, expecting a 61 | @@ -319,7 +319,7 @@ class jtag3: public jtag 62 | RSP_OK. 63 | **/ 64 | void doSimpleJtagCommand(uchar cmd, const char *name, 65 | - uchar scope = SCOPE_AVR) throw(jtag_exception); 66 | + uchar scope = SCOPE_AVR); 67 | 68 | // Miscellaneous 69 | // ------------- 70 | diff --git a/src/jtag3io.cc b/src/jtag3io.cc 71 | index 8b29227..15f5dd3 100644 72 | --- a/src/jtag3io.cc 73 | +++ b/src/jtag3io.cc 74 | @@ -306,7 +306,6 @@ bool jtag3::sendJtagCommand(uchar *command, int commandSize, 75 | void jtag3::doJtagCommand(uchar *command, int commandSize, 76 | const char *name, 77 | uchar *&response, int &responseSize) 78 | - throw (jtag_exception) 79 | { 80 | if (sendJtagCommand(command, commandSize, name, response, responseSize)) 81 | return; 82 | @@ -318,7 +317,6 @@ void jtag3::doJtagCommand(uchar *command, int commandSize, 83 | } 84 | 85 | void jtag3::doSimpleJtagCommand(uchar command, const char *name, uchar scope) 86 | - throw (jtag_exception) 87 | { 88 | int dummy; 89 | uchar *replydummy, cmd[3]; 90 | -------------------------------------------------------------------------------- /patch/avarice-2.14/0001-attribute-unused.patch: -------------------------------------------------------------------------------- 1 | From a02e296cedd48f56b4f7779abb0a04fb2c63cf87 Mon Sep 17 00:00:00 2001 2 | From: Joerg Wunsch 3 | Date: Thu, 17 Sep 2020 20:34:33 +0000 4 | Subject: [PATCH] patch #39 Compilation error in jtag3io.cc: (avarice 2.14) 5 | 6 | replace __unused by __attribute__((unused)) 7 | 8 | 9 | 10 | 11 | git-svn-id: svn://svn.code.sf.net/p/avarice/code/trunk/avarice@390 a7e36acc-7495-4a18-91ca-7b9a7881be12 12 | --- 13 | ChangeLog | 7 +++++++ 14 | NEWS | 2 ++ 15 | src/jtag2usb.cc | 2 +- 16 | src/jtag3io.cc | 4 ++-- 17 | src/jtag3prog.cc | 4 +++- 18 | 5 files changed, 15 insertions(+), 4 deletions(-) 19 | 20 | diff --git a/src/jtag2usb.cc b/src/jtag2usb.cc 21 | index 8534701..c5a8ac3 100644 22 | --- a/src/jtag2usb.cc 23 | +++ b/src/jtag2usb.cc 24 | @@ -739,7 +739,7 @@ static hid_device *openhid(const char *jtagDeviceName, unsigned int &max_pkt_siz 25 | 26 | #ifdef HAVE_LIBUSB_2_0 27 | /* USB thread */ 28 | -static void *usb_thread(void * data __unused) 29 | +static void *usb_thread(void * data __attribute__((unused))) 30 | { 31 | struct pollfd fds[2]; 32 | 33 | diff --git a/src/jtag3io.cc b/src/jtag3io.cc 34 | index 3600fc4..8b29227 100644 35 | --- a/src/jtag3io.cc 36 | +++ b/src/jtag3io.cc 37 | @@ -350,12 +350,12 @@ void jtag3::doSimpleJtagCommand(uchar command, const char *name, uchar scope) 38 | throw jtag_exception("doSimpleJtagCommand(): too many failures"); 39 | } 40 | 41 | -void jtag3::changeBitRate(int newBitRate __unused) 42 | +void jtag3::changeBitRate(int newBitRate __attribute__((unused))) 43 | { 44 | throw; 45 | } 46 | 47 | -bool jtag3::synchroniseAt(int bitrate __unused) 48 | +bool jtag3::synchroniseAt(int bitrate __attribute__((unused))) 49 | { 50 | throw; 51 | } 52 | diff --git a/src/jtag3prog.cc b/src/jtag3prog.cc 53 | index 0fa6346..f725ccc 100644 54 | --- a/src/jtag3prog.cc 55 | +++ b/src/jtag3prog.cc 56 | @@ -106,7 +106,9 @@ void jtag3::eraseProgramPage(unsigned long address) 57 | } 58 | 59 | 60 | -void jtag3::downloadToTarget(const char* filename __unused, bool program __unused, bool verify __unused) 61 | +void jtag3::downloadToTarget(const char* filename __attribute__((unused)), 62 | + bool program __attribute__((unused)), 63 | + bool verify __attribute__((unused))) 64 | { 65 | statusOut("\nDownload not done.\n"); 66 | throw jtag_exception("Target programming not implemented for JTAGICE3"); 67 | -------------------------------------------------------------------------------- /patch/djgpp-binutils-227/0001.patch: -------------------------------------------------------------------------------- 1 | --- a/bfd/init.c 2017-01-31 19:11:07.478074684 +0000 2 | +++ b/bfd/init.c 2017-01-31 19:24:23.798041848 +0000 3 | @@ -25,9 +25,7 @@ 4 | 5 | /* This controls if the coff 64k support shall be disabled or not. 6 | By default always enabled. */ 7 | -#if defined(__DJGPP__) || defined(COFF_GO32_EXE) || defined(COFF_GO32) 8 | bfd_boolean coff_64k_relocation_enabled = TRUE; 9 | -#endif 10 | 11 | /* 12 | SECTION 13 | -------------------------------------------------------------------------------- /patch/djgpp-binutils-2331/0001-byteswap.patch: -------------------------------------------------------------------------------- 1 | --- a/libctf/swap.h 2020-02-04 02:01:06.703925300 +0100 2 | +++ b/libctf/swap.h 2020-02-04 02:01:35.474802100 +0100 3 | @@ -23,19 +23,15 @@ 4 | #include "config.h" 5 | #include 6 | 7 | -#ifdef HAVE_BYTESWAP_H 8 | -#include 9 | -#else 10 | - 11 | #ifndef __DJGPP__ 12 | /* Provide our own versions of the byteswap functions. */ 13 | -inline uint16_t 14 | +static inline uint16_t 15 | bswap_16 (uint16_t v) 16 | { 17 | return ((v >> 8) & 0xff) | ((v & 0xff) << 8); 18 | } 19 | 20 | -inline uint32_t 21 | +static inline uint32_t 22 | bswap_32 (uint32_t v) 23 | { 24 | return ( ((v & 0xff000000) >> 24) 25 | @@ -44,13 +40,13 @@ 26 | | ((v & 0x000000ff) << 24)); 27 | } 28 | 29 | -inline uint64_t 30 | +static inline uint64_t 31 | bswap_identity_64 (uint64_t v) 32 | { 33 | return v; 34 | } 35 | 36 | -inline uint64_t 37 | +static inline uint64_t 38 | bswap_64 (uint64_t v) 39 | { 40 | return ( ((v & 0xff00000000000000ULL) >> 56) 41 | @@ -118,6 +114,4 @@ 42 | ) 43 | #endif /* __DJGPP__ */ 44 | 45 | -#endif /* !defined(HAVE_BYTESWAP_H) */ 46 | - 47 | #endif /* !defined(_CTF_SWAP_H) */ 48 | -------------------------------------------------------------------------------- /patch/djgpp-binutils-234/0001-clear-CONTENTS-flag-if-b-flag-is-given-for-COFF-sect.patch: -------------------------------------------------------------------------------- 1 | Subject: [PATCH] clear CONTENTS flag if "b" flag is given for COFF section 2 | From: "J.W. Jagersma" 3 | Date: 2020-03-24 23:20 4 | 5 | The "b" flag for COFF sections only unsets the LOAD attribute. It 6 | should also clear the CONTENTS attribute so that named bss sections 7 | don't take up space in an object file. This can be achieved by 8 | setting the 'bss' flag in seg_info. 9 | 10 | gas/ 11 | 2020-03-24 Jan W. Jagersma 12 | 13 | * config/obj-coff.c (obj_coff_section): Set bss flag in 14 | seg_info if "b" flag is given. 15 | --- 16 | gas/config/obj-coff.c | 5 +++++ 17 | 1 file changed, 5 insertions(+) 18 | 19 | diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c 20 | index 178ccaad6a..e97d9a22a1 100644 21 | --- a/gas/config/obj-coff.c 22 | +++ b/gas/config/obj-coff.c 23 | @@ -1531,6 +1531,7 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED) 24 | char *name; 25 | unsigned int exp; 26 | flagword flags, oldflags; 27 | + bfd_boolean is_bss = FALSE; 28 | asection *sec; 29 | 30 | if (flag_mri) 31 | @@ -1581,6 +1582,7 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED) 32 | /* Uninitialised data section. */ 33 | flags |= SEC_ALLOC; 34 | flags &=~ SEC_LOAD; 35 | + is_bss = TRUE; 36 | break; 37 | 38 | case 'n': 39 | @@ -1652,6 +1654,9 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED) 40 | 41 | sec = subseg_new (name, (subsegT) exp); 42 | 43 | + if (is_bss) 44 | + seg_info (sec)->bss = 1; 45 | + 46 | if (alignment >= 0) 47 | sec->alignment_power = alignment; 48 | 49 | -- 2.25.2 50 | 51 | -------------------------------------------------------------------------------- /patch/djgpp-binutils-234/0002-ldscript.patch: -------------------------------------------------------------------------------- 1 | --- a/ld/scripttempl/i386go32.sc 2020-05-05 17:31:16.921799400 +0200 2 | +++ b/ld/scripttempl/i386go32.sc 2020-05-05 17:31:29.717799400 +0200 3 | @@ -60,10 +60,6 @@ 4 | *(.data) 5 | ${RELOCATING+*(.data.*)} 6 | 7 | - /* Ugly workaround to prevent entire .bss to have attribute CONTENT */ 8 | - /* for C++ executables. */ 9 | - *(.bss.*) 10 | - 11 | ${RELOCATING+*(.gcc_exc*)} 12 | ${RELOCATING+___EH_FRAME_BEGIN__ = . ;} 13 | ${RELOCATING+*(.eh_fram*)} 14 | @@ -78,7 +74,7 @@ 15 | ${CONSTRUCTING+${RELOCATING-$DTOR}} 16 | .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : 17 | { 18 | - *(.bss${RELOCATING+ .gnu.linkonce.b.*}) 19 | + *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*}) 20 | *(COMMON) 21 | ${RELOCATING+ end = . ; PROVIDE(_end = .) ;} 22 | ${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});} 23 | -------------------------------------------------------------------------------- /patch/djgpp-gcc-10.3.0/watt32-errno.patch: -------------------------------------------------------------------------------- 1 | diff --git a/libstdc++-v3/config/os/djgpp/error_constants.h b/libstdc++-v3/config/os/djgpp/error_constants.h 2 | index 434de1601e4..a739488247e 100644 3 | --- a/libstdc++-v3/config/os/djgpp/error_constants.h 4 | +++ b/libstdc++-v3/config/os/djgpp/error_constants.h 5 | @@ -33,6 +33,11 @@ 6 | #include 7 | #include 8 | 9 | +// Include Watt-32 errno list, if present 10 | +#if __has_include() 11 | +#include 12 | +#endif 13 | + 14 | #ifndef EOPNOTSUPP 15 | // Use same value as in wat3222br6.zip file net/watt/sys/djgpp.err 16 | #define EOPNOTSUPP 52 17 | @@ -48,10 +53,22 @@ 18 | 19 | enum class errc 20 | { 21 | -// address_family_not_supported = EAFNOSUPPORT, 22 | -// address_in_use = EADDRINUSE, 23 | -// address_not_available = EADDRNOTAVAIL, 24 | -// already_connected = EISCONN, 25 | +#ifdef EAFNOSUPPORT 26 | + address_family_not_supported = EAFNOSUPPORT, 27 | +#endif 28 | + 29 | +#ifdef EADDRINUSE 30 | + address_in_use = EADDRINUSE, 31 | +#endif 32 | + 33 | +#ifdef EADDRNOTAVAIL 34 | + address_not_available = EADDRNOTAVAIL, 35 | +#endif 36 | + 37 | +#ifdef EISCONN 38 | + already_connected = EISCONN, 39 | +#endif 40 | + 41 | argument_list_too_long = E2BIG, 42 | argument_out_of_domain = EDOM, 43 | bad_address = EFAULT, 44 | @@ -62,12 +79,29 @@ 45 | #endif 46 | 47 | broken_pipe = EPIPE, 48 | -// connection_aborted = ECONNABORTED, 49 | -// connection_already_in_progress = EALREADY, 50 | -// connection_refused = ECONNREFUSED, 51 | -// connection_reset = ECONNRESET, 52 | + 53 | +#ifdef ECONNABORTED 54 | + connection_aborted = ECONNABORTED, 55 | +#endif 56 | + 57 | +#ifdef EALREADY 58 | + connection_already_in_progress = EALREADY, 59 | +#endif 60 | + 61 | +#ifdef ECONNREFUSED 62 | + connection_refused = ECONNREFUSED, 63 | +#endif 64 | + 65 | +#ifdef ECONNRESET 66 | + connection_reset = ECONNRESET, 67 | +#endif 68 | + 69 | cross_device_link = EXDEV, 70 | -// destination_address_required = EDESTADDRREQ, 71 | + 72 | +#ifdef EDESTADDRREQ 73 | + destination_address_required = EDESTADDRREQ, 74 | +#endif 75 | + 76 | device_or_resource_busy = EBUSY, 77 | directory_not_empty = ENOTEMPTY, 78 | executable_format_error = ENOEXEC, 79 | @@ -75,7 +109,10 @@ 80 | file_too_large = EFBIG, 81 | filename_too_long = ENAMETOOLONG, 82 | function_not_supported = ENOSYS, 83 | -// host_unreachable = EHOSTUNREACH, 84 | + 85 | +#ifdef EHOSTUNREACH 86 | + host_unreachable = EHOSTUNREACH, 87 | +#endif 88 | 89 | #ifdef EIDRM 90 | identifier_removed = EIDRM, 91 | @@ -88,11 +125,27 @@ 92 | invalid_seek = ESPIPE, 93 | io_error = EIO, 94 | is_a_directory = EISDIR, 95 | -// message_size = EMSGSIZE, 96 | -// network_down = ENETDOWN, 97 | -// network_reset = ENETRESET, 98 | -// network_unreachable = ENETUNREACH, 99 | -// no_buffer_space = ENOBUFS, 100 | + 101 | +#ifdef EMSGSIZE 102 | + message_size = EMSGSIZE, 103 | +#endif 104 | + 105 | +#ifdef ENETDOWN 106 | + network_down = ENETDOWN, 107 | +#endif 108 | + 109 | +#ifdef ENETRESET 110 | + network_reset = ENETRESET, 111 | +#endif 112 | + 113 | +#ifdef ENETUNREACH 114 | + network_unreachable = ENETUNREACH, 115 | +#endif 116 | + 117 | +#ifdef ENOBUFS 118 | + no_buffer_space = ENOBUFS, 119 | +#endif 120 | + 121 | no_child_process = ECHILD, 122 | 123 | #ifdef ENOLINK 124 | @@ -105,8 +158,14 @@ 125 | no_message_available = ENODATA, 126 | #endif 127 | 128 | -// no_message = ENOMSG, 129 | -// no_protocol_option = ENOPROTOOPT, 130 | +#ifdef ENOMSG 131 | + no_message = ENOMSG, 132 | +#endif 133 | + 134 | +#ifdef ENOPROTOOPT 135 | + no_protocol_option = ENOPROTOOPT, 136 | +#endif 137 | + 138 | no_space_on_device = ENOSPC, 139 | 140 | #ifdef ENOSR 141 | @@ -118,25 +177,39 @@ 142 | no_such_file_or_directory = ENOENT, 143 | no_such_process = ESRCH, 144 | not_a_directory = ENOTDIR, 145 | -// not_a_socket = ENOTSOCK, 146 | + 147 | +#ifdef ENOTSOCK 148 | + not_a_socket = ENOTSOCK, 149 | +#endif 150 | 151 | #ifdef ENOSTR 152 | not_a_stream = ENOSTR, 153 | #endif 154 | 155 | -// not_connected = ENOTCONN, 156 | +#ifdef ENOTCONN 157 | + not_connected = ENOTCONN, 158 | +#endif 159 | + 160 | not_enough_memory = ENOMEM, 161 | 162 | +#ifdef ENOTSUP 163 | not_supported = ENOTSUP, 164 | +#endif 165 | 166 | #ifdef ECANCELED 167 | operation_canceled = ECANCELED, 168 | #endif 169 | 170 | -// operation_in_progress = EINPROGRESS, 171 | +#ifdef EINPROGRESS 172 | + operation_in_progress = EINPROGRESS, 173 | +#endif 174 | + 175 | operation_not_permitted = EPERM, 176 | operation_not_supported = EOPNOTSUPP, 177 | -// operation_would_block = EWOULDBLOCK, 178 | + 179 | +#ifdef EWOULDBLOCK 180 | + operation_would_block = EWOULDBLOCK, 181 | +#endif 182 | 183 | #ifdef EOWNERDEAD 184 | owner_dead = EOWNERDEAD, 185 | @@ -148,7 +221,10 @@ 186 | protocol_error = EPROTO, 187 | #endif 188 | 189 | -// protocol_not_supported = EPROTONOSUPPORT, 190 | +#ifdef EPROTONOSUPPORT 191 | + protocol_not_supported = EPROTONOSUPPORT, 192 | +#endif 193 | + 194 | read_only_file_system = EROFS, 195 | resource_deadlock_would_occur = EDEADLK, 196 | resource_unavailable_try_again = EAGAIN, 197 | @@ -166,7 +242,10 @@ 198 | text_file_busy = ETXTBSY, 199 | #endif 200 | 201 | -// timed_out = ETIMEDOUT, 202 | +#ifdef ETIMEDOUT 203 | + timed_out = ETIMEDOUT, 204 | +#endif 205 | + 206 | too_many_files_open_in_system = ENFILE, 207 | too_many_files_open = EMFILE, 208 | too_many_links = EMLINK, 209 | @@ -176,7 +255,9 @@ 210 | value_too_large = EOVERFLOW, 211 | #endif 212 | 213 | -// wrong_protocol_type = EPROTOTYPE 214 | +#ifdef EPROTOTYPE 215 | + wrong_protocol_type = EPROTOTYPE 216 | +#endif 217 | }; 218 | 219 | _GLIBCXX_END_NAMESPACE_VERSION 220 | -------------------------------------------------------------------------------- /patch/djgpp-gcc-13.1.0/0001-lto.patch: -------------------------------------------------------------------------------- 1 | --- a/configure 2 | +++ b/configure 3 | @@ -6177,7 +6177,7 @@ 4 | # Among non-ELF, only Windows platforms support the lto-plugin so far. 5 | # Build it unless LTO was explicitly disabled. 6 | case $target in 7 | - *-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;; 8 | + *-cygwin* | *-mingw* | *djgpp*) build_lto_plugin=$enable_lto ;; 9 | *) ;; 10 | esac 11 | -------------------------------------------------------------------------------- /patch/djgpp-gcc-13.2.0/0001-lto.patch: -------------------------------------------------------------------------------- 1 | --- a/configure 2 | +++ b/configure 3 | @@ -6177,7 +6177,7 @@ 4 | # Among non-ELF, only Windows platforms support the lto-plugin so far. 5 | # Build it unless LTO was explicitly disabled. 6 | case $target in 7 | - *-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;; 8 | + *-cygwin* | *-mingw* | *djgpp*) build_lto_plugin=$enable_lto ;; 9 | *) ;; 10 | esac 11 | -------------------------------------------------------------------------------- /patch/djgpp-gcc-14.1.0/0001-lto.patch: -------------------------------------------------------------------------------- 1 | --- a/configure 2 | +++ b/configure 3 | @@ -6177,7 +6177,7 @@ 4 | # Among non-ELF, only Windows platforms support the lto-plugin so far. 5 | # Build it unless LTO was explicitly disabled. 6 | case $target in 7 | - *-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;; 8 | + *-cygwin* | *-mingw* | *djgpp*) build_lto_plugin=$enable_lto ;; 9 | *) ;; 10 | esac 11 | -------------------------------------------------------------------------------- /patch/djgpp-gcc-14.2.0/0001-lto.patch: -------------------------------------------------------------------------------- 1 | --- a/configure 2 | +++ b/configure 3 | @@ -6177,7 +6177,7 @@ 4 | # Among non-ELF, only Windows platforms support the lto-plugin so far. 5 | # Build it unless LTO was explicitly disabled. 6 | case $target in 7 | - *-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;; 8 | + *-cygwin* | *-mingw* | *djgpp*) build_lto_plugin=$enable_lto ;; 9 | *) ;; 10 | esac 11 | 12 | -------------------------------------------------------------------------------- /patch/djgpp-gcc-8.1.0/0001.patch: -------------------------------------------------------------------------------- 1 | diff --git a/gcc/config/i386/djgpp.c b/gcc/config/i386/djgpp.c 2 | index f168eed6f06..d187c3a7452 100644 3 | --- a/gcc/config/i386/djgpp.c 4 | +++ b/gcc/config/i386/djgpp.c 5 | @@ -47,3 +47,20 @@ i386_djgpp_asm_named_section(const char *name, unsigned int flags, 6 | 7 | fprintf (asm_out_file, "\t.section\t%s,\"%s\"\n", name, flagchars); 8 | } 9 | + 10 | +/* Kludge because of missing COFF support for early LTO debug. */ 11 | + 12 | +static enum debug_info_levels saved_debug_info_level; 13 | + 14 | +void 15 | +i386_djgpp_asm_lto_start (void) 16 | +{ 17 | + saved_debug_info_level = debug_info_level; 18 | + debug_info_level = DINFO_LEVEL_NONE; 19 | +} 20 | + 21 | +void 22 | +i386_djgpp_asm_lto_end (void) 23 | +{ 24 | + debug_info_level = saved_debug_info_level; 25 | +} 26 | diff --git a/gcc/config/i386/djgpp.h b/gcc/config/i386/djgpp.h 27 | index 01774cea4d6..dd8c71b833a 100644 28 | --- a/gcc/config/i386/djgpp.h 29 | +++ b/gcc/config/i386/djgpp.h 30 | @@ -157,8 +157,19 @@ along with GCC; see the file COPYING3. If not see 31 | #undef MAKE_DECL_ONE_ONLY 32 | #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) 33 | 34 | +#undef TARGET_COFF 35 | +#define TARGET_COFF 1 36 | + 37 | +/* Kludge because of missing COFF support for early LTO debug. */ 38 | +#undef TARGET_ASM_LTO_START 39 | +#define TARGET_ASM_LTO_START i386_djgpp_asm_lto_start 40 | +#undef TARGET_ASM_LTO_END 41 | +#define TARGET_ASM_LTO_END i386_djgpp_asm_lto_end 42 | + 43 | /* Function protypes for gcc/i386/djgpp.c */ 44 | 45 | void 46 | i386_djgpp_asm_named_section(const char *name, unsigned int flags, 47 | tree decl); 48 | +void i386_djgpp_asm_lto_start (void); 49 | +void i386_djgpp_asm_lto_end (void); 50 | diff --git a/gcc/defaults.h b/gcc/defaults.h 51 | index 78a08a33f12..9035b333be8 100644 52 | --- a/gcc/defaults.h 53 | +++ b/gcc/defaults.h 54 | @@ -1282,6 +1282,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 55 | #define TARGET_PECOFF 0 56 | #endif 57 | 58 | +#ifndef TARGET_COFF 59 | +#define TARGET_COFF 0 60 | +#endif 61 | + 62 | #ifndef EH_RETURN_HANDLER_RTX 63 | #define EH_RETURN_HANDLER_RTX NULL 64 | #endif 65 | diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c 66 | index 8377cbc5dd1..c75aadbaa2c 100644 67 | --- a/gcc/dwarf2out.c 68 | +++ b/gcc/dwarf2out.c 69 | @@ -31938,10 +31938,10 @@ dwarf2out_early_finish (const char *filename) 70 | 71 | /* Do not generate DWARF assembler now when not producing LTO bytecode. */ 72 | if ((!flag_generate_lto && !flag_generate_offload) 73 | - /* FIXME: Disable debug info generation for PE-COFF targets since the 74 | + /* FIXME: Disable debug info generation for (PE-)COFF targets since the 75 | copy_lto_debug_sections operation of the simple object support in 76 | libiberty is not implemented for them yet. */ 77 | - || TARGET_PECOFF) 78 | + || TARGET_PECOFF || TARGET_COFF) 79 | return; 80 | 81 | /* Now as we are going to output for LTO initialize sections and labels 82 | -------------------------------------------------------------------------------- /patch/djgpp-gcc-8.2.0/0001.patch: -------------------------------------------------------------------------------- 1 | diff --git a/gcc/config/i386/djgpp.c b/gcc/config/i386/djgpp.c 2 | index f168eed6f06..d187c3a7452 100644 3 | --- a/gcc/config/i386/djgpp.c 4 | +++ b/gcc/config/i386/djgpp.c 5 | @@ -47,3 +47,20 @@ i386_djgpp_asm_named_section(const char *name, unsigned int flags, 6 | 7 | fprintf (asm_out_file, "\t.section\t%s,\"%s\"\n", name, flagchars); 8 | } 9 | + 10 | +/* Kludge because of missing COFF support for early LTO debug. */ 11 | + 12 | +static enum debug_info_levels saved_debug_info_level; 13 | + 14 | +void 15 | +i386_djgpp_asm_lto_start (void) 16 | +{ 17 | + saved_debug_info_level = debug_info_level; 18 | + debug_info_level = DINFO_LEVEL_NONE; 19 | +} 20 | + 21 | +void 22 | +i386_djgpp_asm_lto_end (void) 23 | +{ 24 | + debug_info_level = saved_debug_info_level; 25 | +} 26 | diff --git a/gcc/config/i386/djgpp.h b/gcc/config/i386/djgpp.h 27 | index 01774cea4d6..dd8c71b833a 100644 28 | --- a/gcc/config/i386/djgpp.h 29 | +++ b/gcc/config/i386/djgpp.h 30 | @@ -157,8 +157,19 @@ along with GCC; see the file COPYING3. If not see 31 | #undef MAKE_DECL_ONE_ONLY 32 | #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) 33 | 34 | +#undef TARGET_COFF 35 | +#define TARGET_COFF 1 36 | + 37 | +/* Kludge because of missing COFF support for early LTO debug. */ 38 | +#undef TARGET_ASM_LTO_START 39 | +#define TARGET_ASM_LTO_START i386_djgpp_asm_lto_start 40 | +#undef TARGET_ASM_LTO_END 41 | +#define TARGET_ASM_LTO_END i386_djgpp_asm_lto_end 42 | + 43 | /* Function protypes for gcc/i386/djgpp.c */ 44 | 45 | void 46 | i386_djgpp_asm_named_section(const char *name, unsigned int flags, 47 | tree decl); 48 | +void i386_djgpp_asm_lto_start (void); 49 | +void i386_djgpp_asm_lto_end (void); 50 | diff --git a/gcc/defaults.h b/gcc/defaults.h 51 | index 78a08a33f12..9035b333be8 100644 52 | --- a/gcc/defaults.h 53 | +++ b/gcc/defaults.h 54 | @@ -1282,6 +1282,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 55 | #define TARGET_PECOFF 0 56 | #endif 57 | 58 | +#ifndef TARGET_COFF 59 | +#define TARGET_COFF 0 60 | +#endif 61 | + 62 | #ifndef EH_RETURN_HANDLER_RTX 63 | #define EH_RETURN_HANDLER_RTX NULL 64 | #endif 65 | diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c 66 | index 8377cbc5dd1..c75aadbaa2c 100644 67 | --- a/gcc/dwarf2out.c 68 | +++ b/gcc/dwarf2out.c 69 | @@ -31938,10 +31938,10 @@ dwarf2out_early_finish (const char *filename) 70 | 71 | /* Do not generate DWARF assembler now when not producing LTO bytecode. */ 72 | if ((!flag_generate_lto && !flag_generate_offload) 73 | - /* FIXME: Disable debug info generation for PE-COFF targets since the 74 | + /* FIXME: Disable debug info generation for (PE-)COFF targets since the 75 | copy_lto_debug_sections operation of the simple object support in 76 | libiberty is not implemented for them yet. */ 77 | - || TARGET_PECOFF) 78 | + || TARGET_PECOFF || TARGET_COFF) 79 | return; 80 | 81 | /* Now as we are going to output for LTO initialize sections and labels 82 | -------------------------------------------------------------------------------- /patch/djgpp-gcc-9.3.0/0001-djgpp-emit-b-flag-for-named-bss-sections.patch: -------------------------------------------------------------------------------- 1 | From e869e1d34fde5f3bfba47b10b1db073115ee7152 Mon Sep 17 00:00:00 2001 2 | From: "J.W. Jagersma" 3 | Date: Wed, 25 Mar 2020 19:56:27 +0100 4 | Subject: [PATCH] djgpp: emit "b" flag for named bss sections 5 | 6 | Unlike ELF, named sections such as .bss.* and .gnu.linkonce.b.* have no 7 | special meaning in COFF, therefore they will have the CONTENTS, LOAD 8 | and DATA attributes set. The result is that these sections take up 9 | space in object files and executables. These attributes can be cleared 10 | by emitting the "b" flag in the .section directive. 11 | 12 | This can probably be added in default_coff_asm_named_section too. 13 | 14 | gcc/ 15 | 2020-03-25 Jan W. Jagersma 16 | 17 | * config/i386/djgpp.c (i386_djgpp_asm_named_section): Emit "b" 18 | attribute for SECTION_BSS. 19 | --- 20 | gcc/config/i386/djgpp.c | 2 ++ 21 | 1 file changed, 2 insertions(+) 22 | 23 | diff --git a/gcc/config/i386/djgpp.c b/gcc/config/i386/djgpp.c 24 | index ba6c2d4d3a4..88cf1e6506e 100644 25 | --- a/gcc/config/i386/djgpp.c 26 | +++ b/gcc/config/i386/djgpp.c 27 | @@ -36,6 +36,8 @@ i386_djgpp_asm_named_section(const char *name, unsigned int flags, 28 | *f++ = 'w'; 29 | if (flags & SECTION_CODE) 30 | *f++ = 'x'; 31 | + if (flags & SECTION_BSS) 32 | + *f++ = 'b'; 33 | 34 | /* LTO sections need 1-byte alignment to avoid confusing the 35 | zlib decompression algorithm with trailing zero pad bytes. */ 36 | -- 37 | 2.26.2 38 | 39 | -------------------------------------------------------------------------------- /patch/djlsr205/0001-append-to-CFLAGS-in-libc-posix-regex-makefile-instea.patch: -------------------------------------------------------------------------------- 1 | From 9e29f38d2ce073bc209cafbb9341dd5756b743da Mon Sep 17 00:00:00 2001 2 | From: "J.W. Jagersma" 3 | Date: Mon, 10 Feb 2020 18:31:38 +0100 4 | Subject: [PATCH] append to CFLAGS in libc/posix/regex/makefile, instead of 5 | overriding it. 6 | 7 | --- 8 | src/libc/posix/regex/makefile | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/src/libc/posix/regex/makefile b/src/libc/posix/regex/makefile 12 | index ef3ca5c1..b8fc260f 100644 13 | --- a/src/libc/posix/regex/makefile 14 | +++ b/src/libc/posix/regex/makefile 15 | @@ -4,7 +4,7 @@ 16 | TOP=../.. 17 | 18 | # supress all warnings here 19 | -CFLAGS = -w 20 | +CFLAGS += -w 21 | 22 | SRC += regcomp.c 23 | SRC += regerror.c 24 | -- 25 | 2.25.0 26 | 27 | -------------------------------------------------------------------------------- /patch/djlsr205/0001-compile-separate-ident-file-for-emu387-dxe.patch: -------------------------------------------------------------------------------- 1 | commit 5c98dfb416dd87322c80d99dcbf1e2ffadfe9cbf 2 | Author: J.W. Jagersma 3 | Date: Tue Apr 1 18:45:09 2025 +0200 4 | 5 | Compile separate ident file for emu387.dxe 6 | 7 | Fixes a race condition with parallel make. 8 | See: https://github.com/jwt27/build-gcc/issues/46 9 | 10 | diff --git a/src/libemu/makefile b/src/libemu/makefile 11 | index ceaa16cc..97896a7c 100644 12 | --- a/src/libemu/makefile 13 | +++ b/src/libemu/makefile 14 | @@ -12,7 +12,8 @@ include $(TOP)/../makefile.lib 15 | all :: $(BIN)/emu387.dxe 16 | 17 | $(BIN)/emu387.dxe : src/emu387.o src/emudummy.o 18 | - $(HOSTBIN)/dxegen.exe $(BIN)/emu387.dxe __emu_entry src/emu387.o id_emu.o src/emudummy.o -L../../lib $(LIBGCCA) -lc $(LIBGCCA) 19 | - 20 | + $(CROSS_GCC) -c -DLIB=libemu $(TOP)/../ident.c -o id_dxemu.o 21 | + $(HOSTBIN)/dxegen.exe $(BIN)/emu387.dxe __emu_entry src/emu387.o id_dxemu.o src/emudummy.o -L../../lib $(LIBGCCA) -lc $(LIBGCCA) 22 | + 23 | clean :: 24 | $(MISC) rm makefile.sub 25 | -------------------------------------------------------------------------------- /patch/djlsr205/0001-fix-handling-of-empty-environment.patch: -------------------------------------------------------------------------------- 1 | From 65d7caeb32f21597938f49364737789727516fdb Mon Sep 17 00:00:00 2001 2 | From: Stas Sergeev 3 | Date: Sun, 4 Aug 2019 01:25:38 +0300 4 | Subject: [PATCH] fix handling of empty environment 5 | 6 | Currently if the DOS environment is empty (can happen 7 | when starting command.com), djgpp startup produces the 8 | corrupted environment. This patch fixes it by checking 9 | the loop end condition before loop action. 10 | 11 | Another problematic case is the missing environment segment. 12 | In this case there is no work-around, so the error msg 13 | is printed and the program terminates. 14 | --- 15 | src/libc/crt0/crt1.c | 12 +++++++----- 16 | src/stub/stub.asm | 16 +++++++++++++--- 17 | 2 files changed, 20 insertions(+), 8 deletions(-) 18 | 19 | diff --git a/src/libc/crt0/crt1.c b/src/libc/crt0/crt1.c 20 | index f0ba9919..37c7dedb 100644 21 | --- a/src/libc/crt0/crt1.c 22 | +++ b/src/libc/crt0/crt1.c 23 | @@ -128,31 +128,33 @@ char *__dos_argv0; 24 | static void 25 | setup_environment(void) 26 | { 27 | - char *dos_environ = alloca(_stubinfo->env_size), *cp; 28 | + char *dos_environ, *cp; 29 | short env_selector; 30 | int env_count=0; 31 | + 32 | + dos_environ = alloca(_stubinfo->env_size); 33 | movedata(_stubinfo->psp_selector, 0x2c, ds, (int)&env_selector, 2); 34 | movedata(env_selector, 0, ds, (int)dos_environ, _stubinfo->env_size); 35 | cp = dos_environ; 36 | - do { 37 | + while (*cp) { /* repeat until two NULs */ 38 | env_count++; 39 | while (*cp) cp++; /* skip to NUL */ 40 | cp++; /* skip to next character */ 41 | - } while (*cp); /* repeat until two NULs */ 42 | + } 43 | _environ = (char **)malloc((env_count+1) * sizeof(char *)); 44 | if (_environ == 0) 45 | return; 46 | 47 | cp = dos_environ; 48 | env_count = 0; 49 | - do { 50 | + while (*cp) { /* repeat until two NULs */ 51 | /* putenv assumes each string is malloc'd */ 52 | _environ[env_count] = (char *)malloc(strlen(cp)+1); 53 | strcpy(_environ[env_count], cp); 54 | env_count++; 55 | while (*cp) cp++; /* skip to NUL */ 56 | cp++; /* skip to next character */ 57 | - } while (*cp); /* repeat until two NULs */ 58 | + } 59 | _environ[env_count] = 0; 60 | 61 | /* 62 | diff --git a/src/stub/stub.asm b/src/stub/stub.asm 63 | index 62dee9e9..76b2edd6 100644 64 | --- a/src/stub/stub.asm 65 | +++ b/src/stub/stub.asm 66 | @@ -160,13 +160,21 @@ resize_again: 67 | ; Scan environment for "PATH=" and the stub's full name after environment 68 | 69 | mov es, es:[0x2c] ; get environment segment 70 | + mov di, es 71 | + or di, di ; check if no env 72 | + jnz @f1 73 | + mov al, 111 74 | + mov dx, msg_no_env 75 | + jmpl error 76 | +@f1: 77 | xor di, di ; begin search for NUL/NUL (di = 0) 78 | ; mov cx, 0xff04 ; effectively `infinite' loop 79 | xor al, al 80 | - .db 0xa9 ; "test ax,...." -- skip 2 bytes 81 | + jmp @f1 82 | scan_environment: 83 | repne 84 | scasb ; search for NUL 85 | +@f1: 86 | cmpw es:[di], 0x4150 ; "PA" 87 | jne not_path 88 | scasw 89 | @@ -182,6 +190,8 @@ not_path: 90 | scasb 91 | jne scan_environment ; no, still environment 92 | scasw ; adjust pointer to point to prog name 93 | + push es 94 | + push di 95 | 96 | ;; When we are spawned from a program which has more than 20 handles in use, 97 | ;; all the handles passed to us by DOS are taken (since only the first 20 98 | @@ -199,8 +209,6 @@ not_path: 99 | ;----------------------------------------------------------------------------- 100 | ; Get DPMI information before doing anything 386-specific 101 | 102 | - push es 103 | - push di 104 | xor cx, cx ; flag for load attempt set cx = 0 105 | jz @f2 ; We always jump, shorter than jmp 106 | @b1: 107 | @@ -828,6 +836,8 @@ msg_not_exe: 108 | .db ": not EXE$" 109 | msg_not_coff: 110 | .db ": not COFF (Check for viruses)$" 111 | +msg_no_env: 112 | + .db "no envseg$" 113 | msg_no_dpmi: 114 | .db "no DPMI - Get csdpmi*b.zip$" 115 | msg_no_dos_memory: 116 | -- 117 | 2.20.1 118 | 119 | -------------------------------------------------------------------------------- /patch/djlsr205/0001-fix-multiple-definition-errors-with-gcc-10.patch: -------------------------------------------------------------------------------- 1 | From 9fcd924b8eec562eeacf53c92a18e06aacb48fa9 Mon Sep 17 00:00:00 2001 2 | From: "J.W. Jagersma" 3 | Date: Sat, 9 May 2020 16:55:26 +0200 4 | Subject: [PATCH] fix multiple definition errors with gcc 10 5 | 6 | GCC 10 now defaults to -fno-common, which causes multiple definition 7 | errors during linking. In libc, __stdio_cleanup_hook is defined twice, 8 | and in fsdb, several variables are defined in a header, which is 9 | included in multiple source files. 10 | 11 | To solve this, __stdio_cleanup_hook is declared extern and fsdb can be 12 | compiled with -fcommon. 13 | --- 14 | src/debug/fsdb/makefile | 2 ++ 15 | src/libc/ansi/stdlib/exit.c | 2 +- 16 | 2 files changed, 3 insertions(+), 1 deletion(-) 17 | 18 | diff --git a/src/debug/fsdb/makefile b/src/debug/fsdb/makefile 19 | index da796d41..41f145fb 100644 20 | --- a/src/debug/fsdb/makefile 21 | +++ b/src/debug/fsdb/makefile 22 | @@ -12,6 +12,8 @@ EOBJS += unassmbl.o 23 | 24 | include $(TOP)/../makefile.inc 25 | 26 | +CFLAGS += -fcommon 27 | + 28 | #relax error checking: 29 | XGCC = $(XLGCC) 30 | 31 | diff --git a/src/libc/ansi/stdlib/exit.c b/src/libc/ansi/stdlib/exit.c 32 | index 94634b11..79b40ae9 100644 33 | --- a/src/libc/ansi/stdlib/exit.c 34 | +++ b/src/libc/ansi/stdlib/exit.c 35 | @@ -15,7 +15,7 @@ 36 | 37 | struct __atexit *__atexit_ptr = 0; 38 | 39 | -void (*__stdio_cleanup_hook)(void); 40 | +extern void (*__stdio_cleanup_hook)(void); 41 | 42 | /* A hook to close down the file system extensions if any where opened. 43 | This does not force them to be linked in. */ 44 | -- 45 | 2.26.2 46 | 47 | -------------------------------------------------------------------------------- /patch/djlsr205/0001-process-make-descriptor-leak-work-around-conditional.patch: -------------------------------------------------------------------------------- 1 | From 12d00dab0e179b4ec1c5a6a7d6e93eb907ef606d Mon Sep 17 00:00:00 2001 2 | From: Stas Sergeev 3 | Date: Sat, 17 Aug 2019 19:00:10 +0300 4 | Subject: [PATCH] process: make descriptor leak work-around conditional 5 | 6 | This patch adds the __spawn_flags variable and __spawn_leak_workaround 7 | flag to allow the software to control the leak work-around. 8 | Previous behaviour was to always enable the work-around unless 9 | the DPMI host is cwsdpmi. 10 | 11 | Without this patch it is not possible to spawn a prot-mode TSR 12 | program like 32rtm. djgpp treats it as a leak and wipes out of 13 | memory. With this patch things work properly if the DPMI server 14 | is smart enough to direct the control to prev client after 32rtm 15 | TSRed. The problem is that 32rtm just jumps to the realmode exit 16 | addr, so the DPMI server doesn't see the exit and may get confused 17 | unless the special logic is implemented for that case (i.e. not all 18 | DPMI servers treat that correctly even after that patch). 19 | --- 20 | include/process.h | 4 ++++ 21 | src/libc/dos/process/dosexec.c | 4 +++- 22 | 2 files changed, 7 insertions(+), 1 deletion(-) 23 | 24 | diff --git a/include/process.h b/include/process.h 25 | index 2816ce25..e57467d4 100644 26 | --- a/include/process.h 27 | +++ b/include/process.h 28 | @@ -52,6 +52,10 @@ int __djgpp_spawn(int _mode, const char *_path, char *const _argv[], char *const 29 | #define SPAWN_EXTENSION_SRCH 1 30 | #define SPAWN_NO_EXTENSION_SRCH 2 31 | 32 | +#define __spawn_leak_workaround 0x0001 /* free descriptor leaks */ 33 | + 34 | +extern int __spawn_flags; 35 | + 36 | #endif /* !_POSIX_SOURCE */ 37 | #endif /* !__STRICT_ANSI__ */ 38 | #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ 39 | diff --git a/src/libc/dos/process/dosexec.c b/src/libc/dos/process/dosexec.c 40 | index 87d7fbd9..d547a31f 100644 41 | --- a/src/libc/dos/process/dosexec.c 42 | +++ b/src/libc/dos/process/dosexec.c 43 | @@ -45,6 +45,7 @@ 44 | extern char **_environ; 45 | 46 | int __dosexec_in_system = 0; 47 | +int __spawn_flags = __spawn_leak_workaround; 48 | 49 | typedef struct { 50 | unsigned short eseg; 51 | @@ -492,7 +493,8 @@ static int direct_exec_tail (const char *program, const char *args, 52 | /* r5 as corresponding DPMI call is supported beginning with v5. */ 53 | 54 | ret = __dpmi_get_capabilities(&flags, dpmi_vendor); 55 | - if (ret == 0 && strcmp(dpmi_vendor + 2, "CWSDPMI") == 0) 56 | + if ((ret == 0 && strcmp(dpmi_vendor + 2, "CWSDPMI") == 0) 57 | + || (__spawn_flags & __spawn_leak_workaround) == 0) 58 | workaround_descriptor_leaks = 0; 59 | else 60 | { 61 | -- 62 | 2.20.1 63 | 64 | -------------------------------------------------------------------------------- /patch/djlsr205/patch-djlsr205.txt: -------------------------------------------------------------------------------- 1 | diff -ur djlsr205-orig/src/dxe/dxe3gen.c djlsr205/src/dxe/dxe3gen.c 2 | --- djlsr205-orig/src/dxe/dxe3gen.c 2017-04-29 14:32:47.000000000 +0800 3 | +++ djlsr205/src/dxe/dxe3gen.c 2017-04-29 14:33:27.000000000 +0800 4 | @@ -193,7 +193,7 @@ 5 | #include "../../include/sys/dxe.h" 6 | #include "../../include/coff.h" 7 | 8 | -#define VERSION "1.0.3" 9 | +#define VERSION "1.0.4" 10 | 11 | #define TEMP_BASE "dxe_tmp" /* 7 chars, 1 char suffix */ 12 | #define TEMP_O_FILE TEMP_BASE".o" 13 | @@ -937,6 +937,7 @@ 14 | char *strings; 15 | RELOC *relocs; 16 | unsigned int i, j, errcount; 17 | + ULONG32 real_nrelocs; 18 | size_t hdrsize; 19 | 20 | /* Exported symbols table */ 21 | @@ -985,9 +986,18 @@ 22 | strings[0] = 0; 23 | 24 | /* Read the relocation table */ 25 | - relocs = (RELOC *)malloc(sc.s_nreloc * sizeof(RELOC)); 26 | fseek(inf, sc.s_relptr, SEEK_SET); 27 | - fread(relocs, RELSZ, sc.s_nreloc, inf); 28 | + if (sc.s_flags & STYP_NRELOC_OVFL) { 29 | + fread(&real_nrelocs, 4, 1, inf); /* read r_vaddr */ 30 | + fseek(inf, RELSZ - 4, SEEK_CUR); /* skip the rest */ 31 | + dh.nrelocs = --real_nrelocs; /* lose the '+1' */ 32 | + if (opt.verbose) 33 | + printf("%s: real nrelocs: %lu\n", progname, (unsigned long)real_nrelocs); 34 | + } else { 35 | + real_nrelocs = dh.nrelocs; 36 | + } 37 | + relocs = (RELOC *)malloc(real_nrelocs * sizeof(RELOC)); 38 | + fread(relocs, RELSZ, real_nrelocs, inf); 39 | 40 | /* Close input file */ 41 | fclose(inf); 42 | @@ -1042,7 +1052,7 @@ 43 | int n_abs_relocs = 0, n_rel_relocs = 0; 44 | 45 | /* count the amount of relocations pointing to this symbol */ 46 | - for (j = 0; j < sc.s_nreloc; j++) 47 | + for (j = 0; j < real_nrelocs; j++) 48 | { 49 | if (relocs[j].r_symndx == i) 50 | { 51 | @@ -1101,7 +1111,7 @@ 52 | 53 | unres_size = newsize; 54 | 55 | - for (j = 0; j < sc.s_nreloc; j++) 56 | + for (j = 0; j < real_nrelocs; j++) 57 | { 58 | if (relocs[j].r_symndx == i) 59 | { 60 | @@ -1145,7 +1155,7 @@ 61 | BOOL ok = FALSE; 62 | for (j = 0; j < opt.num_excl; j++) 63 | { 64 | - if (memcmp(opt.excl_prefix[j], name, strlen(opt.excl_prefix[j])) == 0) 65 | + if (strncmp(opt.excl_prefix[j], name, strlen(opt.excl_prefix[j])) == 0) 66 | { 67 | ok = TRUE; 68 | break; 69 | @@ -1160,7 +1170,7 @@ 70 | BOOL ok = FALSE; 71 | for (j = 0; j < opt.num_prefix; j++) 72 | { 73 | - if (memcmp(opt.export_prefix[j], name, strlen(opt.export_prefix[j])) == 0) 74 | + if (strncmp(opt.export_prefix[j], name, strlen(opt.export_prefix[j])) == 0) 75 | { 76 | ok = TRUE; 77 | break; 78 | @@ -1202,7 +1212,7 @@ 79 | 80 | /* Compute the amount of valid relocations */ 81 | DEBUG_PRINT_RELOCATION_DIRECTIVE_PROLOG(); 82 | - for (i = 0; i < sc.s_nreloc; i++) 83 | + for (i = 0; i < real_nrelocs; i++) 84 | { 85 | DEBUG_PRINT_RELOCATION_DIRECTIVE(i, relocs); 86 | if (!VALID_RELOC(relocs[i])) 87 | @@ -1278,7 +1288,7 @@ 88 | free(data); 89 | 90 | /* Output the relocations */ 91 | - for (i = 0; i < sc.s_nreloc; i++) 92 | + for (i = 0; i < real_nrelocs; i++) 93 | { 94 | if (VALID_RELOC(relocs[i])) 95 | fwrite(&relocs[i].r_vaddr, 1, sizeof(relocs[0].r_vaddr), outf); 96 | 97 | diff -ur djlsr205-orig/src/misc.c djlsr205/src/misc.c 98 | --- djlsr205-orig/src/misc.c 2017-04-29 14:32:47.000000000 +0800 99 | +++ djlsr205/src/misc.c 2017-04-29 14:32:57.000000000 +0800 100 | @@ -14,7 +14,11 @@ 101 | { 102 | /* MS-DOS uses \, unix uses / */ 103 | if (argc > 2 && strcmp(argv[1], "mkdir") == 0) 104 | +#if defined(__MINGW32__) || defined(__MINGW64__) 105 | + mkdir(argv[2]); 106 | +#else 107 | mkdir(argv[2], 0777); 108 | +#endif 109 | 110 | /* redirection and long command lines don't always 111 | mix well under MS-DOS */ 112 | diff -ur djlsr205-orig/src/stub/exe2coff.c djlsr205/src/stub/exe2coff.c 113 | --- djlsr205-orig/src/stub/exe2coff.c 2017-04-29 14:32:47.000000000 +0800 114 | +++ djlsr205/src/stub/exe2coff.c 2017-04-29 14:32:57.000000000 +0800 115 | @@ -5,10 +5,12 @@ 116 | #include 117 | #include 118 | #include 119 | -#include 120 | #include 121 | #include 122 | 123 | +#if !defined(O_BINARY) 124 | +#define O_BINARY 0 125 | +#endif 126 | 127 | static void 128 | exe2aout(char *fname) 129 | 130 | --- a/src/makefile.def 131 | +++ b/src/makefile.def 132 | @@ -47,11 +47,12 @@ 133 | 134 | # For building distributed (djgpp) libraries and programs 135 | 136 | -CROSS_GCC = i586-pc-msdosdjgpp-gcc -pipe 137 | -CROSS_AR = i586-pc-msdosdjgpp-ar 138 | -CROSS_AS = i586-pc-msdosdjgpp-as 139 | -CROSS_LD = i586-pc-msdosdjgpp-ld 140 | -CROSS_STRIP = i586-pc-msdosdjgpp-strip 141 | +CROSS_PREFIX = i586-pc-msdosdjgpp- 142 | +CROSS_GCC = $(CROSS_PREFIX)gcc -pipe 143 | +CROSS_AR = $(CROSS_PREFIX)ar 144 | +CROSS_AS = $(CROSS_PREFIX)as 145 | +CROSS_LD = $(CROSS_PREFIX)ld 146 | +CROSS_STRIP = $(CROSS_PREFIX)strip 147 | CROSS_BISON = bison 148 | 149 | # For building programs that *run* during the build (hostbin/*); 150 | diff --git a/src/debug/common/dbgcom.c b/src/debug/common/dbgcom.c 151 | index 77ca122b..1480f27c 100644 152 | --- a/src/debug/common/dbgcom.c 153 | +++ b/src/debug/common/dbgcom.c 154 | @@ -1338,13 +1338,13 @@ int invalid_sel_addr(short sel, unsigned a, unsigned len, char for_write) 155 | (" \n\ 156 | movw %2,%%ax \n\ 157 | verr %%ax \n\ 158 | - jnz .Ldoes_not_has_read_right \n\ 159 | + jnz .Ldoes_not_has_read_right%= \n\ 160 | movb $1,%0 \n\ 161 | -.Ldoes_not_has_read_right: \n\ 162 | +.Ldoes_not_has_read_right%=: \n\ 163 | verw %%ax \n\ 164 | - jnz .Ldoes_not_has_write_right \n\ 165 | + jnz .Ldoes_not_has_write_right%= \n\ 166 | movb $1,%1 \n\ 167 | -.Ldoes_not_has_write_right: " 168 | +.Ldoes_not_has_write_right%=: " 169 | : "=qm" (read_allowed), "=qm" (write_allowed) 170 | : "g" (sel) 171 | ); 172 | diff --git a/src/dxe/makefile b/src/dxe/makefile 173 | index cf715867..b856b9ed 100644 174 | --- a/src/dxe/makefile 175 | +++ b/src/dxe/makefile 176 | @@ -13,7 +13,8 @@ all :: native \ 177 | $(BIN)/dxe3res.exe \ 178 | $E 179 | 180 | -native :: $(HOSTBIN)/dxegen.exe 181 | +native :: $(HOSTBIN)/dxegen.exe \ 182 | + $(HOSTBIN)/dxe3res.exe 183 | $(NOP) 184 | 185 | .o.h: 186 | @@ -36,5 +37,8 @@ CROSS_CC = $(word 1,$(CROSS_GCC)) 187 | $(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 188 | $(GCC) -DDXE_LD=\"$(CROSS_LD)\" -DDXE_CC=\"$(CROSS_CC)\" -DDXE_AR=\"$(CROSS_AR)\" -DDXE_AS=\"$(CROSS_AS)\" dxe3gen.c -o $@ 189 | 190 | +$(HOSTBIN)/dxe3res.exe: dxe3res.c 191 | + $(GCC) -O2 -Wall dxe3res.c -o $@ 192 | + 193 | clean :: 194 | @-$(MISC) rm *.o *.h $(HOSTBIN)/dxegen.exe 195 | diff --git a/src/makefile b/src/makefile 196 | index f62b70e4..e6f397fd 100644 197 | --- a/src/makefile 198 | +++ b/src/makefile 199 | @@ -21,7 +21,7 @@ DIRS = \ 200 | ../info \ 201 | ../lib 202 | 203 | -all : misc.exe config $(DIRS) makemake.exe subs ../lib/libg.a ../lib/libpc.a 204 | +all : misc.exe config $(DIRS) makemake.exe subs 205 | 206 | misc.exe : misc.c 207 | gcc -O2 -Wall misc.c -o misc.exe 208 | diff --git a/src/makefile.inc b/src/makefile.inc 209 | index 664fdf9f..09c6f997 100644 210 | --- a/src/makefile.inc 211 | +++ b/src/makefile.inc 212 | @@ -165,7 +165,7 @@ ifneq ($(MAKEFILE_LIB),1) 213 | all :: makefile.oh 214 | makefile.oh : makefile 215 | @$(MISC) echo - building new response file 216 | - @$(MISC) echo makefile.oh $(addprefix \&/,$(OBJS)) 217 | + @echo "$(addprefix &/,$(OBJS))" > makefile.oh 218 | endif 219 | 220 | clean :: 221 | diff --git a/src/makefile.lib b/src/makefile.lib 222 | index 3a72a464..a3b5bd1e 100644 223 | --- a/src/makefile.lib 224 | +++ b/src/makefile.lib 225 | @@ -23,6 +23,7 @@ $(LIB)/lib$(LIBNAME).a : $(OBJS) makefile.rf $(TOP)/../ident.c 226 | ifeq ($(CROSS_BUILD),0) 227 | $(CROSS_AR) q $(LIB)/lib$(LIBNAME).a @makefile.rf id_$(LIBNAME).o 228 | else 229 | + dos2unix makefile.rf 230 | $(CROSS_AR) q $(LIB)/lib$(LIBNAME).a `cat makefile.rf` id_$(LIBNAME).o 231 | endif 232 | $(CROSS_AR) s $(LIB)/lib$(LIBNAME).a 233 | diff --git a/src/stub/makefile b/src/stub/makefile 234 | index 83de0f1d..fef8ac8f 100644 235 | --- a/src/stub/makefile 236 | +++ b/src/stub/makefile 237 | @@ -22,6 +22,7 @@ all :: native \ 238 | native :: \ 239 | $(HOSTBIN)/stubedit.exe \ 240 | $(HOSTBIN)/stubify.exe \ 241 | + $(HOSTBIN)/exe2coff.exe \ 242 | $(INC)/stubinfo.h \ 243 | $E 244 | $(NOP) 245 | @@ -63,10 +64,13 @@ $(BIN)/stubedit.exe : $(C) stubedit.o $(L) 246 | 247 | 248 | $(HOSTBIN)/stubify.exe : stubify.c stub.h 249 | - $(GCC) stubify.c -o $@ 250 | + $(GCC) -O2 stubify.c -o $@ 251 | 252 | $(HOSTBIN)/stubedit.exe : stubedit.c $(INC)/stubinfo.h 253 | - $(GCC) stubedit.c -o $@ 254 | + $(GCC) -O2 stubedit.c -o $@ 255 | + 256 | +$(HOSTBIN)/exe2coff.exe : exe2coff.c 257 | + $(GCC) -O2 $< -o $@ 258 | 259 | ./stub2inc.exe : stub2inc.c 260 | $(GCC) stub2inc.c -o $@ 261 | diff --git a/src/libc/crt0/crt1.c b/src/libc/crt0/crt1.c 262 | index 1bb6aa55..f0ba9919 100644 263 | --- a/src/libc/crt0/crt1.c 264 | +++ b/src/libc/crt0/crt1.c 265 | @@ -208,7 +208,7 @@ setup_os_version(void) 266 | _osminor = v & 0xff; 267 | } 268 | 269 | - 270 | +__attribute__((force_align_arg_pointer)) 271 | void 272 | __crt1_startup(void) 273 | { 274 | --- a/src/makefile.cfg 275 | +++ b/src/makefile.cfg 276 | @@ -48,6 +48,7 @@ 277 | @./misc.exe echo - "-Wsign-compare" >>gcc.opt 278 | @./misc.exe echo - "-nostdinc" >>gcc.opt 279 | @./misc.exe echo - "$(IQUOTE)" >>gcc.opt 280 | + @./misc.exe echo - "-mpreferred-stack-boundary=4" >>gcc.opt 281 | 282 | 283 | gcc-l.opt: makefile.cfg 284 | @@ -58,6 +59,7 @@ 285 | @./misc.exe echo - "-Wall" >>gcc-l.opt 286 | @./misc.exe echo - "-nostdinc" >>gcc-l.opt 287 | @./misc.exe echo - "$(IQUOTE)" >>gcc-l.opt 288 | + @./misc.exe echo - "-mpreferred-stack-boundary=4" >>gcc.opt 289 | 290 | gpp.opt: gcc.opt 291 | sed -f gpp.sed $< > $@ 292 | --- a/src/libc/ansi/stdlib/nmalloc.c 293 | +++ b/src/libc/ansi/stdlib/nmalloc.c 294 | @@ -1145,6 +1145,7 @@ 295 | return nmalloc(szneed); /* EXIT */ 296 | } 297 | else if ((minit = nmalloc(szneed + XTRA))) { 298 | + m = MEMBLKp(minit); 299 | /* alignment >= 2*ALIGN and power of 2 if here */ 300 | misalign = (ulong)minit % alignment; 301 | DBGPRTM(" misalignment = %d", misalign); 302 | @@ -1154,9 +1155,10 @@ 303 | } 304 | else { 305 | /* two or more chunks to release */ 306 | - /* for now, just return NULL and have a leak */ 307 | DBGPRTM(" Complex case, release multiple chunks"); 308 | DBGEOLN; 309 | + nfree(PTR(split(&m, alignment - misalign))); 310 | + return nrealloc(PTR(m), size); 311 | } 312 | } /* alignment > ALIGN */ 313 | } /* valid parameters */ 314 | -------------------------------------------------------------------------------- /patch/gdb-15.1/0000-dwarf2-read.patch: -------------------------------------------------------------------------------- 1 | commit 5d683ae3dadd78fa88c243310404480555555246 2 | Author: Tom Tromey 3 | Date: Wed Aug 21 09:09:26 2024 -0600 4 | 5 | Do not assume ELF in dwarf2/read.c 6 | 7 | dwarf2/read.c has this code: 8 | 9 | else if (elf_section_data (sectp)->this_hdr.sh_size 10 | > bfd_get_file_size (abfd)) 11 | 12 | This assumes that the BFD is an ELF, which is an invalid assumption. 13 | A user noticed that this can sometimes cause a crash. 14 | 15 | This patch fixes the problem by changing this code to use 16 | bfd_section_size_insane. 17 | 18 | Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32104 19 | Reviewed-By: Tom de Vries 20 | Reviewed-by: Keith Seitz 21 | 22 | diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c 23 | index 4818da58acb..6309bccc0a3 100644 24 | --- a/gdb/dwarf2/read.c 25 | +++ b/gdb/dwarf2/read.c 26 | @@ -1425,12 +1425,11 @@ dwarf2_per_bfd::locate_sections (bfd *abfd, asection *sectp, 27 | if ((aflag & SEC_HAS_CONTENTS) == 0) 28 | { 29 | } 30 | - else if (elf_section_data (sectp)->this_hdr.sh_size 31 | - > bfd_get_file_size (abfd)) 32 | + else if (bfd_section_size_insane (abfd, sectp)) 33 | { 34 | - bfd_size_type size = elf_section_data (sectp)->this_hdr.sh_size; 35 | - warning (_("Discarding section %s which has a section size (%s" 36 | - ") larger than the file size [in module %s]"), 37 | + bfd_size_type size = sectp->size; 38 | + warning (_("Discarding section %s which has an invalid size (%s) " 39 | + "[in module %s]"), 40 | bfd_section_name (sectp), phex_nz (size, sizeof (size)), 41 | bfd_get_filename (abfd)); 42 | } 43 | -------------------------------------------------------------------------------- /patch/gdb-15.2/0000-dwarf2-read.patch: -------------------------------------------------------------------------------- 1 | commit 5d683ae3dadd78fa88c243310404480555555246 2 | Author: Tom Tromey 3 | Date: Wed Aug 21 09:09:26 2024 -0600 4 | 5 | Do not assume ELF in dwarf2/read.c 6 | 7 | dwarf2/read.c has this code: 8 | 9 | else if (elf_section_data (sectp)->this_hdr.sh_size 10 | > bfd_get_file_size (abfd)) 11 | 12 | This assumes that the BFD is an ELF, which is an invalid assumption. 13 | A user noticed that this can sometimes cause a crash. 14 | 15 | This patch fixes the problem by changing this code to use 16 | bfd_section_size_insane. 17 | 18 | Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32104 19 | Reviewed-By: Tom de Vries 20 | Reviewed-by: Keith Seitz 21 | 22 | diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c 23 | index 4818da58acb..6309bccc0a3 100644 24 | --- a/gdb/dwarf2/read.c 25 | +++ b/gdb/dwarf2/read.c 26 | @@ -1425,12 +1425,11 @@ dwarf2_per_bfd::locate_sections (bfd *abfd, asection *sectp, 27 | if ((aflag & SEC_HAS_CONTENTS) == 0) 28 | { 29 | } 30 | - else if (elf_section_data (sectp)->this_hdr.sh_size 31 | - > bfd_get_file_size (abfd)) 32 | + else if (bfd_section_size_insane (abfd, sectp)) 33 | { 34 | - bfd_size_type size = elf_section_data (sectp)->this_hdr.sh_size; 35 | - warning (_("Discarding section %s which has a section size (%s" 36 | - ") larger than the file size [in module %s]"), 37 | + bfd_size_type size = sectp->size; 38 | + warning (_("Discarding section %s which has an invalid size (%s) " 39 | + "[in module %s]"), 40 | bfd_section_name (sectp), phex_nz (size, sizeof (size)), 41 | bfd_get_filename (abfd)); 42 | } 43 | -------------------------------------------------------------------------------- /patch/gdb-8.2.1/0000-readline.patch: -------------------------------------------------------------------------------- 1 | commit 16bfc2f9705b40a11052f465b83fea2ec0904ce5 2 | Author: Alan Hayward 3 | Date: Thu Jan 31 09:48:39 2019 +0000 4 | 5 | Readline: Cleanup some warnings 6 | 7 | Cleanup the readline warnings that gdb buildbot complains about. 8 | 9 | To prevent wcwidth missing declaration warnings, add the SOURCE / 10 | EXTENSION macros to config.in that have already checked for in 11 | configure. 12 | 13 | Ensure pid is a long before printing as one. Also fix GNU style. 14 | 15 | Check the return value of write the same way as history_do_write (). 16 | 17 | These changes are consistent with upstream readline. 18 | 19 | readline/ChangeLog.gdb: 20 | 21 | * config.h.in: Add SOURCE/EXTENSION macros. 22 | * histfile.c (history_truncate_file): Check return of write. 23 | * util.c (_rl_tropen): Ensure pid is long. 24 | 25 | diff --git a/readline/ChangeLog.gdb b/readline/ChangeLog.gdb 26 | index f05b9dc52c2..c59329ee7d2 100644 27 | --- a/readline/ChangeLog.gdb 28 | +++ b/readline/ChangeLog.gdb 29 | @@ -1,3 +1,9 @@ 30 | +2019-01-31 Alan Hayward 31 | + 32 | + * config.h.in: Add SOURCE/EXTENSION macros. 33 | + * histfile.c (history_truncate_file): Check return of write. 34 | + * util.c (_rl_tropen): Ensure pid is long. 35 | + 36 | 2017-05-19 Eli Zaretskii 37 | 38 | * input.c [_WIN32]: Include to avoid compiler warning on 39 | diff --git a/readline/config.h.in b/readline/config.h.in 40 | index 86d86cfa3da..c194e761a45 100644 41 | --- a/readline/config.h.in 42 | +++ b/readline/config.h.in 43 | @@ -1,5 +1,15 @@ 44 | /* config.h.in. Maintained by hand. */ 45 | 46 | +/* Template definitions for autoconf */ 47 | +#undef __EXTENSIONS__ 48 | +#undef _ALL_SOURCE 49 | +#undef _GNU_SOURCE 50 | +#undef _POSIX_SOURCE 51 | +#undef _POSIX_1_SOURCE 52 | +#undef _POSIX_PTHREAD_SEMANTICS 53 | +#undef _TANDEM_SOURCE 54 | +#undef _MINIX 55 | + 56 | /* Define NO_MULTIBYTE_SUPPORT to not compile in support for multibyte 57 | characters, even if the OS supports them. */ 58 | #undef NO_MULTIBYTE_SUPPORT 59 | diff --git a/readline/histfile.c b/readline/histfile.c 60 | index fffeb3fd319..56cbbf0498c 100644 61 | --- a/readline/histfile.c 62 | +++ b/readline/histfile.c 63 | @@ -407,7 +407,8 @@ history_truncate_file (fname, lines) 64 | truncate to. */ 65 | if (bp > buffer && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1)) 66 | { 67 | - write (file, bp, chars_read - (bp - buffer)); 68 | + if (write (file, bp, chars_read - (bp - buffer)) < 0) 69 | + rv = errno; 70 | 71 | #if defined (__BEOS__) 72 | /* BeOS ignores O_TRUNC. */ 73 | diff --git a/readline/util.c b/readline/util.c 74 | index d402fce842c..13bd00c09c9 100644 75 | --- a/readline/util.c 76 | +++ b/readline/util.c 77 | @@ -515,11 +515,11 @@ _rl_tropen () 78 | (sh_get_env_value ("TEMP") 79 | ? sh_get_env_value ("TEMP") 80 | : "."), 81 | - getpid()); 82 | + getpid ()); 83 | #else 84 | - sprintf (fnbuf, "/var/tmp/rltrace.%ld", getpid()); 85 | + sprintf (fnbuf, "/var/tmp/rltrace.%ld", (long) getpid ()); 86 | #endif 87 | - unlink(fnbuf); 88 | + unlink (fnbuf); 89 | _rl_tracefp = fopen (fnbuf, "w+"); 90 | return _rl_tracefp != 0; 91 | } 92 | -------------------------------------------------------------------------------- /patch/patch-binutils-2.33.1-swap.txt: -------------------------------------------------------------------------------- 1 | --- swap.original.h 2020-02-04 01:52:21.137081500 +0100 2 | +++ swap.h 2020-02-04 01:53:00.090081500 +0100 3 | @@ -23,18 +23,14 @@ 4 | #include "config.h" 5 | #include 6 | 7 | -#ifdef HAVE_BYTESWAP_H 8 | -#include 9 | -#else 10 | - 11 | /* Provide our own versions of the byteswap functions. */ 12 | -inline uint16_t 13 | +static inline uint16_t 14 | bswap_16 (uint16_t v) 15 | { 16 | return ((v >> 8) & 0xff) | ((v & 0xff) << 8); 17 | } 18 | 19 | -inline uint32_t 20 | +static inline uint32_t 21 | bswap_32 (uint32_t v) 22 | { 23 | return ( ((v & 0xff000000) >> 24) 24 | @@ -43,13 +39,13 @@ 25 | | ((v & 0x000000ff) << 24)); 26 | } 27 | 28 | -inline uint64_t 29 | +static inline uint64_t 30 | bswap_identity_64 (uint64_t v) 31 | { 32 | return v; 33 | } 34 | 35 | -inline uint64_t 36 | +static inline uint64_t 37 | bswap_64 (uint64_t v) 38 | { 39 | return ( ((v & 0xff00000000000000ULL) >> 56) 40 | @@ -61,6 +57,5 @@ 41 | | ((v & 0x000000000000ff00ULL) << 40) 42 | | ((v & 0x00000000000000ffULL) << 56)); 43 | } 44 | -#endif /* !defined(HAVE_BYTESWAP_H) */ 45 | 46 | #endif /* !defined(_CTF_SWAP_H) */ 47 | -------------------------------------------------------------------------------- /patch/patch-binutils-2.34-swap.txt: -------------------------------------------------------------------------------- 1 | --- swap.original.h 2020-02-04 01:56:36.717929400 +0100 2 | +++ swap.h 2020-02-04 01:57:35.702827300 +0100 3 | @@ -23,10 +23,6 @@ 4 | #include "config.h" 5 | #include 6 | 7 | -#ifdef HAVE_BYTESWAP_H 8 | -#include 9 | -#else 10 | - 11 | /* Provide our own versions of the byteswap functions. */ 12 | static inline uint16_t 13 | bswap_16 (uint16_t v) 14 | @@ -61,6 +57,5 @@ 15 | | ((v & 0x000000000000ff00ULL) << 40) 16 | | ((v & 0x00000000000000ffULL) << 56)); 17 | } 18 | -#endif /* !defined(HAVE_BYTESWAP_H) */ 19 | 20 | #endif /* !defined(_CTF_SWAP_H) */ 21 | -------------------------------------------------------------------------------- /patch/patch-djcrx205.txt: -------------------------------------------------------------------------------- 1 | diff -ur djcrx205-orig/lib/dxe.ld djcrx205/lib/dxe.ld 2 | --- djcrx205-orig/lib/dxe.ld 2017-04-30 14:04:14.000000000 +0800 3 | +++ djcrx205/lib/dxe.ld 2017-04-30 14:04:40.000000000 +0800 4 | @@ -28,7 +28,8 @@ 5 | ___EH_FRAME_END__ = . ; 6 | LONG(0); 7 | *(.gnu.linkonce.d*) 8 | - *(.bss) 9 | + *(.bss .bss.* .gnu.linkonce.b.*) 10 | *(COMMON) 11 | } 12 | + /DISCARD/ : { *(gnu.lto_*) } 13 | } 14 | -------------------------------------------------------------------------------- /patch/patch-gcc-ia16.txt: -------------------------------------------------------------------------------- 1 | diff --git a/gcc/opts.c b/gcc/opts.c 2 | index 0f9431a0b..91af66f98 100644 3 | --- a/gcc/opts.c 4 | +++ b/gcc/opts.c 5 | @@ -2340,8 +2340,8 @@ set_debug_level (enum debug_info_type type, int extended, const char *arg, 6 | #endif 7 | } 8 | 9 | - if (opts->x_write_symbols == NO_DEBUG) 10 | - warning_at (loc, 0, "target system does not support debug output"); 11 | +// if (opts->x_write_symbols == NO_DEBUG) 12 | +// warning_at (loc, 0, "target system does not support debug output"); 13 | } 14 | } 15 | else 16 | -------------------------------------------------------------------------------- /patch/patch-unpack-gcc-4.7.3.txt: -------------------------------------------------------------------------------- 1 | --- a/unpack-gcc.sh 2020-02-03 21:15:48.960456100 +0100 2 | +++ b/unpack-gcc.sh 2020-02-03 21:16:16.080456100 +0100 3 | @@ -31,24 +31,6 @@ 4 | esac 5 | done 6 | 7 | -archive=${1-gcc-$gcc_version.tar.bz2} 8 | - 9 | -if test "$tar_param" = "xf" ; then 10 | - echo "Failed to detect how to decompress $archive" 11 | - exit 1 12 | -fi 13 | - 14 | -rm -rf gnu 15 | -mkdir gnu 16 | - 17 | -rm -f $top/s-sources 18 | -( 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 ) 19 | - 20 | -if ! [ -f s-sources ] ; then 21 | - echo "Cannot unpack GCC sources" 22 | - exit 1 23 | -fi 24 | - 25 | orig_dir_name=`(cd gnu && ls -d gcc* | sed 1q; )` 26 | 27 | base_ver=$(cat gnu/$orig_dir_name/gcc/BASE-VER) 28 | @@ -70,7 +52,7 @@ 29 | short_ver_2=${short_ver_2}-$datestamp 30 | fi 31 | 32 | -dir_name=gcc-$short_ver 33 | +dir_name=gcc-$gcc_version 34 | 35 | if ! test "$dir_name" = "$orig_dir_name" ; then 36 | mv -f gnu/$orig_dir_name gnu/$dir_name || exit 1 37 | -------------------------------------------------------------------------------- /patch/patch-unpack-gcc-4.8.0.txt: -------------------------------------------------------------------------------- 1 | --- a/unpack-gcc.sh 2020-02-03 21:17:50.083456100 +0100 2 | +++ b/unpack-gcc.sh 2020-02-03 21:18:18.017456100 +0100 3 | @@ -31,29 +31,6 @@ 4 | esac 5 | done 6 | 7 | -archive=${1-gcc-$gcc_version.tar.bz2} 8 | - 9 | -# 10 | -# Detect required tar command line parameters for unpacking source archice 11 | -# 12 | -tar_param=xf`case $archive in *.gz|*.tgz) echo 'z';; *.bz2) echo 'j';; *.xz) echo 'J';; esac` 13 | - 14 | -if test "$tar_param" = "xf" ; then 15 | - echo "Failed to detect how to decompress $archive" 16 | - exit 1 17 | -fi 18 | - 19 | -rm -rf gnu 20 | -mkdir gnu 21 | - 22 | -rm -f $top/s-sources 23 | -( cd gnu && tar $tar_param $top/$archive && echo $archive >$top/s-sources ) 24 | - 25 | -if ! [ -f s-sources ] ; then 26 | - echo "Cannot unpack GCC sources" 27 | - exit 1 28 | -fi 29 | - 30 | orig_dir_name=`(cd gnu && ls -d gcc* | sed 1q; )` 31 | 32 | base_ver=$(cat gnu/$orig_dir_name/gcc/BASE-VER) 33 | @@ -75,7 +52,7 @@ 34 | short_ver_2=${short_ver_2}-$datestamp 35 | fi 36 | 37 | -dir_name=gcc-$short_ver 38 | +dir_name=gcc-$gcc_version 39 | 40 | if ! test "$dir_name" = "$orig_dir_name" ; then 41 | mv -f gnu/$orig_dir_name gnu/$dir_name || exit 1 42 | -------------------------------------------------------------------------------- /patch/patch-unpack-gcc.txt: -------------------------------------------------------------------------------- 1 | --- a/unpack-gcc.sh 2 | +++ b/unpack-gcc.sh 3 | @@ -33,32 +33,6 @@ 4 | esac 5 | done 6 | 7 | -archive=${1-gcc-$gcc_version.tar.bz2} 8 | - 9 | -# 10 | -# Detect required tar command line parameters for unpacking source archice 11 | -# 12 | -tar_param=`case $archive in *.gz|*.tgz) echo '--use=gzip' ;; 13 | - *.bz2) echo '--use=bzip2' ;; 14 | - *.xz) echo '--use=xz' ;; 15 | -esac` 16 | - 17 | -if test "$tar_param" = "" ; then 18 | - echo "Failed to detect how to decompress $archive" 19 | - exit 1 20 | -fi 21 | - 22 | -rm -rf gnu 23 | -mkdir gnu 24 | - 25 | -rm -f $top/s-sources 26 | -( cd gnu && tar xf $top/$archive $tar_param && echo $archive >$top/s-sources ) 27 | - 28 | -if ! [ -f s-sources ] ; then 29 | - echo "Cannot unpack GCC sources" 30 | - exit 1 31 | -fi 32 | - 33 | orig_dir_name=`(cd gnu && ls -d gcc* | sed 1q; )` 34 | 35 | base_ver=$(cat gnu/$orig_dir_name/gcc/BASE-VER) 36 | @@ -80,7 +54,7 @@ 37 | short_ver_2=${short_ver_2}-$datestamp 38 | fi 39 | 40 | -dir_name=gcc-$short_ver 41 | +dir_name=gcc-$gcc_version 42 | 43 | if ! test "$dir_name" = "$orig_dir_name" ; then 44 | mv -f gnu/$orig_dir_name gnu/$dir_name || exit 1 45 | -------------------------------------------------------------------------------- /patch/watt32-djgpp-205/djgpp.err: -------------------------------------------------------------------------------- 1 | #ifndef __SYS_WERRNO_ERR 2 | #define __SYS_WERRNO_ERR 3 | 4 | /* 5 | * THIS FILE WAS GENERATED BY %WATT_ROOT%\c:/dj_err.exe 6 | * at Fri Jun 30 23:24:47 2023. 7 | * DO NOT EDIT. 8 | * 9 | * Watt-32 errnos are after vendor's errnos (1 - 41) 10 | */ 11 | 12 | #ifndef __DJGPP__ 13 | #error This file is only for use by "__DJGPP__" 14 | #endif 15 | 16 | #define ERRNO_VENDOR_VERSION "2.05" 17 | 18 | #define EDOM 1 19 | #define ERANGE 2 20 | #define E2BIG 3 21 | #define EACCES 4 22 | #define EAGAIN 5 23 | #define EBADF 6 24 | #define EBUSY 7 25 | #define ECHILD 8 26 | #define EDEADLK 9 27 | #define EEXIST 10 28 | #define EFAULT 11 29 | #define EFBIG 12 30 | #define EINTR 13 31 | #define EINVAL 14 32 | #define EIO 15 33 | #define EISDIR 16 34 | #define EMFILE 17 35 | #define EMLINK 18 36 | #define ENAMETOOLONG 19 37 | #define ENFILE 20 38 | #define ENODEV 21 39 | #define ENOENT 22 40 | #define ENOEXEC 23 41 | #define ENOLCK 24 42 | #define ENOMEM 25 43 | #define ENOSPC 26 44 | #define ENOSYS 27 45 | #define ENOTDIR 28 46 | #define ENOTEMPTY 29 47 | #define ENOTTY 30 48 | #define ENXIO 31 49 | #define EPERM 32 50 | #define EPIPE 33 51 | #define EROFS 34 52 | #define ESPIPE 35 53 | #define ESRCH 36 54 | #define EXDEV 37 55 | #define ENMFILE 38 56 | #define ELOOP 39 57 | #define EOVERFLOW 40 58 | #define EILSEQ 41 59 | #define EWOULDBLOCK 42 60 | #define EINPROGRESS 43 61 | #define EALREADY 44 62 | #define ENOTSOCK 45 63 | #define EDESTADDRREQ 46 64 | #define EMSGSIZE 47 65 | #define EPROTOTYPE 48 66 | #define ENOPROTOOPT 49 67 | #define EPROTONOSUPPORT 50 68 | #define ESOCKTNOSUPPORT 51 69 | #define EOPNOTSUPP 52 70 | #define EPFNOSUPPORT 53 71 | #define EAFNOSUPPORT 54 72 | #define EADDRINUSE 55 73 | #define EADDRNOTAVAIL 56 74 | #define ENETDOWN 57 75 | #define ENETUNREACH 58 76 | #define ENETRESET 59 77 | #define ECONNABORTED 60 78 | #define ECONNRESET 61 79 | #define ENOBUFS 62 80 | #define EISCONN 63 81 | #define ENOTCONN 64 82 | #define ESHUTDOWN 65 83 | #define ETIMEDOUT 66 84 | #define ECONNREFUSED 67 85 | #define EHOSTDOWN 68 86 | #define EHOSTUNREACH 69 87 | #define ESTALE 70 88 | #define EREMOTE 71 89 | #define EBADRPC 72 90 | #define ERPCMISMATCH 73 91 | #define EPROGUNAVAIL 74 92 | #define EPROGMISMATCH 75 93 | #define EPROCUNAVAIL 76 94 | #define EINVFNC 77 95 | #define ENOPATH 78 96 | #define ECONTR 79 97 | #define EINVMEM 80 98 | #define EINVENV 81 99 | #define EINVFMT 82 100 | #define EINVACC 83 101 | #define EINVDAT 84 102 | #define EDEADLOCK 85 103 | #define ECURDIR 86 104 | #define ENOTSAM 87 105 | #define ETXTBSY 88 106 | #define ENOTBLK 89 107 | #define EUCLEAN 90 108 | #define ETOOMANYREFS 91 109 | #define EPROCLIM 92 110 | #define EUSERS 93 111 | #define EDQUOT 94 112 | #define EVDBAD 95 113 | #define ENORMTWD 96 114 | #define ECANCELED 97 115 | 116 | #endif /* __SYS_WERRNO_ERR */ 117 | -------------------------------------------------------------------------------- /patch/watt32-djgpp-205/syserr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * THIS FILE WAS GENERATED BY %WATT_ROOT%\c:/dj_err.exe 3 | * at Fri Jun 30 23:24:49 2023. 4 | * DO NOT EDIT. 5 | * 6 | * The Watt-32 'sys_errlist[]' that replaces vendor's 'sys_errlist[]' 7 | */ 8 | 9 | #ifndef __DJGPP__ 10 | #error This file is only for use by "__DJGPP__" 11 | #endif 12 | 13 | char __syserr000[] = "Unknown error"; 14 | char __syserr001[] = "Input to function out of range (EDOM)"; 15 | char __syserr002[] = "Output of function out of range (ERANGE)"; 16 | char __syserr003[] = "Argument list too long (E2BIG)"; 17 | char __syserr004[] = "Permission denied (EACCES)"; 18 | char __syserr005[] = "Resource temporarily unavailable (EAGAIN)"; 19 | char __syserr006[] = "Bad file descriptor (EBADF)"; 20 | char __syserr007[] = "Resource busy (EBUSY)"; 21 | char __syserr008[] = "No child processes (ECHILD)"; 22 | char __syserr009[] = "Resource deadlock avoided (EDEADLK)"; 23 | char __syserr010[] = "File exists (EEXIST)"; 24 | char __syserr011[] = "Bad address (EFAULT)"; 25 | char __syserr012[] = "File too large (EFBIG)"; 26 | char __syserr013[] = "Interrupted system call (EINTR)"; 27 | char __syserr014[] = "Invalid argument (EINVAL)"; 28 | char __syserr015[] = "Input or output error (EIO)"; 29 | char __syserr016[] = "Is a directory (EISDIR)"; 30 | char __syserr017[] = "Too many open files (EMFILE)"; 31 | char __syserr018[] = "Too many links (EMLINK)"; 32 | char __syserr019[] = "File name too long (ENAMETOOLONG)"; 33 | char __syserr020[] = "Too many open files in system (ENFILE)"; 34 | char __syserr021[] = "No such device (ENODEV)"; 35 | char __syserr022[] = "No such file or directory (ENOENT)"; 36 | char __syserr023[] = "Unable to execute file (ENOEXEC)"; 37 | char __syserr024[] = "No locks available (ENOLCK)"; 38 | char __syserr025[] = "Not enough memory (ENOMEM)"; 39 | char __syserr026[] = "No space left on drive (ENOSPC)"; 40 | char __syserr027[] = "Function not implemented (ENOSYS)"; 41 | char __syserr028[] = "Not a directory (ENOTDIR)"; 42 | char __syserr029[] = "Directory not empty (ENOTEMPTY)"; 43 | char __syserr030[] = "Inappropriate I/O control operation (ENOTTY)"; 44 | char __syserr031[] = "No such device or address (ENXIO)"; 45 | char __syserr032[] = "Operation not permitted (EPERM)"; 46 | char __syserr033[] = "Broken pipe (EPIPE)"; 47 | char __syserr034[] = "Read-only file system (EROFS)"; 48 | char __syserr035[] = "Invalid seek (ESPIPE)"; 49 | char __syserr036[] = "No such process (ESRCH)"; 50 | char __syserr037[] = "Improper link (EXDEV)"; 51 | char __syserr038[] = "No more files (ENMFILE)"; 52 | char __syserr039[] = "Too many levels of symbolic links (ELOOP)"; 53 | char __syserr040[] = "Value too large (EOVERFLOW)"; 54 | char __syserr041[] = "Invalid or incomplete multibyte or wide character (EILSEQ)"; 55 | char __syserr042[] = "Operation would block (EWOULDBLOCK)"; 56 | char __syserr043[] = "Operation now in progress (EINPROGRESS)"; 57 | char __syserr044[] = "Operation already in progress (EALREADY)"; 58 | char __syserr045[] = "Socket operation on non-socket (ENOTSOCK)"; 59 | char __syserr046[] = "Destination address required (EDESTADDRREQ)"; 60 | char __syserr047[] = "Message too long (EMSGSIZE)"; 61 | char __syserr048[] = "Protocol wrong type for socket (EPROTOTYPE)"; 62 | char __syserr049[] = "Protocol option not available (ENOPROTOOPT)"; 63 | char __syserr050[] = "Protocol not supported (EPROTONOSUPPORT)"; 64 | char __syserr051[] = "Socket type not supported (ESOCKTNOSUPPORT)"; 65 | char __syserr052[] = "Operation not supported on socket (EOPNOTSUPP)"; 66 | char __syserr053[] = "Protocol family not supported (EPFNOSUPPORT)"; 67 | char __syserr054[] = "Address family not supported by protocol (EAFNOSUPPORT)"; 68 | char __syserr055[] = "Address already in use (EADDRINUSE)"; 69 | char __syserr056[] = "Can't assign requested address (EADDRNOTAVAIL)"; 70 | char __syserr057[] = "Network is down (ENETDOWN)"; 71 | char __syserr058[] = "Network is unreachable (ENETUNREACH)"; 72 | char __syserr059[] = "Network dropped connection on reset (ENETRESET)"; 73 | char __syserr060[] = "Software caused connection abort (ECONNABORTED)"; 74 | char __syserr061[] = "Connection reset by peer (ECONNRESET)"; 75 | char __syserr062[] = "No buffer space available (ENOBUFS)"; 76 | char __syserr063[] = "Socket is already connected (EISCONN)"; 77 | char __syserr064[] = "Socket is not connected (ENOTCONN)"; 78 | char __syserr065[] = "Can't send after socket shutdown (ESHUTDOWN)"; 79 | char __syserr066[] = "Connection timed out (ETIMEDOUT)"; 80 | char __syserr067[] = "Connection refused (ECONNREFUSED)"; 81 | char __syserr068[] = "Host is down (EHOSTDOWN)"; 82 | char __syserr069[] = "No route to host (EHOSTUNREACH)"; 83 | char __syserr070[] = "Stale NFS file handle (ESTALE)"; 84 | char __syserr071[] = "Too many levels of remote in path (EREMOTE)"; 85 | char __syserr072[] = "RPC struct is bad (EBADRPC)"; 86 | char __syserr073[] = "RPC version wrong (ERPCMISMATCH)"; 87 | char __syserr074[] = "RPC prog. not avail (EPROGUNAVAIL)"; 88 | char __syserr075[] = "RPC Program version wrong (EPROGMISMATCH)"; 89 | char __syserr076[] = "Bad procedure for program (EPROCUNAVAIL)"; 90 | char __syserr077[] = "Invalid function number (EINVFNC)"; 91 | char __syserr078[] = "Path not found (ENOPATH)"; 92 | char __syserr079[] = "Memory area destroyed (ECONTR)"; 93 | char __syserr080[] = "Invalid memory block address (EINVMEM)"; 94 | char __syserr081[] = "Invalid environment (EINVENV)"; 95 | char __syserr082[] = "Invalid format (EINVFMT)"; 96 | char __syserr083[] = "Invalid access code (EINVACC)"; 97 | char __syserr084[] = "Invalid data (EINVDAT)"; 98 | char __syserr085[] = "Locking violation (EDEADLOCK)"; 99 | char __syserr086[] = "Attempt to remove current directory (ECURDIR)"; 100 | char __syserr087[] = "Not same device (ENOTSAM)"; 101 | char __syserr088[] = "Text file busy (ETXTBSY)"; 102 | char __syserr089[] = "Block device required (ENOTBLK)"; 103 | char __syserr090[] = "Structure needs cleaning (EUCLEAN)"; 104 | char __syserr091[] = "Too many references (ETOOMANYREFS)"; 105 | char __syserr092[] = "Too many processes (EPROCLIM)"; 106 | char __syserr093[] = "Too many users (EUSERS)"; 107 | char __syserr094[] = "Disc quota exceeded (EDQUOT)"; 108 | char __syserr095[] = "RVD related disk error (EVDBAD)"; 109 | char __syserr096[] = "Out of remote working directory stuctures (ENORMTWD)"; 110 | char __syserr097[] = "Operation canceled (ECANCELED)"; 111 | 112 | char *SYS_ERRLIST[] = { 113 | __syserr000, __syserr001, __syserr002, __syserr003, __syserr004, 114 | __syserr005, __syserr006, __syserr007, __syserr008, __syserr009, 115 | __syserr010, __syserr011, __syserr012, __syserr013, __syserr014, 116 | __syserr015, __syserr016, __syserr017, __syserr018, __syserr019, 117 | __syserr020, __syserr021, __syserr022, __syserr023, __syserr024, 118 | __syserr025, __syserr026, __syserr027, __syserr028, __syserr029, 119 | __syserr030, __syserr031, __syserr032, __syserr033, __syserr034, 120 | __syserr035, __syserr036, __syserr037, __syserr038, __syserr039, 121 | __syserr040, __syserr041, __syserr042, __syserr043, __syserr044, 122 | __syserr045, __syserr046, __syserr047, __syserr048, __syserr049, 123 | __syserr050, __syserr051, __syserr052, __syserr053, __syserr054, 124 | __syserr055, __syserr056, __syserr057, __syserr058, __syserr059, 125 | __syserr060, __syserr061, __syserr062, __syserr063, __syserr064, 126 | __syserr065, __syserr066, __syserr067, __syserr068, __syserr069, 127 | __syserr070, __syserr071, __syserr072, __syserr073, __syserr074, 128 | __syserr075, __syserr076, __syserr077, __syserr078, __syserr079, 129 | __syserr080, __syserr081, __syserr082, __syserr083, __syserr084, 130 | __syserr085, __syserr086, __syserr087, __syserr088, __syserr089, 131 | __syserr090, __syserr091, __syserr092, __syserr093, __syserr094, 132 | __syserr095, __syserr096, __syserr097, 133 | }; 134 | 135 | -------------------------------------------------------------------------------- /patch/watt32-djgpp-cvs/djgpp.err: -------------------------------------------------------------------------------- 1 | #ifndef __SYS_WERRNO_ERR 2 | #define __SYS_WERRNO_ERR 3 | 4 | /* 5 | * THIS FILE WAS GENERATED BY %WATT_ROOT%\c:/dj_err.exe 6 | * at Fri Jun 30 23:24:47 2023. 7 | * DO NOT EDIT. 8 | * 9 | * Watt-32 errnos are after vendor's errnos (1 - 41) 10 | */ 11 | 12 | #ifndef __DJGPP__ 13 | #error This file is only for use by "__DJGPP__" 14 | #endif 15 | 16 | #define ERRNO_VENDOR_VERSION "2.05" 17 | 18 | #define EDOM 1 19 | #define ERANGE 2 20 | #define E2BIG 3 21 | #define EACCES 4 22 | #define EAGAIN 5 23 | #define EBADF 6 24 | #define EBUSY 7 25 | #define ECHILD 8 26 | #define EDEADLK 9 27 | #define EEXIST 10 28 | #define EFAULT 11 29 | #define EFBIG 12 30 | #define EINTR 13 31 | #define EINVAL 14 32 | #define EIO 15 33 | #define EISDIR 16 34 | #define EMFILE 17 35 | #define EMLINK 18 36 | #define ENAMETOOLONG 19 37 | #define ENFILE 20 38 | #define ENODEV 21 39 | #define ENOENT 22 40 | #define ENOEXEC 23 41 | #define ENOLCK 24 42 | #define ENOMEM 25 43 | #define ENOSPC 26 44 | #define ENOSYS 27 45 | #define ENOTDIR 28 46 | #define ENOTEMPTY 29 47 | #define ENOTTY 30 48 | #define ENXIO 31 49 | #define EPERM 32 50 | #define EPIPE 33 51 | #define EROFS 34 52 | #define ESPIPE 35 53 | #define ESRCH 36 54 | #define EXDEV 37 55 | #define ENMFILE 38 56 | #define ELOOP 39 57 | #define EOVERFLOW 40 58 | #define EILSEQ 41 59 | #define EWOULDBLOCK 42 60 | #define EINPROGRESS 43 61 | #define EALREADY 44 62 | #define ENOTSOCK 45 63 | #define EDESTADDRREQ 46 64 | #define EMSGSIZE 47 65 | #define EPROTOTYPE 48 66 | #define ENOPROTOOPT 49 67 | #define EPROTONOSUPPORT 50 68 | #define ESOCKTNOSUPPORT 51 69 | #define EOPNOTSUPP 52 70 | #define EPFNOSUPPORT 53 71 | #define EAFNOSUPPORT 54 72 | #define EADDRINUSE 55 73 | #define EADDRNOTAVAIL 56 74 | #define ENETDOWN 57 75 | #define ENETUNREACH 58 76 | #define ENETRESET 59 77 | #define ECONNABORTED 60 78 | #define ECONNRESET 61 79 | #define ENOBUFS 62 80 | #define EISCONN 63 81 | #define ENOTCONN 64 82 | #define ESHUTDOWN 65 83 | #define ETIMEDOUT 66 84 | #define ECONNREFUSED 67 85 | #define EHOSTDOWN 68 86 | #define EHOSTUNREACH 69 87 | #define ESTALE 70 88 | #define EREMOTE 71 89 | #define EBADRPC 72 90 | #define ERPCMISMATCH 73 91 | #define EPROGUNAVAIL 74 92 | #define EPROGMISMATCH 75 93 | #define EPROCUNAVAIL 76 94 | #define EINVFNC 77 95 | #define ENOPATH 78 96 | #define ECONTR 79 97 | #define EINVMEM 80 98 | #define EINVENV 81 99 | #define EINVFMT 82 100 | #define EINVACC 83 101 | #define EINVDAT 84 102 | #define EDEADLOCK 85 103 | #define ECURDIR 86 104 | #define ENOTSAM 87 105 | #define ETXTBSY 88 106 | #define ENOTBLK 89 107 | #define EUCLEAN 90 108 | #define ETOOMANYREFS 91 109 | #define EPROCLIM 92 110 | #define EUSERS 93 111 | #define EDQUOT 94 112 | #define EVDBAD 95 113 | #define ENORMTWD 96 114 | #define ECANCELED 97 115 | 116 | #endif /* __SYS_WERRNO_ERR */ 117 | -------------------------------------------------------------------------------- /patch/watt32-djgpp-cvs/syserr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * THIS FILE WAS GENERATED BY %WATT_ROOT%\c:/dj_err.exe 3 | * at Fri Jun 30 23:24:49 2023. 4 | * DO NOT EDIT. 5 | * 6 | * The Watt-32 'sys_errlist[]' that replaces vendor's 'sys_errlist[]' 7 | */ 8 | 9 | #ifndef __DJGPP__ 10 | #error This file is only for use by "__DJGPP__" 11 | #endif 12 | 13 | char __syserr000[] = "Unknown error"; 14 | char __syserr001[] = "Input to function out of range (EDOM)"; 15 | char __syserr002[] = "Output of function out of range (ERANGE)"; 16 | char __syserr003[] = "Argument list too long (E2BIG)"; 17 | char __syserr004[] = "Permission denied (EACCES)"; 18 | char __syserr005[] = "Resource temporarily unavailable (EAGAIN)"; 19 | char __syserr006[] = "Bad file descriptor (EBADF)"; 20 | char __syserr007[] = "Resource busy (EBUSY)"; 21 | char __syserr008[] = "No child processes (ECHILD)"; 22 | char __syserr009[] = "Resource deadlock avoided (EDEADLK)"; 23 | char __syserr010[] = "File exists (EEXIST)"; 24 | char __syserr011[] = "Bad address (EFAULT)"; 25 | char __syserr012[] = "File too large (EFBIG)"; 26 | char __syserr013[] = "Interrupted system call (EINTR)"; 27 | char __syserr014[] = "Invalid argument (EINVAL)"; 28 | char __syserr015[] = "Input or output error (EIO)"; 29 | char __syserr016[] = "Is a directory (EISDIR)"; 30 | char __syserr017[] = "Too many open files (EMFILE)"; 31 | char __syserr018[] = "Too many links (EMLINK)"; 32 | char __syserr019[] = "File name too long (ENAMETOOLONG)"; 33 | char __syserr020[] = "Too many open files in system (ENFILE)"; 34 | char __syserr021[] = "No such device (ENODEV)"; 35 | char __syserr022[] = "No such file or directory (ENOENT)"; 36 | char __syserr023[] = "Unable to execute file (ENOEXEC)"; 37 | char __syserr024[] = "No locks available (ENOLCK)"; 38 | char __syserr025[] = "Not enough memory (ENOMEM)"; 39 | char __syserr026[] = "No space left on drive (ENOSPC)"; 40 | char __syserr027[] = "Function not implemented (ENOSYS)"; 41 | char __syserr028[] = "Not a directory (ENOTDIR)"; 42 | char __syserr029[] = "Directory not empty (ENOTEMPTY)"; 43 | char __syserr030[] = "Inappropriate I/O control operation (ENOTTY)"; 44 | char __syserr031[] = "No such device or address (ENXIO)"; 45 | char __syserr032[] = "Operation not permitted (EPERM)"; 46 | char __syserr033[] = "Broken pipe (EPIPE)"; 47 | char __syserr034[] = "Read-only file system (EROFS)"; 48 | char __syserr035[] = "Invalid seek (ESPIPE)"; 49 | char __syserr036[] = "No such process (ESRCH)"; 50 | char __syserr037[] = "Improper link (EXDEV)"; 51 | char __syserr038[] = "No more files (ENMFILE)"; 52 | char __syserr039[] = "Too many levels of symbolic links (ELOOP)"; 53 | char __syserr040[] = "Value too large (EOVERFLOW)"; 54 | char __syserr041[] = "Invalid or incomplete multibyte or wide character (EILSEQ)"; 55 | char __syserr042[] = "Operation would block (EWOULDBLOCK)"; 56 | char __syserr043[] = "Operation now in progress (EINPROGRESS)"; 57 | char __syserr044[] = "Operation already in progress (EALREADY)"; 58 | char __syserr045[] = "Socket operation on non-socket (ENOTSOCK)"; 59 | char __syserr046[] = "Destination address required (EDESTADDRREQ)"; 60 | char __syserr047[] = "Message too long (EMSGSIZE)"; 61 | char __syserr048[] = "Protocol wrong type for socket (EPROTOTYPE)"; 62 | char __syserr049[] = "Protocol option not available (ENOPROTOOPT)"; 63 | char __syserr050[] = "Protocol not supported (EPROTONOSUPPORT)"; 64 | char __syserr051[] = "Socket type not supported (ESOCKTNOSUPPORT)"; 65 | char __syserr052[] = "Operation not supported on socket (EOPNOTSUPP)"; 66 | char __syserr053[] = "Protocol family not supported (EPFNOSUPPORT)"; 67 | char __syserr054[] = "Address family not supported by protocol (EAFNOSUPPORT)"; 68 | char __syserr055[] = "Address already in use (EADDRINUSE)"; 69 | char __syserr056[] = "Can't assign requested address (EADDRNOTAVAIL)"; 70 | char __syserr057[] = "Network is down (ENETDOWN)"; 71 | char __syserr058[] = "Network is unreachable (ENETUNREACH)"; 72 | char __syserr059[] = "Network dropped connection on reset (ENETRESET)"; 73 | char __syserr060[] = "Software caused connection abort (ECONNABORTED)"; 74 | char __syserr061[] = "Connection reset by peer (ECONNRESET)"; 75 | char __syserr062[] = "No buffer space available (ENOBUFS)"; 76 | char __syserr063[] = "Socket is already connected (EISCONN)"; 77 | char __syserr064[] = "Socket is not connected (ENOTCONN)"; 78 | char __syserr065[] = "Can't send after socket shutdown (ESHUTDOWN)"; 79 | char __syserr066[] = "Connection timed out (ETIMEDOUT)"; 80 | char __syserr067[] = "Connection refused (ECONNREFUSED)"; 81 | char __syserr068[] = "Host is down (EHOSTDOWN)"; 82 | char __syserr069[] = "No route to host (EHOSTUNREACH)"; 83 | char __syserr070[] = "Stale NFS file handle (ESTALE)"; 84 | char __syserr071[] = "Too many levels of remote in path (EREMOTE)"; 85 | char __syserr072[] = "RPC struct is bad (EBADRPC)"; 86 | char __syserr073[] = "RPC version wrong (ERPCMISMATCH)"; 87 | char __syserr074[] = "RPC prog. not avail (EPROGUNAVAIL)"; 88 | char __syserr075[] = "RPC Program version wrong (EPROGMISMATCH)"; 89 | char __syserr076[] = "Bad procedure for program (EPROCUNAVAIL)"; 90 | char __syserr077[] = "Invalid function number (EINVFNC)"; 91 | char __syserr078[] = "Path not found (ENOPATH)"; 92 | char __syserr079[] = "Memory area destroyed (ECONTR)"; 93 | char __syserr080[] = "Invalid memory block address (EINVMEM)"; 94 | char __syserr081[] = "Invalid environment (EINVENV)"; 95 | char __syserr082[] = "Invalid format (EINVFMT)"; 96 | char __syserr083[] = "Invalid access code (EINVACC)"; 97 | char __syserr084[] = "Invalid data (EINVDAT)"; 98 | char __syserr085[] = "Locking violation (EDEADLOCK)"; 99 | char __syserr086[] = "Attempt to remove current directory (ECURDIR)"; 100 | char __syserr087[] = "Not same device (ENOTSAM)"; 101 | char __syserr088[] = "Text file busy (ETXTBSY)"; 102 | char __syserr089[] = "Block device required (ENOTBLK)"; 103 | char __syserr090[] = "Structure needs cleaning (EUCLEAN)"; 104 | char __syserr091[] = "Too many references (ETOOMANYREFS)"; 105 | char __syserr092[] = "Too many processes (EPROCLIM)"; 106 | char __syserr093[] = "Too many users (EUSERS)"; 107 | char __syserr094[] = "Disc quota exceeded (EDQUOT)"; 108 | char __syserr095[] = "RVD related disk error (EVDBAD)"; 109 | char __syserr096[] = "Out of remote working directory stuctures (ENORMTWD)"; 110 | char __syserr097[] = "Operation canceled (ECANCELED)"; 111 | 112 | char *SYS_ERRLIST[] = { 113 | __syserr000, __syserr001, __syserr002, __syserr003, __syserr004, 114 | __syserr005, __syserr006, __syserr007, __syserr008, __syserr009, 115 | __syserr010, __syserr011, __syserr012, __syserr013, __syserr014, 116 | __syserr015, __syserr016, __syserr017, __syserr018, __syserr019, 117 | __syserr020, __syserr021, __syserr022, __syserr023, __syserr024, 118 | __syserr025, __syserr026, __syserr027, __syserr028, __syserr029, 119 | __syserr030, __syserr031, __syserr032, __syserr033, __syserr034, 120 | __syserr035, __syserr036, __syserr037, __syserr038, __syserr039, 121 | __syserr040, __syserr041, __syserr042, __syserr043, __syserr044, 122 | __syserr045, __syserr046, __syserr047, __syserr048, __syserr049, 123 | __syserr050, __syserr051, __syserr052, __syserr053, __syserr054, 124 | __syserr055, __syserr056, __syserr057, __syserr058, __syserr059, 125 | __syserr060, __syserr061, __syserr062, __syserr063, __syserr064, 126 | __syserr065, __syserr066, __syserr067, __syserr068, __syserr069, 127 | __syserr070, __syserr071, __syserr072, __syserr073, __syserr074, 128 | __syserr075, __syserr076, __syserr077, __syserr078, __syserr079, 129 | __syserr080, __syserr081, __syserr082, __syserr083, __syserr084, 130 | __syserr085, __syserr086, __syserr087, __syserr088, __syserr089, 131 | __syserr090, __syserr091, __syserr092, __syserr093, __syserr094, 132 | __syserr095, __syserr096, __syserr097, 133 | }; 134 | 135 | -------------------------------------------------------------------------------- /patch/watt32.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/makefile.all b/src/makefile.all 2 | index d158664..f840962 100644 3 | --- a/src/makefile.all 4 | +++ b/src/makefile.all 5 | @@ -252,7 +252,7 @@ PKT_STUB = pkt_stub.h 6 | prefix = /dev/env/DJDIR/net/watt 7 | 8 | CFLAGS = -O3 -g -I. -I../inc -DWATT32_BUILD -W -Wall -Wno-strict-aliasing \ 9 | - -march=i386 -mtune=i586 10 | + -march=i386 -mtune=i586 $(CFLAGS_FOR_TARGET) 11 | 12 | STAT_LIB = ../lib/libwatt.a 13 | OBJDIR = build/djgpp 14 | -------------------------------------------------------------------------------- /script/build-avr-gcc.sh: -------------------------------------------------------------------------------- 1 | cd ${BASE}/build/ 2 | 3 | if [ ! -z ${AVRLIBC_VERSION} ]; then 4 | if [ ! -e avr-libc-${AVRLIBC_VERSION}/avr-libc-unpacked ]; then 5 | echo "Unpacking avr-libc..." 6 | untar ${AVRLIBC_ARCHIVE} 7 | cd avr-libc-${AVRLIBC_VERSION}/ 8 | untar ${AVRLIBC_DOC_ARCHIVE} 9 | touch avr-libc-unpacked 10 | cd .. 11 | fi 12 | cd avr-libc-${AVRLIBC_VERSION}/ 13 | ${SUDO} mkdir -p ${DST}/${TARGET}/include/ 14 | install_files include/* ${DST}/${TARGET}/include/ | exit 1 15 | echo "Installing avr-libc documentation" 16 | ${SUDO} mkdir -p ${DST}/${TARGET}/share/man/ 17 | install_files man/* ${DST}/${TARGET}/share/man/ | exit 1 18 | cd .. 19 | fi 20 | 21 | if [ ! -z ${GCC_VERSION} ]; then 22 | if [ ! -e gcc-${GCC_VERSION}/gcc-unpacked ]; then 23 | echo "Unpacking gcc..." 24 | untar ${GCC_ARCHIVE} 25 | 26 | cd gcc-${GCC_VERSION} || exit 1 27 | touch gcc-unpacked 28 | cd .. 29 | fi 30 | 31 | echo "Building gcc (stage 1)" 32 | 33 | mkdir -p gcc-${GCC_VERSION}/build-${TARGET} 34 | cd gcc-${GCC_VERSION}/build-${TARGET} || exit 1 35 | 36 | TEMP_CFLAGS="$CFLAGS" 37 | TEMP_CXXFLAGS="$CXXFLAGS" 38 | export CFLAGS="$CFLAGS $GCC_EXTRA_CFLAGS" 39 | export CXXFLAGS="$CXXFLAGS $GCC_EXTRA_CXXFLAGS" 40 | 41 | GCC_CONFIGURE_OPTIONS+=" --target=${TARGET} --prefix=${PREFIX} ${HOST_FLAG} ${BUILD_FLAG} 42 | --enable-languages=${ENABLE_LANGUAGES} 43 | --with-avrlibc ${WITH_LIBS}" 44 | strip_whitespace GCC_CONFIGURE_OPTIONS 45 | 46 | if [ ! -e configure-prefix ] || [ ! "`cat configure-prefix`" == "${GCC_CONFIGURE_OPTIONS}" ]; then 47 | rm -rf * 48 | rm -rf ${BASE}/build/avr-libc-${AVRLIBC_VERSION}/build-${TARGET}/* 49 | eval "../configure ${GCC_CONFIGURE_OPTIONS}" || exit 1 50 | echo ${GCC_CONFIGURE_OPTIONS} > configure-prefix 51 | else 52 | echo "Note: gcc already configured. To force a rebuild, use: rm -rf $(pwd)" 53 | [ -z ${BUILD_BATCH} ] && sleep 5 54 | fi 55 | 56 | ${MAKE_J} all-gcc || exit 1 57 | echo "Installing gcc (stage 1)" 58 | ${SUDO} ${MAKE_J} install-gcc || exit 1 59 | 60 | CFLAGS="$TEMP_CFLAGS" 61 | CXXFLAGS="$TEMP_CXXFLAGS" 62 | fi 63 | 64 | cd ${BASE}/build/ 65 | 66 | if [ ! -z ${AVRLIBC_VERSION} ]; then 67 | echo "Building avr-libc" 68 | mkdir -p avr-libc-${AVRLIBC_VERSION}/build-${TARGET} 69 | cd avr-libc-${AVRLIBC_VERSION}/build-${TARGET} || exit 1 70 | 71 | AVRLIBC_CONFIGURE_OPTIONS+=" --host=${TARGET} --prefix=${PREFIX} ${BUILD_FLAG}" 72 | strip_whitespace AVRLIBC_CONFIGURE_OPTIONS 73 | 74 | if [ ! -z ${GCC_VERSION} ] || [ ! "`cat configure-options 2> /dev/null`" == "${AVRLIBC_CONFIGURE_OPTIONS}" ]; then 75 | rm -rf * 76 | CC=avr-gcc ../configure ${AVRLIBC_CONFIGURE_OPTIONS} || exit 1 77 | echo ${AVRLIBC_CONFIGURE_OPTIONS} > configure-options 78 | else 79 | echo "Note: avr-libc already configured. To force a rebuild, use: rm -rf $(pwd)" 80 | [ -z ${BUILD_BATCH} ] && sleep 5 81 | fi 82 | 83 | ${MAKE_J} || exit 1 84 | [ ! -z $MAKE_CHECK ] && ${MAKE_J} -s check | tee ${BASE}/tests/avr-libc.log 85 | echo "Installing avr-libc" 86 | ${SUDO} ${MAKE_J} install || exit 1 87 | fi 88 | 89 | cd ${BASE}/build/ 90 | 91 | if [ ! -z ${GCC_VERSION} ]; then 92 | echo "Building gcc (stage 2)" 93 | cd gcc-${GCC_VERSION}/build-${TARGET} || exit 1 94 | 95 | TEMP_CFLAGS="$CFLAGS" 96 | TEMP_CXXFLAGS="$CXXFLAGS" 97 | export CFLAGS="$CFLAGS $GCC_EXTRA_CFLAGS" 98 | export CXXFLAGS="$CXXFLAGS $GCC_EXTRA_CXXFLAGS" 99 | 100 | export STAGE_CC_WRAPPER="${BASE}/script/destdir-hack.sh ${DST}/${TARGET}" 101 | ${MAKE_J} || exit 1 102 | [ ! -z $MAKE_CHECK_GCC ] && ${MAKE_J} -s check-gcc | tee ${BASE}/tests/gcc.log 103 | echo "Installing gcc" 104 | ${SUDO} ${MAKE_J} install-strip || \ 105 | ${SUDO} ${MAKE_J} install-strip || exit 1 106 | 107 | CFLAGS="$TEMP_CFLAGS" 108 | CXXFLAGS="$TEMP_CXXFLAGS" 109 | 110 | set_version gcc 111 | fi 112 | -------------------------------------------------------------------------------- /script/build-binutils.sh: -------------------------------------------------------------------------------- 1 | mkdir -p build-${TARGET} 2 | cd build-${TARGET} || exit 1 3 | 4 | echo "Building binutils" 5 | 6 | BINUTILS_CONFIGURE_OPTIONS+=" --target=${TARGET} --prefix=${PREFIX} ${HOST_FLAG} ${BUILD_FLAG}" 7 | strip_whitespace BINUTILS_CONFIGURE_OPTIONS 8 | 9 | if [ ! -e configure-prefix ] || [ ! "`cat configure-prefix`" = "${BINUTILS_CONFIGURE_OPTIONS}" ]; then 10 | rm -rf * 11 | ../configure ${BINUTILS_CONFIGURE_OPTIONS} || exit 1 12 | echo ${BINUTILS_CONFIGURE_OPTIONS} > configure-prefix 13 | else 14 | echo "Note: binutils already configured. To force a rebuild, use: rm -rf $(pwd)" 15 | [ -z ${BUILD_BATCH} ] && sleep 5 16 | fi 17 | 18 | case $TARGET in 19 | *-msdosdjgpp) 20 | ${MAKE_J} configure-bfd || exit 1 21 | ${MAKE_J} -C bfd stmp-lcoff-h || exit 1 22 | ;; 23 | *) ;; 24 | esac 25 | 26 | ${MAKE_J} || exit 1 27 | [ ! -z $MAKE_CHECK ] && ${MAKE_J} -s check | tee ${BASE}/tests/binutils.log 28 | echo "Installing binutils" 29 | ${SUDO} ${MAKE_J} install || exit 1 30 | 31 | set_version binutils 32 | -------------------------------------------------------------------------------- /script/build-gdb.sh: -------------------------------------------------------------------------------- 1 | cd ${BASE}/build 2 | 3 | if [ ! -z ${GDB_VERSION} ]; then 4 | if [ ! -e gdb-${GDB_VERSION}/gdb-unpacked ]; then 5 | echo "Unpacking gdb..." 6 | untar ${GDB_ARCHIVE} || exit 1 7 | 8 | cd gdb-${GDB_VERSION}/ || exit 1 9 | cat ${BASE}/patch/gdb-${GDB_VERSION}/* | patch -p1 -u || exit 1 10 | touch gdb-unpacked 11 | cd .. 12 | fi 13 | mkdir -p gdb-${GDB_VERSION}/build-${TARGET} 14 | cd gdb-${GDB_VERSION}/build-${TARGET} || exit 1 15 | 16 | echo "Building gdb" 17 | 18 | GDB_CONFIGURE_OPTIONS+=" --target=${TARGET} --prefix=${PREFIX} ${HOST_FLAG} ${BUILD_FLAG} ${WITH_LIBS}" 19 | strip_whitespace GDB_CONFIGURE_OPTIONS 20 | 21 | if [ ! -e configure-prefix ] || [ ! "`cat configure-prefix`" = "${GDB_CONFIGURE_OPTIONS}" ]; then 22 | rm -rf * 23 | ../configure ${GDB_CONFIGURE_OPTIONS} || exit 1 24 | echo ${GDB_CONFIGURE_OPTIONS} > configure-prefix 25 | else 26 | echo "Note: gdb already configured. To force a rebuild, use: rm -rf $(pwd)" 27 | [ -z ${BUILD_BATCH} ] && sleep 5 28 | fi 29 | ${MAKE_J} || exit 1 30 | [ ! -z $MAKE_CHECK ] && ${MAKE_J} -s check | tee ${BASE}/tests/gdb.log 31 | echo "Installing gdb" 32 | ${SUDO} ${MAKE_J} install || exit 1 33 | 34 | set_version gdb 35 | fi 36 | -------------------------------------------------------------------------------- /script/build-newlib-gcc.sh: -------------------------------------------------------------------------------- 1 | cd ${BASE}/build/ 2 | 3 | if [ ! -z ${NEWLIB_VERSION} ] && [ ! -e newlib-${NEWLIB_VERSION}/newlib-unpacked ]; then 4 | echo "Unpacking newlib..." 5 | untar ${NEWLIB_ARCHIVE} 6 | ${SUDO} mkdir -p ${DST}/${TARGET}/include/ 7 | install_files newlib-${NEWLIB_VERSION}/newlib/libc/include/* ${DST}/${TARGET}/include/ | exit 1 8 | touch newlib-${NEWLIB_VERSION}/newlib-unpacked 9 | fi 10 | 11 | if [ ! -z ${GCC_VERSION} ]; then 12 | if [ ! -e gcc-${GCC_VERSION}/gcc-unpacked ]; then 13 | echo "Unpacking gcc..." 14 | untar ${GCC_ARCHIVE} 15 | 16 | cd gcc-${GCC_VERSION} || exit 1 17 | touch gcc-unpacked 18 | cd .. 19 | else 20 | echo "gcc already unpacked, skipping." 21 | fi 22 | 23 | echo "Building gcc (stage 1)" 24 | 25 | mkdir -p gcc-${GCC_VERSION}/build-${TARGET} 26 | cd gcc-${GCC_VERSION}/build-${TARGET} || exit 1 27 | 28 | TEMP_CFLAGS="$CFLAGS" 29 | TEMP_CXXFLAGS="$CXXFLAGS" 30 | export CFLAGS="$CFLAGS $GCC_EXTRA_CFLAGS" 31 | export CXXFLAGS="$CXXFLAGS $GCC_EXTRA_CXXFLAGS" 32 | 33 | GCC_CONFIGURE_OPTIONS+=" --target=${TARGET} --prefix=${PREFIX} ${HOST_FLAG} ${BUILD_FLAG} 34 | --enable-languages=${ENABLE_LANGUAGES} 35 | --with-newlib ${WITH_LIBS}" 36 | strip_whitespace GCC_CONFIGURE_OPTIONS 37 | 38 | if [ ! -e configure-prefix ] || [ ! "`cat configure-prefix`" == "${GCC_CONFIGURE_OPTIONS}" ]; then 39 | rm -rf * 40 | rm -rf ${BASE}/build/newlib-${NEWLIB_VERSION}/build-${TARGET}/* 41 | eval "../configure ${GCC_CONFIGURE_OPTIONS}" || exit 1 42 | echo ${GCC_CONFIGURE_OPTIONS} > configure-prefix 43 | else 44 | echo "Note: gcc already configured. To force a rebuild, use: rm -rf $(pwd)" 45 | [ -z ${BUILD_BATCH} ] && sleep 5 46 | fi 47 | 48 | ${MAKE_J} all-gcc || exit 1 49 | echo "Installing gcc (stage 1)" 50 | ${SUDO} ${MAKE_J} install-gcc || exit 1 51 | 52 | CFLAGS="$TEMP_CFLAGS" 53 | CXXFLAGS="$TEMP_CXXFLAGS" 54 | fi 55 | 56 | cd ${BASE}/build/ 57 | 58 | if [ ! -z ${NEWLIB_VERSION} ]; then 59 | echo "Building newlib" 60 | mkdir -p newlib-${NEWLIB_VERSION}/build-${TARGET} 61 | cd newlib-${NEWLIB_VERSION}/build-${TARGET} || exit 1 62 | 63 | NEWLIB_CONFIGURE_OPTIONS+=" --target=${TARGET} --prefix=${PREFIX} ${HOST_FLAG} ${BUILD_FLAG}" 64 | strip_whitespace NEWLIB_CONFIGURE_OPTIONS 65 | 66 | if [ ! -z ${GCC_VERSION} ] || [ ! "`cat configure-options 2> /dev/null`" == "${NEWLIB_CONFIGURE_OPTIONS}" ]; then 67 | rm -rf * 68 | ../configure ${NEWLIB_CONFIGURE_OPTIONS} || exit 1 69 | echo ${NEWLIB_CONFIGURE_OPTIONS} > configure-options 70 | else 71 | echo "Note: newlib already configured. To force a rebuild, use: rm -rf $(pwd)" 72 | [ -z ${BUILD_BATCH} ] && sleep 5 73 | fi 74 | 75 | ${MAKE_J} || exit 1 76 | [ ! -z $MAKE_CHECK ] && ${MAKE_J} -s check | tee ${BASE}/tests/newlib.log 77 | echo "Installing newlib" 78 | ${SUDO} ${MAKE_J} install || \ 79 | ${SUDO} ${MAKE_J} install || exit 1 80 | fi 81 | 82 | cd ${BASE}/build/ 83 | 84 | if [ ! -z ${GCC_VERSION} ]; then 85 | echo "Building gcc (stage 2)" 86 | cd gcc-${GCC_VERSION}/build-${TARGET} || exit 1 87 | 88 | TEMP_CFLAGS="$CFLAGS" 89 | TEMP_CXXFLAGS="$CXXFLAGS" 90 | export CFLAGS="$CFLAGS $GCC_EXTRA_CFLAGS" 91 | export CXXFLAGS="$CXXFLAGS $GCC_EXTRA_CXXFLAGS" 92 | export STAGE_CC_WRAPPER="${BASE}/script/destdir-hack.sh ${DST}/${TARGET}" 93 | 94 | ${MAKE_J} || exit 1 95 | [ ! -z $MAKE_CHECK_GCC ] && ${MAKE_J} -s check-gcc | tee ${BASE}/tests/gcc.log 96 | echo "Installing gcc" 97 | ${SUDO} ${MAKE_J} install-strip || \ 98 | ${SUDO} ${MAKE_J} install-strip || exit 1 99 | 100 | CFLAGS="$TEMP_CFLAGS" 101 | CXXFLAGS="$TEMP_CXXFLAGS" 102 | 103 | set_version gcc 104 | fi 105 | -------------------------------------------------------------------------------- /script/build-tools.sh: -------------------------------------------------------------------------------- 1 | cd "${BASE}/build/" || exit 1 2 | 3 | # build GNU sed if needed. 4 | if [ ! -z "${SED_VERSION}" ]; then 5 | if [ ! "$(cat ${TMPINST}/sed-version 2> /dev/null)" == "${SED_VERSION}" ]; then 6 | echo "Building sed" 7 | untar "$SED_ARCHIVE" || exit 1 8 | cd "sed-${SED_VERSION}/" 9 | TEMP_CFLAGS="$CFLAGS" 10 | export CFLAGS="${CFLAGS//-w}" # configure fails if warnings are disabled. 11 | ./configure --prefix="$TMPINST" || exit 1 12 | ${MAKE_J} || exit 1 13 | ${MAKE_J} DESTDIR= install || exit 1 14 | CFLAGS="$TEMP_CFLAGS" 15 | echo ${SED_VERSION} > "${TMPINST}/sed-version" 16 | fi 17 | fi 18 | 19 | WITH_LIBS="" 20 | 21 | build_lib() 22 | { 23 | local name="$1" 24 | shift 25 | local display_name="${name^^}" 26 | local archive_var="${name^^}_ARCHIVE" 27 | local version_var="${name^^}_VERSION" 28 | local archive="${!archive_var}" 29 | local version="${!version_var}" 30 | if [ ! -z "$version" ]; then 31 | if [ "$(cat ${TMPINST}/${name}-version 2> /dev/null)" != "$version" ]; then 32 | echo "Building $display_name $version" 33 | cd ${BASE}/build || exit 1 34 | untar "$archive" || exit 1 35 | cd "${name}-${version}/" || exit 1 36 | ./configure --prefix="$TMPINST" --disable-shared "$@" || exit 1 37 | ${MAKE_J} || exit 1 38 | ${MAKE_J} DESTDIR= install || exit 1 39 | echo $version > "${TMPINST}/${name}-version" 40 | fi 41 | 42 | WITH_LIBS+=" --with-${name}=$TMPINST" 43 | fi 44 | } 45 | 46 | build_lib gmp 47 | build_lib mpfr --with-gmp="$TMPINST" 48 | build_lib mpc --with-gmp="$TMPINST" --with-mpfr="$TMPINST" 49 | build_lib isl --with-gmp=system --with-gmp-prefix="$TMPINST" 50 | -------------------------------------------------------------------------------- /script/check-deps-and-confirm.sh: -------------------------------------------------------------------------------- 1 | if [ -z "$IGNORE_DEPENDENCIES" ]; then 2 | for DEP in $DEPS; do 3 | [ -z "$(get_version "$DEP")" ] && add_pkg "$DEP" 4 | done 5 | fi 6 | 7 | LIBDEPS='' 8 | 9 | if [ ! -z "$GCC_VERSION" ] || [ ! -z "$GDB_VERSION" ]; then 10 | LIBDEPS+=' gmp mpfr' 11 | fi 12 | 13 | if [ ! -z "$GCC_VERSION" ]; then 14 | LIBDEPS+=' mpc isl' 15 | fi 16 | 17 | for DEP in $LIBDEPS; do 18 | VERSION_VAR="${DEP^^}_VERSION" 19 | if [ -z "${!VERSION_VAR}" ]; then 20 | source "lib/$DEP" || exit 1 21 | fi 22 | done 23 | 24 | if [ ! -z ${GCC_VERSION} ] && [ -z ${DJCROSS_GCC_ARCHIVE} ] && [ "${DJCROSS_METHOD}" == 'djcross' ]; then 25 | DJCROSS_GCC_ARCHIVE="${DJGPP_DOWNLOAD_BASE}/djgpp/rpms/djcross-gcc-${GCC_VERSION}/djcross-gcc-${GCC_VERSION}.tar.bz2" 26 | # djcross-gcc-X.XX-tar.* maybe moved from /djgpp/rpms/ to /djgpp/deleted/rpms/ directory. 27 | OLD_DJCROSS_GCC_ARCHIVE=${DJCROSS_GCC_ARCHIVE/rpms\//deleted\/rpms\/} 28 | fi 29 | 30 | case $TARGET in 31 | *-msdosdjgpp) ;; 32 | *) unset DJCROSS_GCC_ARCHIVE OLD_DJCROSS_GCC_ARCHIVE ;; 33 | esac 34 | 35 | # check GNU sed is installed or not. 36 | # It is for OSX, which doesn't ship with GNU sed. 37 | if ! sed --version 2>/dev/null | grep "GNU sed" > /dev/null ;then 38 | echo GNU sed is not installed, need to download. 39 | SED_VERSION=4.9 40 | SED_ARCHIVE="http://ftpmirror.gnu.org/sed/sed-${SED_VERSION}.tar.xz" 41 | else 42 | SED_ARCHIVE="" 43 | fi 44 | 45 | if [ -z ${NO_DOWNLOAD} ]; then 46 | # MinGW32 doesn't have curl, so we use wget. 47 | if ! which curl > /dev/null; then 48 | USE_WGET=1 49 | if ! which wget > /dev/null; then 50 | echo "curl or wget not installed" 51 | exit 1 52 | fi 53 | fi 54 | fi 55 | 56 | [ ! -z ${ONLY_DOWNLOAD} ] && return 57 | 58 | if [ -z ${TARGET} ]; then 59 | echo "Please specify a target with: --target=..." 60 | exit 1 61 | fi 62 | 63 | DST="${DESTDIR}${PREFIX}" 64 | export DESTDIR 65 | 66 | # check python version for gdb 67 | if [ ! -z ${GDB_VERSION} ]; then 68 | let GDB_VERSION_MAJOR=${GDB_VERSION%%.*} 69 | if (( ${GDB_VERSION_MAJOR} >= 9 )); then 70 | PYTHON=python3 71 | else 72 | PYTHON=python2 73 | fi 74 | if ! which ${PYTHON} > /dev/null; then 75 | echo "WARNING: ${PYTHON} not installed" 76 | prepend GDB_CONFIGURE_OPTIONS "--with-python=no" 77 | else 78 | prepend GDB_CONFIGURE_OPTIONS "--with-python=`which ${PYTHON}`" 79 | fi 80 | fi 81 | 82 | # check required programs 83 | REQ_PROG_LIST="${CXX} ${CC} unzip bison flex ${MAKE} makeinfo patch tar xz bunzip2 gunzip" 84 | 85 | [ ! -z "${WATT32_VERSION}" ] && REQ_PROG_LIST+=" nasm" 86 | 87 | for REQ_PROG in $REQ_PROG_LIST; do 88 | if ! which $REQ_PROG > /dev/null; then 89 | echo "$REQ_PROG not installed" 90 | exit 1 91 | fi 92 | done 93 | 94 | # check zlib is installed 95 | if ! ${CC} ${BASE}/script/test-zlib.c -o test-zlib -lz; then 96 | echo "zlib not installed" 97 | exit 1 98 | fi 99 | rm test-zlib 2>/dev/null 100 | rm test-zlib.exe 2>/dev/null 101 | 102 | echo "You are about to build and install:" 103 | [ -z ${DJGPP_VERSION} ] || echo " - DJGPP libraries and utilities ${DJGPP_VERSION}" 104 | [ -z ${NEWLIB_VERSION} ] || echo " - newlib ${NEWLIB_VERSION}" 105 | [ -z ${BINUTILS_VERSION} ] || echo " - binutils ${BINUTILS_VERSION}" 106 | [ -z ${GCC_VERSION} ] || echo " - gcc ${GCC_VERSION}" 107 | [ -z ${GDB_VERSION} ] || echo " - gdb ${GDB_VERSION}" 108 | [ -z ${AVRLIBC_VERSION} ] || echo " - avr-libc ${AVRLIBC_VERSION}" 109 | [ -z ${AVRDUDE_VERSION} ] || echo " - AVRDUDE ${AVRDUDE_VERSION}" 110 | [ -z ${AVARICE_VERSION} ] || echo " - AVaRICE ${AVARICE_VERSION}" 111 | [ -z ${SIMULAVR_VERSION} ] || echo " - SimulAVR ${SIMULAVR_VERSION}" 112 | [ -z ${WATT32_VERSION} ] || echo " - Watt-32 ${WATT32_VERSION}" 113 | 114 | echo "" 115 | echo "With the following options:" 116 | [ ! -z ${IGNORE_DEPENDENCIES} ] && echo " IGNORE_DEPENDENCIES=${IGNORE_DEPENDENCIES}" 117 | [ ! -z ${DESTDIR} ] && echo " DESTDIR=${DESTDIR}" 118 | echo " TARGET=${TARGET}" 119 | echo " HOST=${HOST}" 120 | echo " BUILD=${BUILD}" 121 | echo " PREFIX=${PREFIX}" 122 | echo " CC=${CC}" 123 | echo " CXX=${CXX}" 124 | echo " CFLAGS=${CFLAGS}" 125 | echo " CXXFLAGS=${CXXFLAGS}" 126 | echo " CFLAGS_FOR_TARGET=${CFLAGS_FOR_TARGET}" 127 | echo " CXXFLAGS_FOR_TARGET=${CXXFLAGS_FOR_TARGET}" 128 | echo " LDFLAGS=${LDFLAGS}" 129 | echo " MAKE=${MAKE}" 130 | echo " MAKE_JOBS=${MAKE_JOBS}" 131 | echo " MAKE_CHECK=${MAKE_CHECK}" 132 | echo " MAKE_CHECK_GCC=${MAKE_CHECK_GCC}" 133 | if [ ! -z ${HOST} ]; then 134 | echo " HOST_CC=`echo ${HOST_CC}`" 135 | echo " HOST_CXX=`echo ${HOST_CXX}`" 136 | fi 137 | if [ ! -z ${GCC_VERSION} ]; then 138 | echo " ENABLE_LANGUAGES=${ENABLE_LANGUAGES}" 139 | echo " GCC_CONFIGURE_OPTIONS=`echo ${GCC_CONFIGURE_OPTIONS}`" 140 | fi 141 | if [ ! -z ${BINUTILS_VERSION} ]; then 142 | echo " BINUTILS_CONFIGURE_OPTIONS=`echo ${BINUTILS_CONFIGURE_OPTIONS}`" 143 | fi 144 | if [ ! -z ${GDB_VERSION} ]; then 145 | echo " GDB_CONFIGURE_OPTIONS=`echo ${GDB_CONFIGURE_OPTIONS}`" 146 | fi 147 | if [ ! -z ${NEWLIB_VERSION} ]; then 148 | echo " NEWLIB_CONFIGURE_OPTIONS=`echo ${NEWLIB_CONFIGURE_OPTIONS}`" 149 | fi 150 | if [ ! -z ${AVRLIBC_VERSION} ]; then 151 | echo " AVRLIBC_CONFIGURE_OPTIONS=`echo ${AVRLIBC_CONFIGURE_OPTIONS}`" 152 | fi 153 | echo "" 154 | 155 | mkdir -p ${DST} 2> /dev/null 156 | 157 | if [ ! -d ${DST} ] || [ ! -w ${DST} ]; then 158 | if [ ! -z ${BUILD_BATCH} ]; then 159 | if ! sudo -n : 2> /dev/null; then 160 | echo "ERROR: no write access to ${DST} (requires sudo)" 161 | exit 1 162 | fi 163 | else 164 | echo "WARNING: no write access to ${DST}" 165 | echo "You may need to enter your sudo password several times during the build process." 166 | echo "" 167 | fi 168 | SUDO=sudo 169 | fi 170 | 171 | if [ -z ${BUILD_BATCH} ]; then 172 | echo "If you wish to change anything, press CTRL-C now. Otherwise, press any other key to continue." 173 | read -s -n 1 174 | fi 175 | -------------------------------------------------------------------------------- /script/destdir-hack.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | DIR=$1 3 | shift 4 | GCC=$1 5 | shift 6 | exec ${GCC} -B${DIR}/lib/ -isystem ${DIR}/watt/inc/ -isystem ${DIR}/sys-include/ -isystem ${DIR}/include/ "$@" 7 | -------------------------------------------------------------------------------- /script/download.sh: -------------------------------------------------------------------------------- 1 | # download source files 2 | ARCHIVE_LIST="$BINUTILS_ARCHIVE $DJCRX_ARCHIVE $DJLSR_ARCHIVE $DJDEV_ARCHIVE 3 | $SED_ARCHIVE $DJCROSS_GCC_ARCHIVE $OLD_DJCROSS_GCC_ARCHIVE $GCC_ARCHIVE 4 | $AUTOCONF_ARCHIVE $AUTOMAKE_ARCHIVE $GDB_ARCHIVE $NEWLIB_ARCHIVE 5 | $AVRLIBC_ARCHIVE $AVRLIBC_DOC_ARCHIVE $AVRDUDE_ARCHIVE $AVARICE_ARCHIVE 6 | $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE $ISL_ARCHIVE" 7 | 8 | # these variables are of the form "git://url/repo.git::branch" 9 | # if 'branch' is empty then the default branch is checked out. 10 | GIT_LIST="$DJGPP_GIT $GCC_GIT $BINUTILS_GIT $NEWLIB_GIT $SIMULAVR_GIT $WATT32_GIT" 11 | 12 | mkdir -p download 13 | cd download/ || exit 1 14 | 15 | # Remove files that don't belong in the Debian package. 16 | if [ ! -z "$BUILD_DEB" ]; then 17 | for FILE in $(find * -maxdepth 0 -type f); do 18 | for ARCHIVE in $ARCHIVE_LIST; do 19 | [ "$FILE" == "$(basename $ARCHIVE)" ] && continue 2 20 | done 21 | for REPO in $GIT_LIST; do 22 | REPO=${REPO%::*} 23 | REPO=${REPO%.*} 24 | [ "$FILE" == "$(basename $REPO)-git.tar" ] && continue 2 25 | done 26 | rm -f $FILE 27 | done 28 | fi 29 | 30 | if [ -z ${NO_DOWNLOAD} ]; then 31 | echo "Download source files..." 32 | 33 | for ARCHIVE in $ARCHIVE_LIST; do 34 | FILE=`basename $ARCHIVE` 35 | if ! [ -f $FILE ]; then 36 | echo "Download $ARCHIVE ..." 37 | if [ ! -z $USE_WGET ]; then 38 | DL_CMD="wget -U firefox $ARCHIVE" 39 | else 40 | DL_CMD="curl -f $ARCHIVE -L -o $FILE" 41 | fi 42 | while true; do 43 | if eval $DL_CMD; then 44 | break 45 | else 46 | if [ "$ARCHIVE" == "$DJCROSS_GCC_ARCHIVE" ]; then 47 | echo "$FILE maybe moved to deleted/ directory." 48 | break 49 | else 50 | rm $FILE 51 | echo "Download $FILE failed, retrying in 5 seconds... (press CTRL-C to abort)" 52 | sleep 5 53 | fi 54 | fi 55 | done 56 | fi 57 | done 58 | fi 59 | 60 | download_git() 61 | { 62 | local repo=$(basename $1) 63 | repo=${repo%.*} 64 | if [ ! -d $repo/ ] || [ "`cd $repo/ && git remote get-url origin`" != "$1" ]; then 65 | if [ -f $repo-git.tar ]; then 66 | untar $repo-git.tar 67 | fi 68 | if [ ! -d $repo/ ] || [ "`cd $repo/ && git remote get-url origin`" != "$1" ]; then 69 | if [ -z ${NO_DOWNLOAD} ]; then 70 | echo "Downloading $repo..." 71 | rm -rf $repo/ 72 | git clone $1 --depth 1 $([ "$2" != "" ] && echo "--branch $2") 73 | else 74 | echo "Missing: $repo" 75 | exit 1 76 | fi 77 | fi 78 | fi 79 | cd $repo/ || exit 1 80 | if [ -z ${NO_GIT_RESET} ]; then 81 | git reset --hard HEAD 82 | git checkout $2 83 | if [ -z ${NO_DOWNLOAD} ]; then 84 | git fetch origin 85 | git reset --hard origin/$2 || exit 1 86 | fi 87 | fi 88 | cd ${BASE}/download/ || exit 1 89 | if [ ! -z ${ONLY_DOWNLOAD} ] && [ ! -z ${BUILD_DEB} ]; then 90 | # Pack git sources for Debian package. 91 | find $repo/* ! -wholename '*/.git/*' -delete 2>&1 > /dev/null 92 | tar -c -f $repo-git.tar $repo 93 | return 94 | fi 95 | mkdir -p ${BASE}/build 96 | rm -rf ${BASE}/build/$repo 97 | ln -fs ../download/$repo ${BASE}/build/$repo || exit 1 98 | } 99 | 100 | for REPO in $GIT_LIST; do 101 | download_git ${REPO%::*} ${REPO##*::} 102 | done 103 | 104 | for ARCHIVE in $ARCHIVE_LIST; do 105 | FILE=`basename $ARCHIVE` 106 | if ! [ -f $FILE ]; then 107 | echo "Missing: $FILE" 108 | exit 1 109 | fi 110 | done 111 | 112 | if [ ! -z ${ONLY_DOWNLOAD} ]; then 113 | if [ ! -z ${BUILD_DEB} ]; then 114 | # Remove git sources that don't belong in the Debian package. 115 | rm -rf ${BASE}/download/*/ 116 | fi 117 | exit 0 118 | fi 119 | 120 | cd ${BASE}/ || exit 1 121 | 122 | echo "Creating install directory: ${DST}" 123 | [ -d ${DST} ] || ${SUDO} mkdir -p ${DST} || exit 1 124 | [ -d ${DST}/${TARGET}/etc/ ] || ${SUDO} mkdir -p ${DST}/${TARGET}/etc/ || exit 1 125 | 126 | export PATH="${DST}/bin:${PREFIX}/bin:$PATH" 127 | 128 | if which ${TARGET}-gcc 2>&1 > /dev/null; then 129 | echo "Removing previously-installed specs file" 130 | for i in {"${DST}","${PREFIX}"}/lib/gcc/${TARGET}/$(${TARGET}-gcc -dumpversion)/specs; do 131 | if [ -e "$i" ]; then 132 | ${SUDO} rm -f "$i" || exit 1 133 | fi 134 | done 135 | fi 136 | 137 | rm -rf ${BASE}/tests 138 | mkdir -p ${BASE}/tests 139 | -------------------------------------------------------------------------------- /script/finalize.sh: -------------------------------------------------------------------------------- 1 | echo "Copy long name executables to short name." 2 | pushd ${DST} || exit 1 3 | ${SUDO} mkdir -p ${TARGET}/bin 4 | SHORT_NAME_LIST="dxegen dxe3gen dxe3res exe2coff stubify stubedit djasm gdb 5 | g++ c++ cpp gcc gprof gcc-nm gcov-tool gcc-ranlib gcc-ar gcov-dump gcov 6 | strings ld readelf ld.bfd size addr2line strip objcopy c++filt ar gprof ranlib as nm elfedit objdump" 7 | for SHORT_NAME in $SHORT_NAME_LIST; do 8 | if [ -f bin/${TARGET}-$SHORT_NAME ]; then 9 | install_files -p bin/${TARGET}-$SHORT_NAME ${TARGET}/bin/$SHORT_NAME 2> /dev/null 10 | fi 11 | done 12 | if [ ! -z ${GCC_VERSION} ]; then 13 | install_files bin/${TARGET}-gcc bin/${TARGET}-gcc-${GCC_VERSION} 2> /dev/null 14 | install_files bin/${TARGET}-g++ bin/${TARGET}-g++-${GCC_VERSION} 2> /dev/null 15 | install_files ${TARGET}/bin/gcc ${TARGET}/bin/gcc-${GCC_VERSION} 2> /dev/null 16 | install_files ${TARGET}/bin/g++ ${TARGET}/bin/g++-${GCC_VERSION} 2> /dev/null 17 | fi 18 | popd 19 | 20 | cat << STOP > ${BASE}/build/${TARGET}-setenv 21 | #!/usr/bin/env bash 22 | case "\$1" in 23 | -*) cat << EOF >&2 24 | Usage: [source] \$(basename \$0) [command [arguments ...]] 25 | 26 | Set up environment variables for convenient access to the cross-compiling 27 | toolchain targeting ${TARGET}. 28 | This allows you to invoke the toolchain utilities via their short names (eg. 29 | 'gcc'), access target-specific documentation via 'man' and 'info', and locate 30 | target libraries via 'pkg-config'. 31 | 32 | This script may be invoked in one of three ways: 33 | * With no arguments: starts a new shell. 34 | * With a command : executes the specified command. 35 | * Via 'source' : exports variables into the current shell (Bash only). 36 | EOF 37 | exit 1 38 | ;; 39 | esac 40 | 41 | export PATH="${PREFIX}/${TARGET}/local/bin:${PREFIX}/${TARGET}/bin:${PREFIX}/bin:\$PATH" 42 | export GCC_EXEC_PREFIX="${PREFIX}/lib/gcc/" 43 | export MANPATH="${PREFIX}/${TARGET}/local/share/man:${PREFIX}/${TARGET}/share/man:${PREFIX}/share/man:\$MANPATH" 44 | export INFOPATH="${PREFIX}/${TARGET}/local/share/info:${PREFIX}/${TARGET}/share/info:${PREFIX}/share/info:\$INFOPATH" 45 | export PKG_CONFIG_LIBDIR="${PREFIX}/${TARGET}/local/lib/pkgconfig:${PREFIX}/${TARGET}/local/share/pkgconfig:${PREFIX}/${TARGET}/lib/pkgconfig:${PREFIX}/${TARGET}/share/pkgconfig" 46 | unset PKG_CONFIG_PATH 47 | STOP 48 | 49 | cat << STOP > ${BASE}/build/${TARGET}-setenv.cmd 50 | @echo off 51 | PATH=%~dp0..\\${TARGET}\\bin;%~dp0..\\bin;%PATH% 52 | set GCC_EXEC_PREFIX=%~dp0..\\lib\\gcc\\ 53 | STOP 54 | 55 | case $TARGET in 56 | *-msdosdjgpp) 57 | echo "export DJDIR=\"${PREFIX}/${TARGET}\"" >> ${BASE}/build/${TARGET}-setenv 58 | echo "set DJDIR=%~dp0..\\${TARGET}" >> ${BASE}/build/${TARGET}-setenv.cmd 59 | ;; 60 | esac 61 | 62 | prepend_specs() 63 | { 64 | sed -i "/\*$1:/{n;s#\(.*\)#$2 \1#}" ${BASE}/build/specs 65 | } 66 | 67 | if [ ! -z "$(get_version gcc)" ]; then 68 | ${TARGET}-gcc -dumpspecs > ${BASE}/build/specs 69 | fi 70 | 71 | if [ ! -z "$(get_version watt32)" ]; then 72 | WATT_ROOT="${PREFIX}/${TARGET}/watt" 73 | WATT_INCLUDE="${WATT_ROOT}/inc" 74 | echo "export WATT_ROOT=\"${WATT_ROOT}\"" >> ${BASE}/build/${TARGET}-setenv 75 | case $(uname) in 76 | MSYS*|MINGW*) 77 | WATT_ROOT="$(cygpath -m "$WATT_ROOT")" 78 | WATT_INCLUDE="$(cygpath -m "$WATT_INCLUDE")" 79 | ;; 80 | esac 81 | echo "set WATT_ROOT=${WATT_ROOT}" >> ${BASE}/build/${TARGET}-setenv.cmd 82 | 83 | for i in cpp cc1plus; do 84 | prepend_specs $i "-isystem ${WATT_INCLUDE}" 85 | done 86 | fi 87 | 88 | if [ ! -z "$(get_version gcc)" ]; then 89 | for i in cpp cc1plus; do 90 | prepend_specs $i "-I${PREFIX}/${TARGET}/local/include" 91 | done 92 | prepend_specs link "-L${PREFIX}/${TARGET}/local/lib" 93 | 94 | echo "Installing specs file" 95 | install_files ${BASE}/build/specs ${DST}/lib/gcc/${TARGET}/$(${TARGET}-gcc -dumpversion)/ || exit 1 96 | fi 97 | 98 | cat << STOP >> ${BASE}/build/${TARGET}-setenv 99 | if [ -z "\$BASH_VERSION" ] || [ "\${BASH_SOURCE[0]}" = "\$0" ]; then 100 | if [ ! -z "\$1" ]; then 101 | exec "\$@" 102 | else 103 | echo 'Entering new shell for target environment: ${TARGET}' >&2 104 | exec \$SHELL 105 | fi 106 | fi 107 | echo 'Environment variables set up for target: ${TARGET}' >&2 108 | STOP 109 | 110 | case $TARGET in 111 | i586-pc-msdosdjgpp) ;; 112 | *-pc-msdosdjgpp) cat << STOP > ${BASE}/build/${TARGET}-link-i586 113 | #!/usr/bin/env bash 114 | echo "Linking i586-pc-msdosdjgpp-* to ${TARGET}-*" 115 | for PROG in ${PREFIX}/bin/${TARGET}-*; do 116 | ln -fs \`basename \$PROG\` \${PROG/$TARGET/i586-pc-msdosdjgpp} 117 | done 118 | STOP 119 | echo "Installing ${TARGET}-link-i586" 120 | chmod +x ${BASE}/build/${TARGET}-link-i586 121 | install_files ${BASE}/build/${TARGET}-link-i586 ${DST}/bin/ 122 | ;; 123 | esac 124 | 125 | cat << STOP > ${BASE}/build/${TARGET}-pkg-config 126 | #!/usr/bin/env bash 127 | exec ${TARGET}-setenv pkg-config "\$@" 128 | STOP 129 | 130 | echo "Installing ${TARGET}-setenv" 131 | chmod +x ${BASE}/build/${TARGET}-setenv 132 | install_files ${BASE}/build/${TARGET}-setenv ${DST}/bin/ 133 | case `uname` in 134 | MINGW*|MSYS*) install_files ${BASE}/build/setenv-${TARGET}.cmd ${DST}/bin/ 2> /dev/null ;; 135 | esac 136 | 137 | echo "Installing ${TARGET}-pkg-config" 138 | chmod +x ${BASE}/build/${TARGET}-pkg-config 139 | install_files ${BASE}/build/${TARGET}-pkg-config ${DST}/bin/ 140 | 141 | if [ ! -z "$(get_version gcc)" ]; then 142 | for x in $(echo $ENABLE_LANGUAGES | tr "," " ") 143 | do 144 | case $x in 145 | c++) 146 | echo "Testing C++ compiler: " 147 | (${DST}/bin/${TARGET}-c++ ${BASE}/script/hello.c -o hello && echo "PASS") || echo "FAIL" 148 | ;; 149 | c) 150 | echo "Testing C compiler: " 151 | if ${DST}/bin/${TARGET}-gcc ${BASE}/script/hello.c -o hello; then 152 | echo "PASS" 153 | else 154 | echo "FAIL" 155 | exit 1 156 | fi 157 | ;; 158 | esac 159 | done 160 | fi 161 | 162 | echo "Done." 163 | echo "To remove temporary build files, use: rm -rf build/" 164 | echo "To remove downloaded source packages, use: rm -rf download/" 165 | -------------------------------------------------------------------------------- /script/hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | printf("Hello world.\n"); 5 | } 6 | -------------------------------------------------------------------------------- /script/init.sh: -------------------------------------------------------------------------------- 1 | unset CDPATH 2 | unset SUDO 3 | unset MAKEFLAGS 4 | unset INSTALL 5 | 6 | umask 022 7 | 8 | BASE=`pwd` 9 | TMPINST="${BASE}/build/tmpinst" 10 | mkdir -p "$TMPINST" 11 | export PATH="${TMPINST}/bin:$PATH" 12 | 13 | # number of parallel build threads 14 | if nproc > /dev/null 2>&1 ; then 15 | MAKE_JOBS=${MAKE_JOBS-`nproc --all`} 16 | else 17 | MAKE_JOBS=${MAKE_JOBS-`sysctl -n hw.physicalcpu`} 18 | fi 19 | 20 | # use gmake/clang under FreeBSD 21 | if [ `uname` = "FreeBSD" ]; then 22 | MAKE=${MAKE-gmake} 23 | CC=${CC-clang} 24 | CXX=${CXX-clang++} 25 | else 26 | MAKE=${MAKE-make} 27 | CC=${CC-gcc} 28 | CXX=${CXX-g++} 29 | fi 30 | 31 | MAKE_J="${MAKE} -j${MAKE_JOBS}" 32 | 33 | case `uname -s` in 34 | Darwin*) ;; 35 | *) MAKE_J+=" -Otarget" ;; 36 | esac 37 | 38 | export CC CXX MAKE 39 | 40 | [ ! -z ${BUILD} ] && BUILD_FLAG="--build=${BUILD}" 41 | if [ ! -z ${HOST} ]; then 42 | HOST_FLAG="--host=${HOST}" 43 | IGNORE_DEPENDENCIES=yes 44 | HOST_CC=${HOST_CC-$HOST-$CC} 45 | HOST_CXX=${HOST_CXX-$HOST-$CXX} 46 | else 47 | HOST_FLAG="" 48 | HOST_CC=${CC} 49 | HOST_CXX=${CXX} 50 | fi 51 | 52 | export CFLAGS_FOR_TARGET=${CFLAGS_FOR_TARGET-"-O2 -g -ffunction-sections -fdata-sections"} 53 | export CXXFLAGS_FOR_TARGET=${CXXFLAGS_FOR_TARGET-"-O2 -g -ffunction-sections -fdata-sections"} 54 | export CFLAGS CXXFLAGS LDFLAGS 55 | 56 | # check if cp understands --preserve (for MacOS) 57 | if cp --preserve=mode,timestamps script/hello.c ./hello.c > /dev/null 2>&1; then 58 | CP='cp --preserve=mode,timestamps' 59 | else 60 | CP='cp' 61 | fi 62 | rm -f hello.c 2> /dev/null 63 | 64 | case $(uname) in 65 | MINGW*) 66 | # Make sure MSYS2 Perl is used on mingw-w64 (see issue #27) 67 | export PERL=/usr/bin/perl 68 | # Required to build gcc on recent mingw-w64 (see issue #41) 69 | GCC_EXTRA_CFLAGS+=' -DWIN32_LEAN_AND_MEAN' 70 | GCC_EXTRA_CXXFLAGS+=' -DWIN32_LEAN_AND_MEAN' 71 | ;; 72 | esac 73 | 74 | install_files() 75 | { 76 | ${SUDO} ${CP} -R -f "$@" 77 | } 78 | 79 | untar() 80 | { 81 | [ -z $1 ] && return 82 | local file=$(basename $1) 83 | local ext=${file##*.} 84 | local param="-a" 85 | case $ext in 86 | xz) param="-J" ;; 87 | bz2) param="-j" ;; 88 | gz) param="-z" ;; 89 | tar) param="" ;; 90 | esac 91 | tar -x ${param} -f ${BASE}/download/${file} || exit 1 92 | } 93 | 94 | strip_whitespace() { eval "$1=\"`echo ${!1}`\""; } 95 | 96 | prepend() { eval "$1=\"$2 ${!1}\""; } 97 | 98 | uppercase() { echo "$@" | tr '[:lower:]' '[:upper:]'; } 99 | lowercase() { echo "$@" | tr '[:upper:]' '[:lower:]'; } 100 | 101 | get_version() 102 | { 103 | local var=$(uppercase $1 | tr -d '_-')_VERSION 104 | if [ ! -z "${!var}" ]; then 105 | # Currently being installed 106 | echo ${!var} 107 | return 108 | fi 109 | local name=$(lowercase $1) 110 | local version=$(cat ${PREFIX}/${TARGET}/etc/build-gcc/${name}-version 2> /dev/null) 111 | if [ ! -z "${version}" ]; then 112 | # Already installed 113 | echo ${version} 114 | return 115 | fi 116 | local old_version_file=$(ls ${PREFIX}/${TARGET}/etc/${name}-*-installed 2> /dev/null) 117 | # Already installed, using old-style version file 118 | echo $old_version_file | sed -n "s/^.*\/$name-\(.*\)-installed$/\1/p" 119 | } 120 | 121 | set_version() 122 | { 123 | local name=$(lowercase $1) 124 | local var=$(uppercase $1 | tr -d '_-')_VERSION 125 | ${SUDO} rm -f ${PREFIX}/${TARGET}/etc/${name}-*-installed 126 | ${SUDO} mkdir -p ${DST}/${TARGET}/etc/build-gcc 127 | ${SUDO} sh -c "echo ${!var} > ${DST}/${TARGET}/etc/build-gcc/${name}-version" 128 | } 129 | 130 | unset ANY_PACKAGES_SPECIFIED 131 | 132 | add_pkg() 133 | { 134 | for DIR in ${PACKAGE_SOURCES}; do 135 | if [ -e $DIR/$1 ]; then 136 | source $DIR/$1 137 | ANY_PACKAGES_SPECIFIED=y 138 | return 139 | fi 140 | done 141 | echo "Unrecognized option or invalid package: $1" 142 | exit 1 143 | } 144 | 145 | prepend GCC_CONFIGURE_OPTIONS "$GLOBAL_CONFIGURE_OPTIONS" 146 | prepend GDB_CONFIGURE_OPTIONS "$GLOBAL_CONFIGURE_OPTIONS" 147 | prepend BINUTILS_CONFIGURE_OPTIONS "$GLOBAL_CONFIGURE_OPTIONS" 148 | prepend NEWLIB_CONFIGURE_OPTIONS "$GLOBAL_CONFIGURE_OPTIONS" 149 | prepend AVRLIBC_CONFIGURE_OPTIONS "$GLOBAL_CONFIGURE_OPTIONS" 150 | 151 | for A in "$@"; do 152 | case $A in 153 | --no-git-reset) NO_GIT_RESET=y ;; 154 | --no-download) NO_DOWNLOAD=y ;; 155 | --only-download) ONLY_DOWNLOAD=y ;; 156 | --ignore-dependencies) IGNORE_DEPENDENCIES=y ;; 157 | --batch) BUILD_BATCH=y ;; 158 | --build-deb) BUILD_DEB=y ;; 159 | --destdir=*) DESTDIR=${A#*=} ;; 160 | --prefix=*) PREFIX=${A#*=} ;; 161 | --target=*) TARGET=${A#*=} ;; 162 | --enable-languages=*) ENABLE_LANGUAGES=${A#*=} ;; 163 | *) add_pkg $A ;; 164 | esac 165 | done 166 | 167 | if [ -z "${ANY_PACKAGES_SPECIFIED}" ]; then 168 | echo "Usage: $0 [options...] [packages...]" 169 | echo "Commonly used options:" 170 | echo " --prefix=[...]" 171 | echo " --target=[...]" 172 | echo " --enable-languages=[...]" 173 | echo "Available packages:" 174 | find ${PACKAGE_SOURCES} -type f | xargs -n 1 basename | sort -u | column 175 | exit 1 176 | fi 177 | 178 | # install directory 179 | PREFIX=${PREFIX-/usr/local/cross} 180 | 181 | # enabled languages 182 | #ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,lto,f95,objc,obj-c++} 183 | ENABLE_LANGUAGES=${ENABLE_LANGUAGES-c,c++,lto} 184 | -------------------------------------------------------------------------------- /script/select-script.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | case $TARGET in 5 | *-msdosdjgpp) SCRIPT=./build-djgpp.sh ;; 6 | ia16*) SCRIPT=./build-ia16.sh ;; 7 | avr) SCRIPT=./build-avr.sh ;; 8 | *) SCRIPT=./build-newlib.sh ;; 9 | esac 10 | 11 | ${SCRIPT} --batch --target=${TARGET} ${PACKAGES} "$@" 12 | -------------------------------------------------------------------------------- /script/test-zlib.c: -------------------------------------------------------------------------------- 1 | /* A test program to check if zlib is installed. */ 2 | #include 3 | int main() 4 | { 5 | int ret; 6 | z_stream strm; 7 | /* allocate inflate state */ 8 | strm.zalloc = Z_NULL; 9 | strm.zfree = Z_NULL; 10 | strm.opaque = Z_NULL; 11 | strm.avail_in = 0; 12 | strm.next_in = Z_NULL; 13 | ret = inflateInit(&strm); 14 | if (ret != Z_OK) 15 | return ret; 16 | return 0; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /script/unpack-build-binutils.sh: -------------------------------------------------------------------------------- 1 | cd ${BASE}/build/ || exit 1 2 | 3 | if [ ! -z ${BINUTILS_VERSION} ]; then 4 | if [ ! -e binutils-${BINUTILS_VERSION}/binutils-unpacked ]; then 5 | echo "Unpacking binutils..." 6 | untar ${BINUTILS_ARCHIVE} || exit 1 7 | 8 | cd binutils-${BINUTILS_VERSION}/ || exit 1 9 | case ${BINUTILS_VERSION} in 10 | 2.33.1) patch libctf/swap.h ${BASE}/patch/patch-binutils-2.33.1-swap.txt || exit 1 ;; 11 | 2.34) patch libctf/swap.h ${BASE}/patch/patch-binutils-2.34-swap.txt || exit 1 ;; 12 | esac 13 | cat ${BASE}/patch/binutils-${BINUTILS_VERSION}/* | patch -p1 -u || exit 1 14 | 15 | touch binutils-unpacked 16 | else 17 | cd binutils-${BINUTILS_VERSION}/ || exit 1 18 | fi 19 | 20 | source ${BASE}/script/build-binutils.sh 21 | fi 22 | --------------------------------------------------------------------------------