[Simh] A new version...
Philipp Hachtmann
hachti at hachti.de
Wed Oct 1 09:33:10 EDT 2008
Hi Peter,
thank you for testing the files! Very nice!
> some feedback when testing your makefile (readline-hack-08092401.zip)
> with unchanged simhv38-0.zip on OS X 10.5.5 (darwin):
>
> 1. make HAVE_READLINE=
> terminates with
> CC sim_tape.o
> make: *** No rule to make target `sim_readline.c', needed by
> `sim_readline.o'. Stop.
>
> 2. I now add sim_readline.c and sim_readline.h to make the makefile
> happy and get
Have you also unpacked the changed scp.c? Without modified scp.c, you
can build with readline - but SIMH won't actually use it!
> make HAVE_READLINE=
> ...
> LD bin/nova
> ld: unknown option: -obin/nova
> collect2: ld returned 1 exit status
> make: *** [bin/nova] Error 1
>
> It seems that
> ifneq (,$$(VERBOSE))
> $$(CC) -o$$@ $$(LDFLAGS) $$($(1)_LDFLAGS) $$^
> else
> @echo LD $$@
> @$$(CC) -o$$@ $$(LDFLAGS) $$($(1)_LDFLAGS) $$^
> endif
>
> should in fact be
>
> ifneq (,$$(VERBOSE))
> $$(CC) -o $$@ $$(LDFLAGS) $$($(1)_LDFLAGS) $$^
> else
> @echo LD $$@
> @$$(CC) -o $$@ $$(LDFLAGS) $$($(1)_LDFLAGS) $$^
> endif
Ah, ok, I've changed that.
>
> Apparently some versions of gcc choke if the space character is missing.
> I'm using "i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5488)"
>
> With this fix the make succeeds.
>
> 3. Now make HAVE_READLINE=yes
> Terminates with
> CC sim_readline.o
> In file included from sim_readline.c:13:
> /usr/include/readline/readline.h:101: error: syntax error before ‘*’ token
> /usr/include/readline/readline.h:102: error: syntax error before ‘*’ token
> make: *** [sim_readline.o] Error 1
>
> This can be fixed by adding in sim_readline.c a "#include <stdio.h>":
>
Don't know why if it's like that - on my system it doesn't say anything.
But stdio.h is always a good choice, so I included it the way you suggested.
> #ifdef HAVE_READLINE
>
> #include <stdio.h>
> #include <readline/readline.h>
> #include <readline/history.h>
> #include "sim_defs.h"
> ...
>
> 4. It seems that for some platforms (e.g. darwin) there is no
> optimization happening. On darwin I typically use -O3 at least for the
> AltairZ80.
>
Now there's -O2 for Win32 and -O3 for darwin and linux.
The latest version can be found under:
http://hachti.de/simh/readline-hack-08100101.zip
Best wishes,
Philipp :-)
--
http://www.hachti.de
More information about the Simh
mailing list