Enable ixemul compilation.

This commit is contained in:
Krystian Bacławski
2012-08-03 19:51:11 +02:00
parent 66d353c22d
commit 39f0afdce2
15 changed files with 302 additions and 5 deletions
+4 -2
View File
@@ -9,6 +9,7 @@ targeting m68k-amigaos with:
* binutils 2.9.1 (assembler, linker, etc.)
* libnix 2.1 (standard ANSI/C library replacement for AmigaOS)
* AmigaOS headers & libraries (for AmigaOS 3.9)
* ixemul.library 48.2
Patches are welcome!
@@ -27,6 +28,7 @@ Prerequisites (look at bootstrap.conf file):
- gcc 2.95.3
- binutils 2.9.1
- bison 1.35
- gawk 1.3.8
* Amiga specific sources & binaries:
- libnix 2.1
- AmigaOS NDK 3.9
@@ -46,5 +48,5 @@ TODO:
* Remove dependencies:
- libamiga-bin
* Provide some rudimentary testing (C / C++ sources).
* Build ixemul.
* Add auxiliary tools: GccFindHit, hunk2aout.
* Add auxiliary tools: hunk2aout.
* Build timezone data for ixemul (zic).
+6 -3
View File
@@ -124,7 +124,10 @@ function unpack_sources {
unpack_clean "${IXEMUL}" "${IXEMUL_SRC}"
mv "ixemul" "${IXEMUL}"
chmod a+x "${IXEMUL}/configure"
pushd "${IXEMUL}"
chmod a+x "configure" "mkinstalldirs"
apply_patches "${IXEMUL}"
popd
unpack_clean "${LIBNIX}" "${LIBNIX_SRC}"
mv "libnix" "${LIBNIX}"
@@ -344,7 +347,7 @@ function build_ixemul {
mkdir -p "${IXEMUL}"
cd "${IXEMUL}"
CC=m68k-amigaos-gcc \
CFLAGS=-noixemul \
CFLAGS="-noixemul -I${PREFIX}/include" \
AR=m68k-amigaos-ar \
RANLIB=m68k-amigaos-ranlib \
"${SOURCES}/${IXEMUL}/configure" \
@@ -390,8 +393,8 @@ function build {
process_headers
install_libamiga
build_libnix
#build_ixemul
build_gpp
build_ixemul
}
function main {
@@ -0,0 +1,15 @@
--- ixemul-48.2.orig/general/Makefile.in 2001-08-21 17:32:52.000000000 +0200
+++ ixemul-48.2/general/Makefile.in 2012-08-03 19:29:32.000000000 +0200
@@ -33,9 +33,9 @@
# I *love* GNU make!
define catenate
-/bin/echo -n creating $@...
-/bin/echo -e "$(^:%=#include \"%\"\n)" >$@
-/bin/echo done
+echo -n creating $@...
+echo "$(^:%=#include \"%\"\n)" >$@
+echo done
endef
FLAVOR_CFLAGS = -m$(CPU) -m$(FPU)
+11
View File
@@ -0,0 +1,11 @@
--- ixemul-48.2/glue/Makefile.in 1999-08-12 14:27:36.000000000 +0200
+++ ixemul-48.2/glue/Makefile.in 2012-08-03 17:58:34.000000000 +0200
@@ -77,7 +77,7 @@
rm -f *.o
gen_glue: gen_glue.c $(srcdir)/../include/sys/syscall.def
- $(CC) $(ALL_CFLAGS) $< -o $@
+ gcc $(INCS) $< -o $@
clean:
rm -rf *baserel*
+11
View File
@@ -0,0 +1,11 @@
--- ixemul-48.2.orig/glue/gen_glue.c 1999-08-12 14:27:36.000000000 +0200
+++ ixemul-48.2/glue/gen_glue.c 2012-08-03 18:25:58.000000000 +0200
@@ -1,6 +1,8 @@
#include <sys/types.h>
#include <sys/syscall.h>
+#include <string.h>
+#include <stdlib.h>
#include <stdio.h>
struct syscall {
@@ -0,0 +1,29 @@
--- ixemul-48.2.orig/ixnet/Makefile.in 2001-09-01 17:16:30.000000000 +0200
+++ ixemul-48.2/ixnet/Makefile.in 2012-08-03 19:30:25.000000000 +0200
@@ -33,9 +33,9 @@
# I *love* GNU make!
define catenate
-/bin/echo -n creating $@...
-/bin/echo -e "$(^:%=#include \"%\"\n)" >$@
-/bin/echo done
+echo -n creating $@...
+echo "$(^:%=#include \"%\"\n)" >$@
+echo done
endef
FLAVOR_CFLAGS = -m$(CPU) -m$(FPU)
@@ -112,11 +112,11 @@
./create_header >$@
create_header: create_header.c $(srcdir)/../include/user.h ixnet.h
- gcc $(CFLAGS) $(INCS) $(OTHER_CFLAGS) $(DEFS) $< -o $@
+ gcc $(CFLAGS) $(INCS) $(DEFS) $< -o $@
chmod u+x $@
parse_version: parse_version.c
- gcc $(CFLAGS) $(OTHER_CFLAGS) -Dmc$(CPU) $(DEF_FPU) $(DEFS) $< -o $@
+ gcc $(CFLAGS) -Dmc$(CPU) $(DEF_FPU) $(DEFS) $< -o $@
chmod u+x $@
version.h: parse_version $(srcdir)/../version.in
@@ -0,0 +1,44 @@
--- ixemul-48.2.orig/ixnet/parse_version.c 2001-08-21 17:33:06.000000000 +0200
+++ ixemul-48.2/ixnet/parse_version.c 2012-08-03 18:29:55.000000000 +0200
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
int main(int argc, char **argv)
{
@@ -23,20 +24,20 @@
}
fscanf(f, "%d.%d,%d.%d.%d", &major, &minor, &day, &month, &year);
fclose(f);
- format = "/*
- * version.h file. Automatically generated by parse_version.
- */
-
-#ifndef __VERSION_H__
-#define __VERSION_H__
-
-#define IXNET_NAME \"ixnet.library\"
-#define IXNET_IDSTRING \"ixnet %d.%d [%s] (%d.%d.%d)\"
-#define IXNET_VERSION %d
-#define IXNET_REVISION %d
-#define IXNET_PRIORITY 0
-
-#endif
+ format = "/*\n\
+ * version.h file. Automatically generated by parse_version.\n\
+ */\n\
+\n\
+#ifndef __VERSION_H__\n\
+#define __VERSION_H__\n\
+\n\
+#define IXNET_NAME \"ixnet.library\"\n\
+#define IXNET_IDSTRING \"ixnet %d.%d [%s] (%d.%d.%d)\"\n\
+#define IXNET_VERSION %d\n\
+#define IXNET_REVISION %d\n\
+#define IXNET_PRIORITY 0\n\
+\n\
+#endif\n\
";
tmp[0] = '\0';
@@ -0,0 +1,33 @@
--- ixemul-48.2.orig/library/Makefile.in 2001-09-01 17:16:30.000000000 +0200
+++ ixemul-48.2/library/Makefile.in 2012-08-03 18:50:34.000000000 +0200
@@ -32,9 +32,9 @@
# I *love* GNU make!
define catenate
-/bin/echo -n creating $@...
-/bin/echo -e "$(^:%=#include \"%\"\n)" >$@
-/bin/echo done
+echo -n creating $@...
+echo "$(^:%=#include \"%\"\n)" >$@
+echo done
endef
FLAVOR_CFLAGS = -m$(CPU) -m$(FPU)
@@ -186,7 +186,7 @@
./create_header >$@
create_header: create_header.c $(srcdir)/../include/user.h ixemul.h
- gcc $(CFLAGS) $(INCS) $(OTHER_CFLAGS) $(DEFS) $< -o $@
+ gcc $(CFLAGS) $(INCS) $(DEFS) $< -o $@
chmod u+x $@
ii.o tz.o: version.h
@@ -194,7 +194,7 @@
# Use native compiler, which may not understand some CFLAGS
# So force the defines of CPU and FPU via $DEF_CPU_FPU
parse_version: parse_version.c
- gcc $(CFLAGS) $(OTHER_CFLAGS) $(DEF_CPU_FPU) $(DEFS) $< -o $@
+ gcc $(CFLAGS) $(DEF_CPU_FPU) $(DEFS) $< -o $@
chmod u+x $@
version.h: parse_version $(srcdir)/../version.in
+13
View File
@@ -0,0 +1,13 @@
--- ixemul-48.2.orig/library/ixemul.h 2001-08-21 17:33:24.000000000 +0200
+++ ixemul-48.2/library/ixemul.h 2012-08-03 18:58:17.000000000 +0200
@@ -294,8 +294,10 @@
extern int has_68040_or_up;
extern int has_68060_or_up;
+#ifndef AFB_68060
#define AFB_68060 (7)
#define AFF_68060 (1L<<7)
+#endif
#define usetup struct user *u_ptr=getuser(SysBase->ThisTask)
@@ -0,0 +1,60 @@
--- ixemul-48.2.orig/library/parse_version.c 2001-08-21 17:33:32.000000000 +0200
+++ ixemul-48.2/library/parse_version.c 2012-08-03 18:49:15.000000000 +0200
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
int main(int argc, char **argv)
{
@@ -23,28 +24,28 @@
}
fscanf(f, "%d.%d,%d.%d.%d", &major, &minor, &day, &month, &year);
fclose(f);
- format = "/*
- * version.h file. Automatically generated by parse_version.
- */
-
-#ifndef __VERSION_H__
-#define __VERSION_H__
-
-/* Commodities.h defines IX_VERSION too, so wait for our defines
- to come last, and undef the sucker now! */
-#undef IX_VERSION
-
-#define IX_NAME \"ixemul.library\"
-#ifdef TRACE_LIBRARY
-#define IX_IDSTRING \"ixemul %d.%d [trace, %s] (%d.%d.%d)\"
-#else
-#define IX_IDSTRING \"ixemul %d.%d [%s] (%d.%d.%d)\"
-#endif
-#define IX_VERSION %d
-#define IX_REVISION %d
-#define IX_PRIORITY 0
-
-#endif
+ format = "/*\n\
+ * version.h file. Automatically generated by parse_version.\n\
+ */\n\
+\n\
+#ifndef __VERSION_H__\n\
+#define __VERSION_H__\n\
+\n\
+/* Commodities.h defines IX_VERSION too, so wait for our defines\n\
+ to come last, and undef the sucker now! */\n\
+#undef IX_VERSION\n\
+\n\
+#define IX_NAME \"ixemul.library\"\n\
+#ifdef TRACE_LIBRARY\n\
+#define IX_IDSTRING \"ixemul %d.%d [trace, %s] (%d.%d.%d)\"\n\
+#else\n\
+#define IX_IDSTRING \"ixemul %d.%d [%s] (%d.%d.%d)\"\n\
+#endif\n\
+#define IX_VERSION %d\n\
+#define IX_REVISION %d\n\
+#define IX_PRIORITY 0\n\
+\n\
+#endif\n\
";
tmp[0] = '\0';
@@ -0,0 +1,15 @@
--- ixemul-48.2.orig/stdio/Makefile.in 2001-08-21 17:36:24.000000000 +0200
+++ ixemul-48.2/stdio/Makefile.in 2012-08-03 18:46:52.000000000 +0200
@@ -32,9 +32,9 @@
# I *love* GNU make!
define catenate
-/bin/echo -n creating $@...
-/bin/echo -e "$(^:%=#include \"%\"\n)" >$@
-/bin/echo done
+echo -n creating $@...
+echo "$(^:%=#include \"%\"\n)" >$@
+echo done
endef
FLAVOR_CFLAGS = -m$(CPU) -m$(FPU)
@@ -0,0 +1,15 @@
--- ixemul-48.2.orig/stdlib/Makefile.in 2001-08-21 17:36:24.000000000 +0200
+++ ixemul-48.2/stdlib/Makefile.in 2012-08-03 18:46:18.000000000 +0200
@@ -32,9 +32,9 @@
# I *love* GNU make!
define catenate
-/bin/echo -n creating $@...
-/bin/echo -e "$(^:%=#include \"%\"\n)" >$@
-/bin/echo done
+echo -n creating $@...
+echo "$(^:%=#include \"%\"\n)" >$@
+echo done
endef
FLAVOR_CFLAGS = -m$(CPU) -m$(FPU)
@@ -0,0 +1,15 @@
--- ixemul-48.2.orig/string/Makefile.in 2001-08-21 17:36:26.000000000 +0200
+++ ixemul-48.2/string/Makefile.in 2012-08-03 18:45:47.000000000 +0200
@@ -32,9 +32,9 @@
# I *love* GNU make!
define catenate
-/bin/echo -n creating $@...
-/bin/echo -e "$(^:%=#include \"%\"\n)" >$@
-/bin/echo done
+echo -n creating $@...
+echo "$(^:%=#include \"%\"\n)" >$@
+echo done
endef
FLAVOR_CFLAGS = -m$(CPU) -m$(FPU)
@@ -0,0 +1,20 @@
--- ixemul-48.2.orig/utils/Makefile.in 2001-08-21 17:36:26.000000000 +0200
+++ ixemul-48.2/utils/Makefile.in 2012-08-03 19:25:28.000000000 +0200
@@ -89,7 +89,7 @@
$(CC) $(OUR_LDFLAGS) -o $@ $^ $(LIBS)
ixpipe-handler: ixpipe-handler.o
- $(CC) -nostdlib -o $@ $? -lc
+ $(CC) $(OUR_LDFLAGS) -nostdlib -o $@ $? -lc
ipcs: ipcs.o
$(CC) $(OUR_LDFLAGS) -o $@ $^ $(LIBS)
@@ -115,7 +115,7 @@
zoneinfo/GMT: zic yearistype
rm -rf zoneinfo
mkdir zoneinfo
- rootme=`pwd` ; cd $(srcdir)/databases ; \
+ -rootme=`pwd` ; cd $(srcdir)/databases ; \
$$rootme/zic -d $$rootme/zoneinfo -y "sh $$rootme/yearistype" -p $(POSIXRULES) $(DATABASES)
version.h: ../library/parse_version.c ../version.in
@@ -0,0 +1,11 @@
--- ixemul-48.2.orig/utils/ixtimezone.c 1997-08-20 20:31:06.000000000 +0200
+++ ixemul-48.2/utils/ixtimezone.c 2012-08-03 18:52:58.000000000 +0200
@@ -35,7 +35,7 @@
unsigned char flags;
} ixtime;
-struct Node *BattClockBase;
+struct Library *BattClockBase;
char VERSION[] = "\000$VER: ixtimezone 1.0 (10.11.95)";