• Re: How to cross compile djgpp software from Unix to DOS?

    From Eli Zaretskii (eliz@gnu.org) [via djgpp@delorie.com]@djgpp@delorie.com to djgpp on Sun Nov 2 20:24:38 2025
    From Newsgroup: comp.os.msdos.djgpp

    Date: Sun, 02 Nov 2025 16:43:45 +0000
    From: "John Doe (altaptitude@proton.me) [via djgpp@delorie.com]" <djgpp@delorie.com>

    I have a djgpp cross-compiler (i586-pc-msdosdjgpp-gcc) setup on GNU/Linux after following the instructions on the website and have confirmed it functions correctly. However i'm not sure how i can use it to compile djgpp software, such as emacs, for DOS. The v2gnu/ emacs READMEs as well as msdos/INSTALL in the emacs source tree only explain how to do it on a DOS system with djgpp.

    Emacs doesn't support cross-compilation, because part of the Emacs
    build process needs to run the Emacs binary just built.

    This has nothing to do with DOS or DJGPP, it's just a missing feature
    in Emacs: no one has yet figured out how to remove this limitation.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From John Doe (altaptitude@proton.me) [via djgpp@delorie.com]@djgpp@delorie.com to djgpp on Mon Nov 3 18:53:36 2025
    From Newsgroup: comp.os.msdos.djgpp

    Date: Sun, 02 Nov 2025 16:43:45 +0000
    From: "John Doe (altaptitude@proton.me) [via djgpp@delorie.com]" djgpp@delorie.com

    I have a djgpp cross-compiler (i586-pc-msdosdjgpp-gcc) setup on GNU/Linux after following the instructions on the website and have confirmed it functions correctly. However i'm not sure how i can use it to compile djgpp software, such as emacs, for DOS. The v2gnu/ emacs READMEs as well as msdos/INSTALL in the emacs source tree only explain how to do it on a DOS system with djgpp.


    Emacs doesn't support cross-compilation, because part of the Emacs
    build process needs to run the Emacs binary just built.

    This has nothing to do with DOS or DJGPP, it's just a missing feature
    in Emacs: no one has yet figured out how to remove this limitation.

    Ok i guess Emacs was a bad example, however i'm having trouble with other djgpp software too. Djgpp's Bash docs also only have instructions for compiling on DOS, and when i tried running 'make bash.exe CC=i586-pc-msdosdjgpp-gcc' it would fail because it would try to run the .exe file in the directory (./mksyntax.exe) which obviously a GNU/Linux system can't do so that would fail. I couldn't find where exactly it was instructed to run those so i couldn't remove that. I had no success running the configure scripts myself with --host=i586-pc-msdosdjgpp or CC=i586-pc-msdosdjgpp-gcc either.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Eli Zaretskii (eliz@gnu.org) [via djgpp@delorie.com]@djgpp@delorie.com to djgpp on Mon Nov 3 21:13:24 2025
    From Newsgroup: comp.os.msdos.djgpp

    Date: Mon, 03 Nov 2025 18:53:36 +0000
    From: "John Doe (altaptitude@proton.me) [via djgpp@delorie.com]" <djgpp@delorie.com>

    Date: Sun, 02 Nov 2025 16:43:45 +0000
    From: "John Doe (altaptitude@proton.me) [via djgpp@delorie.com]" djgpp@delorie.com

    I have a djgpp cross-compiler (i586-pc-msdosdjgpp-gcc) setup on GNU/Linux after following the instructions on the website and have confirmed it functions correctly. However i'm not sure how i can use it to compile djgpp software, such as emacs, for DOS. The v2gnu/ emacs READMEs as well as msdos/INSTALL in the emacs source tree only explain how to do it on a DOS system with djgpp.


    Emacs doesn't support cross-compilation, because part of the Emacs
    build process needs to run the Emacs binary just built.

    This has nothing to do with DOS or DJGPP, it's just a missing feature
    in Emacs: no one has yet figured out how to remove this limitation.

    Ok i guess Emacs was a bad example, however i'm having trouble with other djgpp software too. Djgpp's Bash docs also only have instructions for compiling on DOS, and when i tried running 'make bash.exe CC=i586-pc-msdosdjgpp-gcc' it would fail because it would try to run the .exe file in the directory (./mksyntax.exe) which obviously a GNU/Linux system can't do so that would fail. I couldn't find where exactly it was instructed to run those so i couldn't remove that. I had no success running the configure scripts myself with --host=i586-pc-msdosdjgpp or CC=i586-pc-msdosdjgpp-gcc either.

    Which version of Bash did you try to build? Maybe they dropped DJGPP
    support at some point? Look into the configure script to see if DJGPP
    is supported.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Louis Santillan (lpsantil@gmail.com) [via djgpp@delorie.com]@djgpp@delorie.com to djgpp on Mon Nov 3 11:30:35 2025
    From Newsgroup: comp.os.msdos.djgpp

    --000000000000a2f42b0642b5c03d
    Content-Type: text/plain; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    On Mon, Nov 3, 2025 at 10:54=E2=80=AFAM John Doe (altaptitude@proton.me) [v=
    ia
    djgpp@delorie.com] <djgpp@delorie.com> wrote:
    [SNIP]

    Ok i guess Emacs was a bad example, however i'm having trouble with other djgpp software too. Djgpp's Bash docs also only have instructions for compiling on DOS, and when i tried running 'make bash.exe CC=3Di586-pc-msdosdjgpp-gcc' it would fail because it would try to run th=
    e
    .exe file in the directory (./mksyntax.exe) which obviously a GNU/Linux system can't do so that would fail. I couldn't find where exactly it was instructed to run those so i couldn't remove that. I had no success runni=
    ng
    the configure scripts myself with --host=3Di586-pc-msdosdjgpp or CC=3Di586-pc-msdosdjgpp-gcc either.


    I don't think `make bash.exe CC=3Di586-pc-msdosdjgpp-gcc` is a valid target=
    .
    `bsh4428s/gnu/bash-4.4.28/djgpp/readme` details the specific environment
    setup (for DOS) you need and the build process. It does not list
    `bash.exe` as a target.

    --000000000000a2f42b0642b5c03d
    Content-Type: text/html; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    <div dir=3D"ltr"><div dir=3D"ltr">On Mon, Nov 3, 2025 at 10:54=E2=80=AFAM J= ohn Doe (<a href=3D"mailto:altaptitude@proton.me">altaptitude@proton.me</a>=
    ) [via <a href=3D"mailto:djgpp@delorie.com">djgpp@delorie.com</a>] &lt;<a h= ref=3D"mailto:djgpp@delorie.com">djgpp@delorie.com</a>&gt; wrote:</div><div= >[SNIP]</div><div class=3D"gmail_quote gmail_quote_container"><blockquote c= lass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px soli=
    d rgb(204,204,204);padding-left:1ex">Ok i guess Emacs was a bad example, ho= wever i&#39;m having trouble with other djgpp software too. Djgpp&#39;s Bas=
    h docs also only have instructions for compiling on DOS, and when i tried r= unning &#39;make bash.exe CC=3Di586-pc-msdosdjgpp-gcc&#39; it would fail be= cause it would try to run the .exe file in the directory (./mksyntax.exe) w= hich obviously a GNU/Linux system can&#39;t do so that would fail. I couldn= &#39;t find where exactly it was instructed to run those so i couldn&#39;t = remove that. I had no success running the configure scripts myself with --h= ost=3Di586-pc-msdosdjgpp or CC=3Di586-pc-msdosdjgpp-gcc either. <br> <br></blockquote><div><br></div><div>I don&#39;t think `make bash.exe CC=3D= i586-pc-msdosdjgpp-gcc` is a valid target.=C2=A0 `bsh4428s/gnu/bash-4.4.28/= djgpp/readme` details the specific environment setup (for DOS) you need and=
    the build process.=C2=A0 It does not list `bash.exe` as a target.=C2=A0</d= iv></div></div>

    --000000000000a2f42b0642b5c03d--
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From John Doe (altaptitude@proton.me) [via djgpp@delorie.com]@djgpp@delorie.com to djgpp on Tue Nov 4 15:36:43 2025
    From Newsgroup: comp.os.msdos.djgpp

    Which version of Bash did you try to build? Maybe they dropped DJGPP
    support at some point? Look into the configure script to see if DJGPP
    is supported.
    It's the bash source from djgpp itself (v2gnu/bsh4428s.zip).

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From John Doe (altaptitude@proton.me) [via djgpp@delorie.com]@djgpp@delorie.com to djgpp on Tue Nov 4 15:47:19 2025
    From Newsgroup: comp.os.msdos.djgpp



    I don't think `make bash.exe CC=i586-pc-msdosdjgpp-gcc` is a valid target. `bsh4428s/gnu/bash-4.4.28/djgpp/readme` details the specific environment setup (for DOS) you need and the build process. It does not list `bash.exe` as a target.

    I believe bash.exe is a target because when running it it tries to do something, whereas when trying with any non existant target make says 'make: *** No rule to make target 'example'. Stop.'

    Regardless the results aren't any better when running just make.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Rugxulo (rugxulo@gmail.com) [via djgpp@delorie.com]@djgpp@delorie.com to comp.os.msdos.djgpp on Tue Nov 4 14:21:31 2025
    From Newsgroup: comp.os.msdos.djgpp

    Hi,

    On Tue, Nov 4, 2025 at 9:47rC>AM John Doe (altaptitude@proton.me) [via djgpp@delorie.com] <djgpp@delorie.com> wrote:

    I don't think `make bash.exe CC=i586-pc-msdosdjgpp-gcc` is a valid target. `bsh4428s/gnu/bash-4.4.28/djgpp/readme` details the specific environment setup (for DOS) you need and the build process. It does not list `bash.exe` as a target.

    I believe bash.exe is a target because when running it it tries to do something, whereas when trying with any non existant target make says 'make: *** No rule to make target 'example'. Stop.'

    Regardless the results aren't any better when running just make.

    So you're trying to rebuild Bash? Why?? Do you run it natively in DOS
    (SFNs only?) or under some other system (e.g. DOSEMU2 or WinXP)?

    Try to build a "Hello, world!" program first to make sure everything
    is functioning.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Stefan Ring (stefanrin@gmail.com) [via djgpp@delorie.com]@djgpp@delorie.com to djgpp on Tue Nov 4 22:16:37 2025
    From Newsgroup: comp.os.msdos.djgpp

    On Mon, Nov 3, 2025 at 7:54rC>PM John Doe (altaptitude@proton.me) [via djgpp@delorie.com] <djgpp@delorie.com> wrote:
    Ok i guess Emacs was a bad example, however i'm having trouble with other djgpp software too. Djgpp's Bash docs also only have instructions for compiling on DOS, and when i tried running 'make bash.exe CC=i586-pc-msdosdjgpp-gcc' it would fail because it would try to run the .exe file in the directory (./mksyntax.exe) which obviously a GNU/Linux system can't do so that would fail. I couldn't find where exactly it was instructed to run those so i couldn't remove that. I had no success running the configure scripts myself with --host=i586-pc-msdosdjgpp or CC=i586-pc-msdosdjgpp-gcc either.

    Unfortunately, bash is also a very problematic one. The tarballs are a
    mess. The git repo even more so. I managed to cross-compile it last
    year with a lot of hackery, and the result of this would refused to
    work and produced all kinds of unexpected errors.

    Building it natively on Windows XP or Vista 32bit works and produces a
    working executable. Building on DOS with doslfn also works, but is significantly slower (I would think around 10 times slower).

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Stefan Ring (stefanrin@gmail.com) [via djgpp@delorie.com]@djgpp@delorie.com to djgpp on Sat Nov 8 20:28:49 2025
    From Newsgroup: comp.os.msdos.djgpp

    On Tue, Nov 4, 2025 at 10:16rC>PM Stefan Ring <stefanrin@gmail.com> wrote:

    Building it natively on Windows XP or Vista 32bit works and produces a working executable. Building on DOS with doslfn also works, but is significantly slower (I would think around 10 times slower).

    As my mind had turned to this topic anyway, I fired up a real machine
    in order to test building it on bare-metal DOS. Sure enough, it was
    slow as molasses, but it made me notice the source of that slowness:
    the HD led would show constant activity. It looks as if smartdrv
    became completely immobilized when doslfn is loaded. I started an
    experimental CI build on GitHub Actions a few months ago, and it used
    to take 2h25m to compile bash. Because of the discovery with the HD
    led, I moved everything to a RAM drive, and now it finishes in 13
    minutes. Still a lot longer than the 3-4 minutes it takes on Windows
    XP/Vista, but a lot more reasonable. And somewhat reproducible, which
    was the entire point of this exercise.

    https://github.com/Ringdingcoder/dosbuild-test/actions/runs/19197309887

    --- Synchronet 3.21a-Linux NewsLink 1.2