Skip to content

[c86] Enhance 'ecc' C86 compiler front-end script#2151

Merged
ghaerr merged 1 commit intomasterfrom
ecc
Dec 27, 2024
Merged

[c86] Enhance 'ecc' C86 compiler front-end script#2151
ghaerr merged 1 commit intomasterfrom
ecc

Conversation

@ghaerr
Copy link
Copy Markdown
Owner

@ghaerr ghaerr commented Dec 27, 2024

Enhances ecc C86 front-end script to allow automatic preprocessing, compilation, assembling and linking C programs from the command line. Runs pretty much like 'cc' with the addition of a -c option. If -c is specified, the intermediate .i, .as and .o files are kept for inspection, otherwise the specified files are linked together by LD86 and the intermediate files deleted.

The toolchain repo directory must be set in the user's PATH variable. This can be done by editing and then running elks/libc/c86env.sh as follows:

$ cd elks-repo/libc
(edit c86env.sh for first time with toolchain root directory)
$ . ./c86env.sh
(now ready to compile programs)
$ ecc foo.c fee.c
(preprocesses, compiles, assembles and links foo.c and fee.c into foo)
$ ecc -c foo.c
(preprocesses, compiles and assembles foo.c leaving foo.i, foo.as and foo.o for inspection)

At @toncho11's suggestion, this script is also being added to 8086 toolchain, use as './ecc' over there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant