X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JqRNR/rvN5RLYOWw5AIWLh8uGkaXkthDwQGvmXimaSjsoEkR4vzierNTq2K2Ji+xyN47ry/WcXpfOXbd6AfRa8ckKtpA7zB0rt2uwxcbzHB236fI8SlRUhuyhFWjgyZnXtkWL3h9jTkFzuuWJZmPikfqPuxVF33ajJn8GsGCOH7W57CJjbhp8GxTdzGDUYAs8xoXwgHg7Gc8nsV0kYAYJuyeGE9bRzieG0vROxI2EqpH1xRxSbh1qWD+93k+mYaA8GxzV0J9q5jqOV7Qvt09bynonwd3aAobkvKzxld8xPEYWg2E4nsDVGG2yCjuRysXEPTrGibsZtXws4VFPfFL6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tYEkvlMPhYIyr7KnGetXYp0iEQPDyouaGOnkcZAMyZ8=; b=J09OCy6zpk0WeSgKEnZj+qukpvYFOug8RjIzzz8ldKDsdbWjtHU40ix0IoTTf9JmaLepVWV7vyFDGuW0rKk2SCjwXGFqMiUcfYiuextHZFyZcAlDMPZWDUXEcjFqRi1uATfwUPOK91jcioo6MYCzxyU0IttKYdp3jVi7vAqD64pZrgjvcFaE2MQnouYz76IySP5w4uGED7vAFvtZCp1qh1+7BtCtFO+dn1ygSq+9NpFIpPmvZuLfc3Z1LzMVRY8ZT7gHAmhmlkpSTusOur7sliqF+Imj6lL3u7MddHHLf7Tk6gDrWdCqeUtJ6bqaCfktv5cDYJcZAYwZehu9J6un5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tYEkvlMPhYIyr7KnGetXYp0iEQPDyouaGOnkcZAMyZ8=; b=Hebv10Gz0BZjsAIE0elyNU2U7s0BfRf5DQX3bEKLfhKq3KePzyS4LdserFd5Sg81JiVVLKmcIRUi4/tugry7S/p6kc44OpvhXx30l+FbAOJzMdTR+fPdY7xqNjYDSQ3/9kbHMeYBmjxiWv9jMALmvqRtc/D6BJeY0NrVVwW4NzZWW6y6eJL/a5PJ/qj47Gn7cRs9dBuhAH3Szelgp5/CY6iJtHP3cVHtwiuzDKAdoLQHoGvS8+8ylTYPv4Tejn1cI5wo2QOFJlH7UOxck/GzDolzoaSL/+GQf3N9dP2A2w1Y4byRsCu7TtFrO+2iQvangvrpP1KPgUPc5D4gAIv32Q== From: "Jay K (jayk123 AT hotmail DOT com) [via djgpp AT delorie DOT com]" To: "djgpp AT delorie DOT com" Subject: command line lenght problems? Thread-Topic: command line lenght problems? Thread-Index: AQHYEpnRXSjHXVVzUE2FW6vK8tBa7g== Date: Wed, 26 Jan 2022 09:53:31 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: 69785034-0787-e0af-85a1-df4fb0b67acf x-tmn: [+8uhQa8biLEcr0eSwGs8MrEioPxbOuV4uZda7vXVHsrhUrx9KKibGGamKL+Hh8Vm] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 655dad85-49d9-4e7c-3dbd-08d9e0b1b60e x-ms-traffictypediagnostic: DM5PR14MB1161:EE_ x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 2jMLDCRy+R2KzeNL2fuyEwfzp3zvCV0oF8wRHO85lD/6UuIGJ13F15ZuLk6ZyhWZUWfpZcYhf2JF7U0iJZ07FbCIgAPaPoBgsBLDq0ntGMhaTu8wkRd1J4SK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OYFLrFvQ8eWceTzko+?= =?iso-8859-1?Q?a5mTOjY7RNYVv4baRJYuGtdbDR1alEIGQnyPKO4Eh98elEuVPDBPCnsXvO?= =?iso-8859-1?Q?0/s33c0GUp/Np6bK9IwK59Roydx2ptGjK3J4igRd/VWJBRPgeRPIg346xH?= =?iso-8859-1?Q?Q9KodaG1YVi7P5p8aOK3P7KSXB3kLgboYtXPbGjFrwMORLV2FVlIqEiHH4?= =?iso-8859-1?Q?MtMxOkH18ARJcXseNzpA4Qn8qJnl6/0uheS8DsqWlN4kuShrqZA0orbWyJ?= =?iso-8859-1?Q?hAjsCZclacG0mFujYSZBkpAtfG0Et8lUF4DzsT3FvLzYsFr7vXihyceo0S?= =?iso-8859-1?Q?TisIiu0juQj7P9KqxnzRNwjdHyF/iLlJ7dWTm+F0WtBFOhcN/JGfKyqfic?= =?iso-8859-1?Q?RhMhHEOx+C0dItPuGg7AXB15p+fw5u4sPwGBRh8vNXAQGXV7udzk3bXnN1?= =?iso-8859-1?Q?k2tQJt2pmliMH3EwYTZ2NPclVVrhsumR9FeAcZlU6rG6J5vU2GocnQdER+?= =?iso-8859-1?Q?Teb3QdXqgVlkAyxkDvcqcX9D54DRsX1LSCjLZ3Lek5HeaZdoXw7FC4d2U8?= =?iso-8859-1?Q?kZQpm7gcdNYplsVuTC2hR0U/7TUtlOrP1Ef5N6pcpodzjSAEU4ggw/q7E7?= =?iso-8859-1?Q?LD6nRURE7oUwW8hFfbmn4djTVYmj0kAw7q8eHO?= Content-Type: multipart/alternative; boundary="_000_MWHPR1401MB1951CCC95276E44447921D28E6209MWHPR1401MB1951_" MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-cd57b.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR1401MB1951.namprd14.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 655dad85-49d9-4e7c-3dbd-08d9e0b1b60e X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jan 2022 09:53:31.7386 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR14MB1161 --_000_MWHPR1401MB1951CCC95276E44447921D28E6209MWHPR1401MB1951_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi folks. I am trying to port my program to MS-DOS. For fun, granted. I figured DJGPP would help. Esp. because it seems to have a useful "sigalarm" functionality, I might use to implement preemptive threads. I have a prototype that suggests that will work: https://github.com/modula3/cm3/blob/3be819ed8e2fa60885aff0cb6278934a17b307= 02/m3-libs/m3core/src/thread/POSIX/test_dos_threads.cpp The rest of the Posix support helps also. I'm not sure about network/sockets, maybe give up. I have experimented with a few "DOS"s. FreeDOS, DosBos-X, 32bit Windows 10 VM. They all have advantages and disadvantages. Granted I could spend more time configuring each and none is "really" MS-DO= S. My program is a compiler, that produces .cpp files and would run g++ or gxx= , etc. (I might experiment with e.g. OpenWatcom, might, like if it can link the = djpp libraries.) I am seeing, I guess, command line length limitations. gcc and collect2 crash, but if I run them manually with shorter equivalent-= enough commands, they work. Advise? I tried trimming environment. That didn't help. I tried running bash, thinking within there, maybe Djgpp would use its technique to transfer command lines otherwise, but bash won't start. bash: --------------------------- 16 bit MS-DOS Subsystem --------------------------- Administrator: C:\Windows\system32\cmd.exe NTVDM has encountered a System Error NTVDM has encountered a System Error 4001h Choose 'Close' to terminate the = application. --------------------------- Close Ignore --------------------------- C:\dos>type 1.c #include int main() { printf("hello\n"); } C:\dos>gcc -v -c 1.c Using built-in specs. COLLECT_GCC=3Dc:/dos/bin/gcc.exe Target: djgpp Configured with: /gcc-9.30/configure djgpp --prefix=3D/dev/env/DJDIR --disa= ble-werror --enable-languages=3Dc,c++,fortran,objc,obj-c++,ada --with-gcc-m= ajor-version-only --enable-libquadmath-support --enable-lto --disable-libst= dcxx-pch --enable-libstdcxx-filesystem-ts Thread model: single gcc version 9.3.0 (GCC) COLLECT_GCC_OPTIONS=3D'-v' '-c' '-mtune=3Dpentium' '-march=3Dpentium' c:/dos/bin/../libexec/gcc/djgpp/9/cc1.exe -quiet -v -iprefix c:/dos/bin/..= /lib/gcc/djgpp/9/ -remap 1.c -quiet -dumpbase 1.c -mtune=3Dpentium -march= =3Dpentium -auxbase 1 -version -o c:/dos/tmp/cczF3Ew0.s Exiting due to signal SIGSEGV Stack Fault at eip=3D00000a11 eax=3D00010001 ebx=3D01ad0080 ecx=3D01549400 edx=3D004207bf esi=3D00001223 = edi=3D00001213 ebp=3D0042773a esp=3D0042773a program=3DC:\DOS\BIN\GCC.EXE cs: sel=3D00cf base=3D000d3a50 limit=3D00000db0 ds: sel=3D00b7 base=3D000cc160 limit=3D0000ffff es: sel=3D0040 invalid fs: sel=3D0000 gs: sel=3D0000 ss: sel=3D00b7 base=3D000cc160 limit=3D0000ffff App stack: [00423b78..00223b7c] Exceptn stack: [00223ac8..00221b88] C:\dos> c:/dos/bin/../libexec/gcc/djgpp/9/cc1.exe -quiet -v -iprefix c:/dos= /bin/../lib/gcc/djgpp/9/ -remap 1.c -quiet -dumpbase 1.c -mtune=3Dpentium -= march=3Dpentium -auxbase 1 -version -o c:/dos/tmp/cczF3Ew0.s The system cannot execute the specified program. c:/dos/bin/../libexec/gcc/djgpp/9/cc1.exe -iprefix c:/dos/bin/../lib/gcc/dj= gpp/9/ -remap 1.c -quiet -dumpbase 1.c -o 1.s =3D> success as 1.s =3D> success C:\dos>gcc 1.o -v ... 208 characters: c:/dos/bin/../libexec/gcc/djgpp/9/collect2.exe c:/dos/lib/crt0.o -Lc:/dos/b= in/../lib/gcc/djgpp/9 -Lc:/dos/bin/../lib/gcc -Lc:/dos/lib -Lc:/dos/bin/../= lib/gcc/djgpp/9/../../.. -Lc:/dos/lib 1.o -lgcc -lc -lgcc Exiting due to signal SIGSEGV Stack Fault at eip=3D00000a11 eax=3D00010001 ebx=3D001c0080 ecx=3D001804 90 characters: ld.exe c:/dos/lib/crt0.o 1.o -lgcc -lc -Lc:/dos/lib/gcc/djgpp/9 -Lc:/dos/li= b -o a.exe =3D> success .\a.exe =3D> success Suggestions? I mean, worst case, I will run: C:\dos>gcc --print-prog-name ld c:/dos/bin/ld.exe C:\dos>gcc --print-prog-name cc1 c:/dos/bin/../libexec/gcc/djgpp/9/cc1.exe and run things more manually "like" that, with response files. I had to reinvent the compiler driver though, it hides things so well. I suppose I could run gcc directly with -v, capture the command lines, change them to use response files and rerun them "verbatim", thereby preserving the compiler driver. Can/should the gcc driver handle this more automatically itself? Thank you, - Jay --_000_MWHPR1401MB1951CCC95276E44447921D28E6209MWHPR1401MB1951_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi folks.

I am trying to port my program to MS-DOS. For fun, granted.
I figured DJGPP would help.
Esp. because it seems to have a useful "sigalarm" functional= ity,
I might use to implement preemptive threads.
I have a prototype that suggests that will work:
 https://github.com/modula3/cm3/blob/3be819ed8e2fa60885aff0cb6278= 934a17b30702/m3-libs/m3core/src/thread/POSIX/test_dos_threads.cpp

The rest of the Posix support helps also.
 I'm not sure about network/sockets, maybe give up.

I have experimented with a few "DOS"s.
 FreeDOS, DosBos-X, 32bit Windows 10 VM.

They all have advantages and disadvantages.

Granted I could spend more time configuring each and none is "rea= lly" MS-DOS.

My program is a compiler, that produces .cpp files and would run g++ o= r gxx, etc.
  (I might experiment with e.g. OpenWatcom, might, like if it can= link the djpp libraries.)

I am seeing, I guess, command line length limitations.

gcc and collect2 crash, but if I run them manually with shorter equiva= lent-enough commands, they work.

Advise?

I tried trimming environment. That didn't help.
I tried running bash, thinking within there, maybe Djgpp would use
its technique to transfer command lines otherwise, but bash won't star= t.

bash:
---------------------------
16 bit MS-DOS Subsystem
---------------------------
Administrator: C:\Windows\system32\cmd.exe
NTVDM has encountered a System Error
NTVDM has encountered a System Error 4001h Choose 'Close' to terminate= the application.
---------------------------
Close   Ignore  
---------------------------


C:\dos>type 1.c
#include <stdio.h>
int main()
{
printf("hello\n");
}

C:\dos>gcc -v -c 1.c
Using built-in specs.
COLLECT_GCC=3Dc:/dos/bin/gcc.exe
Target: djgpp
Configured with: /gcc-9.30/configure djgpp --prefix=3D/dev/env/DJDIR -= -disable-werror --enable-languages=3Dc,c++,fortran,objc,obj-c++,ada --with-= gcc-major-version-only --enable-libquadmath-support --enable-lto --disable-= libstdcxx-pch --enable-libstdcxx-filesystem-ts
Thread model: single
gcc version 9.3.0 (GCC)
COLLECT_GCC_OPTIONS=3D'-v' '-c' '-mtune=3Dpentium' '-march=3Dpentium'<= /div>
 c:/dos/bin/../libexec/gcc/djgpp/9/cc1.exe -quiet -v -iprefix c:/= dos/bin/../lib/gcc/djgpp/9/ -remap 1.c -quiet -dumpbase 1.c -mtune=3Dpentiu= m -march=3Dpentium -auxbase 1 -version -o c:/dos/tmp/cczF3Ew0.s
Exiting due to signal SIGSEGV
Stack Fault at eip=3D00000a11
eax=3D00010001 ebx=3D01ad0080 ecx=3D01549400 edx=3D004207bf esi=3D0000= 1223 edi=3D00001213
ebp=3D0042773a esp=3D0042773a program=3DC:\DOS\BIN\GCC.EXE
cs: sel=3D00cf  base=3D000d3a50  limit=3D00000db0
ds: sel=3D00b7  base=3D000cc160  limit=3D0000ffff
es: sel=3D0040  invalid
fs: sel=3D0000
gs: sel=3D0000
ss: sel=3D00b7  base=3D000cc160  limit=3D0000ffff
App stack: [00423b78..00223b7c]  Exceptn stack: [00223ac8..00221b= 88]



C:\dos> c:/dos/bin/../libexec/gcc/djgpp/9/cc1.exe -quiet -v -iprefi= x c:/dos/bin/../lib/gcc/djgpp/9/ -remap 1.c -quiet -dumpbase 1.c -mtune=3Dp= entium -march=3Dpentium -auxbase 1 -version -o c:/dos/tmp/cczF3Ew0.s
The system cannot execute the specified program.


c:/dos/bin/../libexec/gcc/djgpp/9/cc1.exe -iprefix c:/dos/bin/../lib/g= cc/djgpp/9/ -remap 1.c -quiet -dumpbase 1.c -o 1.s

=3D> success

as 1.s

 =3D> success

C:\dos>gcc 1.o -v
...

208 characters:
c:/dos/bin/../libexec/gcc/djgpp/9/collect2.exe c:/dos/lib/crt0.o -Lc:/= dos/bin/../lib/gcc/djgpp/9 -Lc:/dos/bin/../lib/gcc -Lc:/dos/lib -Lc:/dos/bi= n/../lib/gcc/djgpp/9/../../.. -Lc:/dos/lib 1.o -lgcc -lc -lgcc

Exiting due to signal SIGSEGV
Stack Fault at eip=3D00000a11
eax=3D00010001 ebx=3D001c0080 ecx=3D001804

90 characters:
ld.exe c:/dos/lib/crt0.o 1.o -lgcc -lc -Lc:/dos/lib/gcc/djgpp/9 -Lc:/d= os/lib -o a.exe

 =3D> success

.\a.exe

=3D> success


Suggestions?
I mean, worst case, I will run:

C:\dos>gcc --print-prog-name ld
c:/dos/bin/ld.exe

C:\dos>gcc --print-prog-name cc1
c:/dos/bin/../libexec/gcc/djgpp/9/cc1.exe

and run things more manually "like" that, with response file= s.

I had to reinvent the compiler driver though, it hides things so well.=
I suppose I could run gcc directly with -v, capture the command lines,=
change them to use response files and rerun them "verbatim",= thereby
preserving the compiler driver.

Can/should the gcc driver handle this more automatically itself?

Thank you,
 - Jay
--_000_MWHPR1401MB1951CCC95276E44447921D28E6209MWHPR1401MB1951_--