0. Prerequisites DJGPP is installed in %DJDIR% Base install: djdev204 md5: 091cc776c41369403543d41edf844364 bnu216b gcc400b gpp400b mak380b Source packages: bnu216s.zip djlsr204.zip md5: 4866705c1252f24e60a6d32cd06bc2a8 gcc400s.zip Extra packages: grep24b.zip txt20b.zip bsh204b.zip fil41b.zip dif28b.zip shl2011b.zip sed409b.zip find41b.zip gwk311b.zip bsn135b.zip txi46b.zip 1. Download and unpack bnu216s.zip to %TMP%/ Unpack bnu216s3.zip in %TMP%/ Go to %TMP%/gnu/binutl-2.16/build.djg/ sh djconfig.sh sh djmake.sh The build may fail if you don't have pod2man, but it is OK. Collect the following files: %TMP%/gnu/binutl-2.16/build.djg/binutils/addr2line.exe -> %DJDIR%/bin/addr2line.exe %TMP%/gnu/binutl-2.16/build.djg/binutils/ar.exe -> %DJDIR%/bin/ar.exe %TMP%/gnu/binutl-2.16/build.djg/gas/as-new.exe -> %DJDIR%/bin/as.exe %TMP%/gnu/binutl-2.16/build.djg/binutils/cxxfilt.exe -> %DJDIR%/bin/cxxfilt.exe %TMP%/gnu/binutl-2.16/build.djg/gprof/gprof.exe -> %DJDIR%/bin/gprof.exe %TMP%/gnu/binutl-2.16/build.djg/ld/ld-new.exe -> %DJDIR%/bin/ld.exe %TMP%/gnu/binutl-2.16/build.djg/binutils/nm-new.exe -> %DJDIR%/bin/nm.exe %TMP%/gnu/binutl-2.16/build.djg/binutils/objcopy.exe -> %DJDIR%/bin/objcopy.exe %TMP%/gnu/binutl-2.16/build.djg/binutils/objdump.exe -> %DJDIR%/bin/objdump.exe %TMP%/gnu/binutl-2.16/build.djg/binutils/ranlib.exe -> %DJDIR%/bin/ranlib.exe %TMP%/gnu/binutl-2.16/build.djg/binutils/readelf.exe -> %DJDIR%/bin/readelf.exe %TMP%/gnu/binutl-2.16/build.djg/binutils/size.exe -> %DJDIR%/bin/size.exe %TMP%/gnu/binutl-2.16/build.djg/binutils/strings.exe -> %DJDIR%/bin/strings.exe %TMP%/gnu/binutl-2.16/build.djg/binutils/strip-new.exe -> %DJDIR%/bin/strip.exe %TMP%/gnu/binutl-2.16/build.djg/ld/ldscripts/*.* -> %DJDIR%/lib/ldscripts/ 2. Download and unpack gcc400s.zip to %TMP%/ Unpack gcc400s3.zip in %TMP%/ Go to %TMP%/gnu/build.gcc/ sh djconfig.sh sh djmake.sh The build will fail, but it is OK. Collect the following files: %TMP%/gnu/build.gcc/gcc/cc1.exe -> %DJDIR%/elf/cc1.exe %TMP%/gnu/build.gcc/gcc/cc1plus.exe -> %DJDIR%/elf/cc1plus.exe %TMP%/gnu/build.gcc/gcc/crti.o -> %DJDIR%/elf/crti.o %TMP%/gnu/build.gcc/gcc/crtn.o -> %DJDIR%/elf/crtn.o %TMP%/gnu/build.gcc/gcc/crtbegin.o -> %DJDIR%/elf/crtbegin.o %TMP%/gnu/build.gcc/gcc/crtbeginS.o -> %DJDIR%/elf/crtbeginS.o %TMP%/gnu/build.gcc/gcc/crtbeginT.o -> %DJDIR%/elf/crtbeginT.o %TMP%/gnu/build.gcc/gcc/crtend.o -> %DJDIR%/elf/crtend.o %TMP%/gnu/build.gcc/gcc/crtendS.o -> %DJDIR%/elf/crtendS.o %TMP%/gnu/build.gcc/gcc/libgcc.a -> %DJDIR%/elf/libgcc.a %TMP%/gnu/build.gcc/gcc/libgcc_eh.a -> %DJDIR%/elf/libgcc_eh.a %TMP%/gnu/build.gcc/gcc/libgcc_s.so -> %DJDIR%/elf/libgcc_s.so %TMP%/gnu/build.gcc/gcc/specs -> %DJDIR%/elf/specs 3. Unpack djlsr204.zip to %TMP%/lsr/ Copy %DJDIR/include/* to %TMP%/lsr/include/ Unpack djelf204.zip in %TMP%/lsr/ Go to %TMP%/lsr/src/ make Collect the following files: %TMP%/lsr/hostbin/stubedit.exe -> %DJDIR%/bin/stubedit.exe %TMP%/lsr/hostbin/stubify.exe -> %DJDIR%/bin/stubify.exe %TMP%/lsr/lib/crt0elf.o -> %DJDIR%/elf/crt0elf.o %TMP%/lsr/lib/gcrt0elf.o -> %DJDIR%/elf/gcrt0elf.o %TMP%/lsr/lib/libc.a -> %DJDIR%/elf/libc.a %TMP%/lsr/lib/libc.so -> %DJDIR%/elf/libc.so %TMP%/lsr/lib/libg.a -> %DJDIR%/elf/libg.a %TMP%/lsr/lib/libm.a -> %DJDIR%/elf/libm.a %TMP%/lsr/lib/libm.so -> %DJDIR%/elf/libm.so %TMP%/lsr/lib/libpc.a -> %DJDIR%/elf/libpc.a %TMP%/lsr/include/elf.h -> %DJDIR%/include/elf.h %TMP%/lsr/include/stubinfo.h -> %DJDIR%/include/stubinfo.h %TMP%/lsr/include/libc/asmdefs.h -> %DJDIR%/include/libc/asmdefs.h %TMP%/lsr/include/libc/stdiohk.h -> %DJDIR%/include/libc/stdiohk.h %TMP%/lsr/include/machine/asm.h -> %DJDIR%/include/machine/asm.h %TMP%/lsr/include/crt0/internal.h -> %DJDIR%/include/crt0/internal.h %TMP%/lsr/include/crt0/list.h -> %DJDIR%/include/crt0/list.h 4. Copy the following files to %TMP%/gnu/build.gcc/gcc/ %DJDIR%/elf/crt0elf.o %DJDIR%/elf/libc.so %DJDIR%/elf/libm.so Copy the following files to %TMP%/gnu/build.gcc/djgpp/libstdc++-v3/ %DJDIR%/elf/libgcc_s.so %DJDIR%/elf/libc.so %DJDIR%/elf/libm.so Go to %TMP%/gnu/build.gcc/ Resume build sh djmake.sh The build will fail, but it is OK. Copy the following files to %TMP%/gnu/build.gcc/djgpp/libiberty/ %DJDIR%/elf/libgcc_s.so %DJDIR%/elf/libc.so %DJDIR%/elf/libm.so Go to %TMP%/gnu/build.gcc/ Resume build sh djmake.sh Collect the following files to %DJDIR%/elf/ %TMP%/gnu/build.gcc/djgpp/libstdc++-v3/src/.libs/libstdcxx.a -> %DJDIR%/elf/libstdcxx.a %TMP%/gnu/build.gcc/djgpp/libstdc++-v3/src/.libs/libstdcxx.so -> %DJDIR%/elf/libstdcxx.so %TMP%/gnu/build.gcc/djgpp/libstdc++-v3/libsupc++/.libs/libsupc++.a -> %DJDIR%/elf/libsupc++.a