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

Re: [MiNT] MiNTLib for ColdFire



I made some investigation, it appears that ColdFire support can be added in the MiNTLib with a reasonable amount of work.

- 3 C headers require minor changes in inline assembly
- there are 16 assembler sources, they all require some minor patching.

The attached patch adds support in the Makefiles for building the ColdFire variant called "libv4e". That build is disabled by default, so it will not break anything.

I will provide further patches for the sources.

If you feel that we should continue that way, please commit this patch.

--
Vincent Rivière
diff -aurN mintlib-CVS-20090430/ChangeLog mintlib-CVS-20090430-v4e/ChangeLog
--- mintlib-CVS-20090430/ChangeLog	2009-04-30 23:58:19.234375000 +0200
+++ mintlib-CVS-20090430-v4e/ChangeLog	2009-05-01 00:15:57.375000000 +0200
@@ -1,3 +1,15 @@
+2009-05-01 Friday 09:18  Vincent Riviere <vincent.riviere@freesbee.fr>
+
+	* Makefile, configvars, libinstall, libv4e/.cvsignore, libv4e/BINFILES,
+	libv4e/EXTRAFILES, libv4e/MISCFILES, libv4e/Makefile, libv4e/README,
+	libv4e/SRCFILES
+
+	Added build support for ColdFire V4e libraries.
+	The new variant is called libv4e, and is built with the -mcfv4e option.
+	Since that option is only available in GCC 4.x and the sources are not
+	yet compilable for ColdFire, the build of that library is currently
+	disabled by default.
+	
 2008-04-29 Tuesday 08:01  Frank Naumann <fnaumann@freemint.de>
 
 	* configvars, mintlib.spec, mintlib.spec.in:
diff -aurN mintlib-CVS-20090430/Makefile mintlib-CVS-20090430-v4e/Makefile
--- mintlib-CVS-20090430/Makefile	2009-04-30 23:58:20.343750000 +0200
+++ mintlib-CVS-20090430-v4e/Makefile	2009-04-30 23:58:31.687500000 +0200
@@ -25,7 +25,7 @@
 SUBDIRS = include syscall startup argp 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 = argp conf crypt dirent gmp include lib lib_g lib_p lib020 \
+DIST_SUBDIRS = argp conf crypt dirent gmp include lib lib_g lib_p lib020 libv4e \
   login mintlib misc posix pwdgrp shadow signal socket startup \
   stdiio stdio stdlib string sunrpc syscall sysvipc termios time tz unix
 TEST_SUBDIRS = argp crypt dirent login mintlib misc posix pwdgrp shadow signal \
@@ -43,6 +43,10 @@
   SUBDIRS += lib020
 endif
 
+ifeq ($(WITH_V4E_LIB), yes)
+  SUBDIRS += libv4e
+endif
+
 include $(srcdir)/BINFILES
 include $(srcdir)/SRCFILES
 include $(srcdir)/MISCFILES
diff -aurN mintlib-CVS-20090430/configvars mintlib-CVS-20090430-v4e/configvars
--- mintlib-CVS-20090430/configvars	2009-04-30 23:58:19.265625000 +0200
+++ mintlib-CVS-20090430-v4e/configvars	2009-04-30 23:58:31.687500000 +0200
@@ -25,6 +25,10 @@
 # for m68020 processors.
 WITH_020_LIB=yes
 
+# Uncomment this out if you want extra libraries
+# for ColdFire V4e processors.
+WITH_V4E_LIB=no
+
 # Uncomment this out if you want a debuggable lib lib_g.a.
 WITH_DEBUG_LIB=yes
 
diff -aurN mintlib-CVS-20090430/libinstall mintlib-CVS-20090430-v4e/libinstall
--- mintlib-CVS-20090430/libinstall	2009-04-30 23:58:20.140625000 +0200
+++ mintlib-CVS-20090430-v4e/libinstall	2009-04-30 23:58:31.687500000 +0200
@@ -277,7 +277,7 @@
 {
   echo "Installing libraries."
   $mkinstalldirs $libdir 
-    for type in "" _p _g 020; do
+    for type in "" _p _g 020 v4e; do
     case x$type in
       x020) 
         libsuffix=020
@@ -285,6 +285,12 @@
         libheredir=lib020
         type=
         ;;
+      xv4e)
+        libsuffix=v4e
+        libinstdir=$libdir/mcfv4e
+        libheredir=libv4e
+        type=
+        ;;
       x_p|x_g)
       	libsuffix=
       	libinstdir=$libdir
diff -aurN mintlib-CVS-20090430/libv4e/.cvsignore mintlib-CVS-20090430-v4e/libv4e/.cvsignore
--- mintlib-CVS-20090430/libv4e/.cvsignore	1970-01-01 01:00:00.000000000 +0100
+++ mintlib-CVS-20090430-v4e/libv4e/.cvsignore	2009-04-30 23:58:31.703125000 +0200
@@ -0,0 +1,4 @@
+.deps
+*.o
+*~
+lib*.a
diff -aurN mintlib-CVS-20090430/libv4e/BINFILES mintlib-CVS-20090430-v4e/libv4e/BINFILES
--- mintlib-CVS-20090430/libv4e/BINFILES	1970-01-01 01:00:00.000000000 +0100
+++ mintlib-CVS-20090430-v4e/libv4e/BINFILES	2009-04-30 23:58:31.703125000 +0200
@@ -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
diff -aurN mintlib-CVS-20090430/libv4e/EXTRAFILES mintlib-CVS-20090430-v4e/libv4e/EXTRAFILES
--- mintlib-CVS-20090430/libv4e/EXTRAFILES	1970-01-01 01:00:00.000000000 +0100
+++ mintlib-CVS-20090430-v4e/libv4e/EXTRAFILES	2009-04-30 23:58:31.703125000 +0200
@@ -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 -aurN mintlib-CVS-20090430/libv4e/MISCFILES mintlib-CVS-20090430-v4e/libv4e/MISCFILES
--- mintlib-CVS-20090430/libv4e/MISCFILES	1970-01-01 01:00:00.000000000 +0100
+++ mintlib-CVS-20090430-v4e/libv4e/MISCFILES	2009-04-30 23:58:31.734375000 +0200
@@ -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 -aurN mintlib-CVS-20090430/libv4e/Makefile mintlib-CVS-20090430-v4e/libv4e/Makefile
--- mintlib-CVS-20090430/libv4e/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ mintlib-CVS-20090430-v4e/libv4e/Makefile	2009-04-30 23:58:31.734375000 +0200
@@ -0,0 +1,23 @@
+# libv4e/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 = libv4e
+
+libsize = v4e
+instdir = mcfv4e
+cflags = -mcfv4e
+
+default: all
+
+include $(top_srcdir)/buildrules
diff -aurN mintlib-CVS-20090430/libv4e/README mintlib-CVS-20090430-v4e/libv4e/README
--- mintlib-CVS-20090430/libv4e/README	1970-01-01 01:00:00.000000000 +0100
+++ mintlib-CVS-20090430-v4e/libv4e/README	2009-04-30 23:58:31.734375000 +0200
@@ -0,0 +1,4 @@
+This directory contains the libs for the ColdFire V4e from the MiNTLib suite.
+
+Please install them in $prefix/lib/mcfv4e where $prefix is either /usr
+or /usr/local.
diff -aurN mintlib-CVS-20090430/libv4e/SRCFILES mintlib-CVS-20090430-v4e/libv4e/SRCFILES
--- mintlib-CVS-20090430/libv4e/SRCFILES	1970-01-01 01:00:00.000000000 +0100
+++ mintlib-CVS-20090430-v4e/libv4e/SRCFILES	2009-04-30 23:58:31.734375000 +0200
@@ -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 = 
+