Commit graph

8247 commits

Author SHA1 Message Date
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
David Given 7c51d86c4e
Merge pull request #221 from davidgiven/codeanalysis
Experiment with code analysis.
2020-10-09 18:08:43 +02:00
David Given b1f0038033
Typo fix? 2020-10-09 17:54:15 +02:00
David Given 05fafdd2d2
Try and make things build properly. 2020-10-09 17:52:31 +02:00
David Given b398abdd98
Experiment with code analysis. 2020-10-09 17:45:59 +02:00
David Given ec47148b85
Merge pull request #220 from davidgiven/dtrg-fixes
Don't rely on COMMON variable linkage.
2020-09-14 23:13:12 +02:00
David Given 3eed6db007 Fix some issues caused by, I think, COMMON variables no longer working in
recent gccs?
2020-09-14 22:38:01 +02:00
David Given cb540ec917
Merge pull request #217 from tevorbl/default
update platform linux68k
2020-06-13 18:41:12 +02:00
tevorbl cd36c3526b minor formatting changes
sim.c:
remove stray tracing statements
make formatting consistently leading tabs

Makefile:
restore ACK_TEMP_DIR & CC to default settings
2020-06-13 14:33:14 +01:00
tevorbl 6fe335b9e9 another fix for printf(float) on m68k platform
bug caused by this instruction:

  fmove.l fp0,d0 

problem was caused by a conflict between the fpu emulator (softfloat) and the compiler.

the emulator implemented this as a purely arithmetic move & conversion,
but the compiler assumed that the result could be interpreted as a logical (ie unsigned) conversion.
rightly or wrongly.


for example, if fp0 contained the value 2576980377.0  which is unsigned integer -1717987328
the emulator would treat this as an integer overflow and move 0x7fffffff (INT_MAX) into d0.

The complier on the other hand would assume that d0 contained 2576980377 (the unsigned value).

I don't know which is correct, but this is my fix for the time being.
2020-06-02 13:00:03 +01:00
tevorbl 04fe0aa53e fixed floats in printf in linux59k platform
problem was implementation of fint & fintrz floating point ops in m68kfpu.c
Both these ops truncated the integer to 32 bits instead of leaving it as an extended precision floating point number

Changed the implementation to use 64 bit ints instead of 32 bit ints.
2020-06-01 20:53:29 +01:00