[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] Some mintlib patches



Hi,

here are is a patch for mintlib configuration I use, I think it's useful for others, too:

- set premilitary stack to 64KB (instead of 1K) which makes gcc linking happy again - move MINKEEP to separate .h file -- now in lib.h it affects half of mintlib when I change that value..
- add 060 support to mintlib
- add rm -rf .deps to clean target -- .deps directory isn't deleted in subdirs (however, a lot of files still remain -- output for gensyscall, features.h, pars.h, ... -- I'm not sure what is the right way to delete them)

--
MiKRO / Mystic Bytes
http://mikro.atari.org

diff -ruN mintlib/Makefile mintlib-changed-clean/Makefile
--- mintlib/Makefile	Wed Sep 15 08:23:58 2004
+++ mintlib-changed-clean/Makefile	Wed Feb 20 21:49:56 2008
@@ -25,7 +25,7 @@
 SUBDIRS = include syscall startup conf crypt dirent gmp login mintlib misc \
   posix pwdgrp shadow signal socket stdiio stdio stdlib string sysvipc \
   termios time unix lib sunrpc tz
-DIST_SUBDIRS = conf crypt dirent gmp include lib lib_g lib_p lib020 \
+DIST_SUBDIRS = conf crypt dirent gmp include lib lib_g lib_p lib020 lib060 \
   login mintlib misc posix pwdgrp shadow signal socket startup \
   stdiio stdio stdlib string sunrpc syscall sysvipc termios time tz unix
 TEST_SUBDIRS = crypt dirent login mintlib misc posix pwdgrp shadow signal \
@@ -43,6 +43,10 @@
   SUBDIRS += lib020
 endif
 
+ifeq ($(WITH_060_LIB), yes)
+  SUBDIRS += lib060
+endif
+
 include $(srcdir)/BINFILES
 include $(srcdir)/SRCFILES
 include $(srcdir)/MISCFILES
@@ -68,6 +72,8 @@
 
 clean: clean-recursive
 	rm -rf .deps includepath CFILES
 
 bakclean: bakclean-recursive
 
diff -ruN mintlib/configvars mintlib-changed-clean/configvars
--- mintlib/configvars	Sat Dec  3 12:29:52 2005
+++ mintlib-changed-clean/configvars	Sun Feb 17 16:58:16 2008
@@ -22,9 +22,13 @@
 endif
 
 # Uncomment this out if you want extra libraries that are optimized
-# for m68020 processors.
+# for m68020-60 processors.
 WITH_020_LIB=yes
 
+# Uncomment this out if you want extra libraries that are optimized
+# for m68060 processors.
+WITH_060_LIB=yes
+
 # Uncomment this out if you want a debuggable lib lib_g.a.
 WITH_DEBUG_LIB=yes
 
diff -ruN mintlib/lib060/BINFILES mintlib-changed-clean/lib060/BINFILES
--- mintlib/lib060/BINFILES	Thu Jan  1 01:00:00 1970
+++ mintlib-changed-clean/lib060/BINFILES	Thu Oct 12 02:14:44 2000
@@ -0,0 +1,4 @@
+# This file gets included by the Makefile in this directory to determine
+# the files that should go only into binary distributions.
+
+BINFILES = libc.a libiio.a libsocket.a
diff -ruN mintlib/lib060/EXTRAFILES mintlib-changed-clean/lib060/EXTRAFILES
--- mintlib/lib060/EXTRAFILES	Thu Jan  1 01:00:00 1970
+++ mintlib-changed-clean/lib060/EXTRAFILES	Thu Oct 12 02:14:44 2000
@@ -0,0 +1,4 @@
+# This file gets included by the Makefile in this directory to determine
+# the files that should go only into source distributions.
+
+SRCFILES += BINFILES EXTRAFILES Makefile MISCFILES SRCFILES 
diff -ruN mintlib/lib060/MISCFILES mintlib-changed-clean/lib060/MISCFILES
--- mintlib/lib060/MISCFILES	Thu Jan  1 01:00:00 1970
+++ mintlib-changed-clean/lib060/MISCFILES	Thu Oct 12 02:14:44 2000
@@ -0,0 +1,4 @@
+# This file gets included by the Makefile in this directory to determine
+# the files that should go both into source and binary distributions.
+
+MISCFILES = README
diff -ruN mintlib/lib060/Makefile mintlib-changed-clean/lib060/Makefile
--- mintlib/lib060/Makefile	Thu Jan  1 01:00:00 1970
+++ mintlib-changed-clean/lib060/Makefile	Sun Feb 17 17:09:02 2008
@@ -0,0 +1,23 @@
+# lib020/Makefile -- MiNTLib.
+# Copyright (C) 2000 Guido Flohr <guido@freemint.de>
+#
+# This file is part of the MiNTLib project, and may only be used
+# modified and distributed under the terms of the MiNTLib project
+# license, COPYMINT.  By continuing to use, modify, or distribute
+# this file you indicate that you have read the license and
+# understand and accept it fully.
+
+SHELL = /bin/sh
+
+srcdir = .
+top_srcdir = ..
+csrcdir = $(top_srcdir)/src
+subdir = lib060
+
+libsize = 060
+instdir = m68060
+cflags = -m68060
+
+default: all
+
+include $(top_srcdir)/buildrules
diff -ruN mintlib/lib060/README mintlib-changed-clean/lib060/README
--- mintlib/lib060/README	Thu Jan  1 01:00:00 1970
+++ mintlib-changed-clean/lib060/README	Wed Feb 20 21:56:52 2008
@@ -0,0 +1,4 @@
+This directory contains the libs for the M68060 from the MiNTLib suite.
+
+Please install them in $prefix/lib/m68060 where $prefix is either /usr
+or /usr/local.
diff -ruN mintlib/lib060/SRCFILES mintlib-changed-clean/lib060/SRCFILES
--- mintlib/lib060/SRCFILES	Thu Jan  1 01:00:00 1970
+++ mintlib-changed-clean/lib060/SRCFILES	Thu Oct 12 02:14:44 2000
@@ -0,0 +1,5 @@
+# This file gets included by the Makefile in this directory to determine
+# the files that should go only into source distributions.
+
+SRCFILES = 
+
diff -ruN mintlib/libinstall mintlib-changed-clean/libinstall
--- mintlib/libinstall	Fri Apr 13 15:19:14 2001
+++ mintlib-changed-clean/libinstall	Sun Feb 17 17:03:00 2008
@@ -277,12 +277,18 @@
 {
   echo "Installing libraries."
   $mkinstalldirs $libdir 
-    for type in "" _p _g 020; do
+    for type in "" _p _g 020 060; do
     case x$type in
       x020) 
         libsuffix=020
         libinstdir=$libdir/m68020-60
         libheredir=lib020
+        type=
+        ;;
+      x060) 
+        libsuffix=060
+        libinstdir=$libdir/m68060
+        libheredir=lib060
         type=
         ;;
       x_p|x_g)
diff -ruN mintlib/mintlib/crtinit.c mintlib-changed-clean/mintlib/crtinit.c
--- mintlib/mintlib/crtinit.c	Tue Jan 22 10:55:42 2008
+++ mintlib-changed-clean/mintlib/crtinit.c	Mon Feb 18 00:39:30 2008
@@ -74,6 +74,7 @@
 #include <support.h>
 #include <string.h>
 #include "lib.h"
+#include "stksiz.h"
 
 
 #define isspace(c) ((c) == ' '||(c) == '\t')
diff -ruN mintlib/mintlib/lib.h mintlib-changed-clean/mintlib/lib.h
--- mintlib/mintlib/lib.h	Tue Jan 22 10:55:42 2008
+++ mintlib-changed-clean/mintlib/lib.h	Mon Feb 18 00:22:48 2008
@@ -153,10 +153,4 @@
 
 int __do_chown16 (const char *_name, uid_t uid, gid_t gid, int follow_links);
 
-
-/* definitions needed in mintlib/crtinit.c and mintlib/stksize.c */
-
-#define MINFREE	(8L * 1024L)		/* free at least this much mem on top */
-#define MINKEEP (64L * 1024L)		/* keep at least this much mem on stack */
-
 #endif /* _LIB_H */
diff -ruN mintlib/mintlib/stksiz.c mintlib-changed-clean/mintlib/stksiz.c
--- mintlib/mintlib/stksiz.c	Tue Jan 22 10:55:42 2008
+++ mintlib-changed-clean/mintlib/stksiz.c	Mon Feb 18 00:23:58 2008
@@ -1,4 +1,4 @@
-#include "lib.h"
+#include "stksiz.h"
 
 /* With GCC 4, zero initialised data ends up in the BSS. We don't want
  * that to happen for _stksiz so we declare it to MINKEEP which is what
diff -ruN mintlib/mintlib/stksiz.h mintlib-changed-clean/mintlib/stksiz.h
--- mintlib/mintlib/stksiz.h	Thu Jan  1 01:00:00 1970
+++ mintlib-changed-clean/mintlib/stksiz.h	Mon Feb 18 00:25:22 2008
@@ -0,0 +1,9 @@
+#ifndef _STKSIZ_H
+#define _STKSIZ_H
+
+/* definitions needed in mintlib/crtinit.c and mintlib/stksize.c */
+
+#define MINFREE	(8L * 1024L)		/* free at least this much mem on top */
+#define MINKEEP (64L * 1024L)		/* keep at least this much mem on stack */
+
+#endif /* _STKSIZ_H */
diff -ruN mintlib/mintlib.spec mintlib-changed-clean/mintlib.spec
--- mintlib/mintlib.spec	Mon Jul 12 09:18:06 2004
+++ mintlib-changed-clean/mintlib.spec	Sun Feb 17 17:04:42 2008
@@ -580,6 +580,14 @@
 %{_prefix}%{crossprefix}/lib/m68020-60/librpcsvc020.a
 %{_prefix}%{crossprefix}/lib/m68020-60/libsocket.a
 %{_prefix}%{crossprefix}/lib/m68020-60/libsocket020.a
+%{_prefix}%{crossprefix}/lib/m68060/libc.a
+%{_prefix}%{crossprefix}/lib/m68060/libc060.a
+%{_prefix}%{crossprefix}/lib/m68060/libiio.a
+%{_prefix}%{crossprefix}/lib/m68060/libiio060.a
+%{_prefix}%{crossprefix}/lib/m68060/librpcsvc.a
+%{_prefix}%{crossprefix}/lib/m68060/librpcsvc060.a
+%{_prefix}%{crossprefix}/lib/m68060/libsocket.a
+%{_prefix}%{crossprefix}/lib/m68060/libsocket060.a
 
 %files debug
 %defattr(-,root,root)
diff -ruN mintlib/mintlib.spec.in mintlib-changed-clean/mintlib.spec.in
--- mintlib/mintlib.spec.in	Fri Mar 14 10:22:22 2003
+++ mintlib-changed-clean/mintlib.spec.in	Sun Feb 17 17:06:00 2008
@@ -580,6 +580,14 @@
 %{_prefix}%{crossprefix}/lib/m68020-60/librpcsvc020.a
 %{_prefix}%{crossprefix}/lib/m68020-60/libsocket.a
 %{_prefix}%{crossprefix}/lib/m68020-60/libsocket020.a
+%{_prefix}%{crossprefix}/lib/m68060/libc.a
+%{_prefix}%{crossprefix}/lib/m68060/libc060.a
+%{_prefix}%{crossprefix}/lib/m68060/libiio.a
+%{_prefix}%{crossprefix}/lib/m68060/libiio060.a
+%{_prefix}%{crossprefix}/lib/m68060/librpcsvc.a
+%{_prefix}%{crossprefix}/lib/m68060/librpcsvc060.a
+%{_prefix}%{crossprefix}/lib/m68060/libsocket.a
+%{_prefix}%{crossprefix}/lib/m68060/libsocket060.a
 
 %files debug
 %defattr(-,root,root)
diff -ruN mintlib/rules mintlib-changed-clean/rules
--- mintlib/rules	Tue Jan 22 10:34:06 2008
+++ mintlib-changed-clean/rules	Wed Feb 20 20:59:20 2008
@@ -19,8 +19,9 @@
 
 clean:
 	rm -f *.o lib*.a *.tmp
-	rm -f core report nohup.out errlog includepath
+	rm -f core report nohup.out errlog
 	rm -f foobar foo bar baz junk schrott muell
+	rm -rf .deps 
 
 install: all-here install-include install-lib install-man \
 install-recursive
diff -ruN mintlib/startup/crt0.S mintlib-changed-clean/startup/crt0.S
--- mintlib/startup/crt0.S	Tue Jan 22 10:55:42 2008
+++ mintlib-changed-clean/startup/crt0.S	Mon Feb 18 00:22:04 2008
@@ -65,7 +65,7 @@
 	movel	a0, Base	| save it
 	movel	a0@(0x18), d0	| get address of BSS segment
 	addl	a0@(0x1c), d0	| add length of BSS segment
-	addl	#1024, d0	| add length of early stack
+	addl	#65536, d0	| add length of early stack
 	andb	#0b11111100, d0	| align on long boundary
 	movel	d0, sp		| set stack (temporarily)
 	jmp	__crtinit	| in crtinit.c