Commit graph

8207 commits

Author SHA1 Message Date
David Given 8614439ded Syntax fix. 2022-06-26 21:53:16 +02:00
David Given ad5a8de148 Typo fix. 2022-06-26 21:43:57 +02:00
David Given 37403f2f7b Try using native Lua. 2022-06-26 21:43:10 +02:00
David Given 145d5ac4de Add Windows to the CI matrix. 2022-06-26 19:41:13 +02:00
David Given c3dea7641e Fix typo. 2022-06-26 16:41:57 +02:00
David Given b248613ba5 CodeQL is useless. 2022-06-26 16:40:23 +02:00
David Given 9579d3ba37 Somehow this file never got checked in? 2022-06-26 16:38:36 +02:00
David Given df6cfe0410
Merge pull request #253 from tkchia/tkchia/pid
plat/msdos86: make getpid() use European MS-DOS's getpid syscall if it exists
2022-06-26 16:31:05 +02:00
tkchia 571fce1165 plat/msdos86: make getpid() use European MS-DOS's getpid syscall
if it exists
2022-06-24 17:00:57 +00:00
David Given 180e400cf2
Merge pull request #251 from davidgiven/dtrg-osx2
Make build on OSX.
2022-06-20 00:20:14 +02:00
David Given 8b0a3ac473 Attempt to make work on OSX, and update the build matrix. 2022-06-20 00:18:16 +02:00
David Given ddfe372ac8
Merge pull request #250 from davidgiven/dtrg-tmp
Use more modern temp file handling.
2022-06-01 22:37:42 +02:00
David Given 76060c4dde Eliminate the TMP_DIR compile-time constant in favour of using $TMPDIR and
mkstemp where possible.
2022-05-29 00:44:28 +02:00
David Given 4972c81a5b
Merge pull request #249 from tkchia/tkchia/self-host
aal: recognize but ignore an `s` option for GNU ar compatibility
2022-03-19 21:40:20 +00:00
Tee-Kiah Chia d85480f441 aal: recognize but ignore an s option for GNU ar compatibility
first/build.lua invokes the archiver $(AR) with the flags `cqs`.
This patch allows this to work even if $(AR) is aal.
2022-03-19 20:44:14 +00:00
David Given 6bed61540d
Merge pull request #244 from grobe0ba/default
Allow override of configuration variables without editing Makefile.
2022-02-13 21:38:53 +01:00
David Given 4e816eb81f
Merge pull request #247 from davidgiven/llgen
Generate HTML versions of the LLgen documentation as well.
2022-02-05 21:33:06 +01:00
David Given f7de764a86 Generate HTML versions of the documentation as well. 2022-02-05 20:50:49 +01:00
David Given 00cb4144f2
Merge pull request #246 from davidgiven/llgen
Fix the LLgen standalone build scripts
2022-02-03 22:33:13 +01:00
David Given 06ede2e2f5 Fix the main documentation PDF not to use mangled character spacing. 2022-02-03 21:40:49 +01:00
David Given 1b972fcd17 Rip out the old pm stuff and write a simple Makefile. Update README. 2022-02-03 21:28:47 +01:00
B. Atticus Grobe 3b42edf143 Allow override of configuration variables without editing Makefile. 2022-01-26 23:00:04 -06:00
David Given 526738b7e1
Merge pull request #243 from tkchia/tkchia/self-host
plat/msdos86: add unlink( )
2022-01-21 22:14:15 +01:00
Tee-Kiah Chia 76c40b5dc0 plat/msdos86: add unlink( ) 2022-01-21 21:06:33 +00:00
David Given 612c47371e
Merge pull request #242 from tkchia/tkchia/self-host
Add fork, wait, waitpid for all Linux targets, & execl for linux386.
2022-01-19 22:17:48 +01:00
Tee-Kiah Chia 84a25b0526 Add fork, wait, waitpid for all Linux targets, & execl for linux386. 2022-01-19 17:05:59 +00:00
David Given 7e2adfb692
Merge pull request #241 from tkchia/tkchia/switch-long
mach/i86/libem/csb4.s: fix incorrect i86 code for switch (long)
2022-01-18 00:34:27 +01:00
Tee-Kiah Chia ceca019493 mach/i86/libem/csb4.s: fix incorrect i86 code for switch (long)
Fixes https://github.com/davidgiven/ack/issues/240
2022-01-17 19:29:56 +00:00
David Given 8b53004031
Merge pull request #232 from tkchia/tkchia/troff
doc/em/app.codes.nr: fix "139: no real data" error under GNU tbl
2021-05-04 20:58:36 +02:00
Tee-Kiah Chia ea8097d866 doc/em/app.codes.nr: fix "139: no real data" error under GNU tbl
Before the patch, running the GNU tbl(1) preprocessor on the
troff file app.codes.nr would give a warning

	$ tbl app.codes.nr >app.codes.nr.2
	tbl:app.codes.nr:139: no real data
	tbl:app.codes.nr:139: giving up on this table

and the table of suffixes

	.z	no arguments
	.l	16-bit argument
	...	...

would be left out of the tbl output.
2021-05-04 16:21:33 +00:00
David Given 0b1f81fbfe
Merge pull request #231 from tkchia/tkchia/ego-il-unused
util/ego: inlining pass now tries to remove unused procedures
2021-04-26 23:16:16 +02:00
David Given 7286c67e8f
Merge pull request #224 from nick-less/default
fix compile error under macos
2021-04-26 17:34:09 +02:00
Tee-Kiah Chia 4d5b1ec115 util/ego: inlining pass now tries to remove unused procedures
This addresses issue #230, though only partially.
2021-04-26 14:27:45 +00:00
David Given a740f476c2
Merge pull request #229 from tkchia/tkchia/msdos86
Add support for compiling MS-DOS .com programs (msdos86).
2021-04-13 12:51:43 +02:00
Tee-Kiah Chia 85953022b5 README: mention msdos86 target platform 2021-04-01 14:42:02 +00:00
Tee-Kiah Chia a6c7ac2a28 plat/msdos86: add gettimeofday( ) 2021-03-29 15:15:13 +00:00
Tee-Kiah Chia f2c8828a4b plat/msdos86: copy stubs kill( ), signal( ), from plat/pc86 2021-03-28 17:21:54 +00:00
Tee-Kiah Chia 466cf20805 plat/msdos86: add open( ), lseek( ), and getpid() 2021-03-28 17:21:53 +00:00
Tee-Kiah Chia 0d2b55cd29 plat/msdos86: add isatty( ), _setmode( ), read( ), write( ) 2021-03-28 17:21:52 +00:00
Tee-Kiah Chia 2dfddf3fa8 libcc.ansi: add support for O_TEXT, O_BINARY file status flags 2021-03-27 19:12:35 +00:00
Tee-Kiah Chia aaf3ef695b plat/msdos86: implement close( ) function & proper errno setting 2021-03-27 13:23:44 +00:00
Tee-Kiah Chia 4c678ca210 Adding MS-DOS .com program support (msdos86). Still incomplete. 2021-03-27 13:15:56 +00:00
David Given 3dcd16e0a0
Merge pull request #227 from tkchia/tkchia/sepid
Add .seek asm pseudo-op, advances location counter to fixed offset
2021-03-20 19:05:14 +01:00
Tee-Kiah Chia 5d3ef4568a Add .seek pseudo-op and fix .base pseudo-op in uni_ass(6) manual 2021-03-20 17:03:12 +00:00
Tee-Kiah Chia 64a74b4e09 Add .seek asm pseudo-op, advances location counter to fixed offset
The new .seek assembler pseudo-op advances the location
counter to a fixed offset within a section --- or to a fixed
address, if the section is a .base'd section.  It works
somewhat like the GNU assembler's .org pseudo-op, though
with a hopefully less confusing name.

This pseudo-op lets us avoid having to manually compute the
needed boot sector padding in the pc86 start-up code
plat/pc86/boot.s .
2021-03-19 13:36:24 +00:00
David Given ced1e91800
Merge pull request #226 from tkchia/tkchia/sepid
aslod: fix: use section alignments when computing section sizes
2021-03-18 19:38:16 +01:00
Tee-Kiah Chia a29507d9e4 aslod: fix: use section alignments when computing section sizes
The follows( ) function uses pa->os_lign when determining
whether an output section pa immediately follows another
section pb.

However, emits( ) was not using this alignment information
when laying out and padding the output sections.  This seems
to be a bug.

I suspect that mach/arm/cv/cv.c might need a similar fix.
2021-03-18 18:25:04 +00:00
nick-less 2ae1f01f36 fix compile error under macos 2021-03-17 20:01:44 +01:00
David Given bda4239464
Merge pull request #223 from tkchia/tkchia/devel
Fix static buffer overflow in genname( ) in LLgen
2021-03-16 20:37:56 +01:00
Tee-Kiah Chia 9c7ce04cec Fix static buffer overflow in genname( ) in LLgen
This should fix at least some instances of the "undefined
reference to `LLnc_recover'" error that happens in some
builds (https://github.com/davidgiven/ack/issues/218).

The bug was that genname( ) used a static `namebuf' buffer
and did not properly check for overflow when writing into
it.  The result was that the `non_corr' variable was
sometimes overwritten with a non-zero value when it should
be zero, causing bogus results later.

This proposed patch makes genname( ) dynamically allocate
and resize a buffer for holding a target file name.

I also take this chance to fix a typo in correct_prefix().
2021-03-16 17:59:29 +00:00