[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Missing clobbered register in gemlib
Alan Hourihane wrote:
I planned to keep that changes, and to add a symlink like this:
libgem16.a -> mshort/libgem.a
Thus we get both the standard GCC behaviour, and the traditional -lgem16.
What do you think ?
Sounds good.
Here is my patch for the lib directory to fix the bad makefile changes from
my previous one.
This patch fixes only the GemLib makefiles. I didn't change stuff for cflib
and gemma, because I didn't broke them, as I have never worked on them. I
plan to enable ColdFire support for them one day.
Basically, this patch adds 2 new variables in CONFIGVARS to enable the build
of the 68020-60 and ColdFire libraries. They are disabled by default, so no
one should see any difference. When they are enabled, the makefile builds
the full set of libraries (6 versions !), including the mshort ones since
they are required by XaAES.
As I explained in my previous message, I replaced libgem16.a by a symlink to
keep compatibility.
New makefiles should use -lgem with the correct multilib options, like any
other library.
I have tested it as much as I can, it seems there is no problem.
"make install" works well in any case.
I'm not familiar with the process of building an official release of gemlib
(rpm ? zip ?), maybe some further changes should be added for that. This
will have to be checked later.
Maintainers, please commit this patch with the following CVS description:
- Fixed the makefiles due to the bad changes in the previous patch.
- Added new variables to CONFIGVARS to build 68020-60 and ColdFire versions
of GemLib. They are named WITH_020_LIB and WITH_V4E_LIB, and set to "no" by
default.
- Moved libgem16.a to mshort/libgem.a to follow the standard GCC naming
rules. Added a symlink to keep the compatibility.
Patch provided by Vincent Riviere.
--
Vincent Rivière
diff -aurN -x CVS lib.orig/CONFIGVARS lib/CONFIGVARS
--- lib.orig/CONFIGVARS 2003-02-28 21:46:36.000000000 +0100
+++ lib/CONFIGVARS 2009-12-20 19:48:05.796875000 +0100
@@ -5,6 +5,12 @@
CROSS = no
#
+# build alternate libraries for processor variants
+#
+WITH_020_LIB = no
+WITH_V4E_LIB = no
+
+#
# target and host compiler
#
ifeq ($(CROSS),yes)
diff -aurN -x CVS lib.orig/gemlib/BINFILES lib/gemlib/BINFILES
--- lib.orig/gemlib/BINFILES 2009-12-11 13:15:11.000000000 +0100
+++ lib/gemlib/BINFILES 2009-12-20 19:30:01.406250000 +0100
@@ -1,4 +1,12 @@
# This file gets included by the Makefile in this directory to determine
# the files that should go only into binary distributions.
-BINFILES = libgem.a libgem16.a libgem020.a libgemv4e.a
+BINFILES = libgem.a libgem16.a
+
+ifeq ($(WITH_020_LIB),yes)
+BINFILES += libgem020.a libgem02016.a
+endif
+
+ifeq ($(WITH_V4E_LIB),yes)
+BINFILES += libgemv4e.a libgemv4e16.a
+endif
diff -aurN -x CVS lib.orig/gemlib/Makefile lib/gemlib/Makefile
--- lib.orig/gemlib/Makefile 2009-12-11 13:15:11.000000000 +0100
+++ lib/gemlib/Makefile 2009-12-20 19:54:33.015625000 +0100
@@ -26,8 +26,17 @@
GENFILES += mt_gem.h Doxyfile gemlib.spec
GENFILES += html
+ALL_LIBS = normal mshort
-libs: normal mshort m68020 m5475
+ifeq ($(WITH_020_LIB),yes)
+ALL_LIBS += m68020 m68020mshort
+endif
+
+ifeq ($(WITH_V4E_LIB),yes)
+ALL_LIBS += m5475 m5475mshort
+endif
+
+libs: $(ALL_LIBS)
normal:
$(MAKE) libgem.a TARGET=""
@@ -38,9 +47,15 @@
m68020:
$(MAKE) libgem020.a TARGET="020"
+m68020mshort:
+ $(MAKE) libgem02016.a TARGET="02016"
+
m5475:
$(MAKE) libgemv4e.a TARGET="v4e"
+m5475mshort:
+ $(MAKE) libgemv4e16.a TARGET="v4e16"
+
.PHONY: doc
ChangeLog:
@@ -131,10 +146,19 @@
install -m 644 libgem.a $(PREFIX)/lib/libgem.a
install -m 755 -d $(PREFIX)/lib/mshort
install -m 644 libgem16.a $(PREFIX)/lib/mshort/libgem.a
+ ln -s mshort/libgem.a $(PREFIX)/lib/libgem16.a
+ifeq ($(WITH_020_LIB),yes)
install -m 755 -d $(PREFIX)/lib/m68020-60
install -m 644 libgem020.a $(PREFIX)/lib/m68020-60/libgem.a
+ install -m 755 -d $(PREFIX)/lib/m68020-60/mshort
+ install -m 644 libgem02016.a $(PREFIX)/lib/m68020-60/mshort/libgem.a
+endif
+ifeq ($(WITH_V4E_LIB),yes)
install -m 755 -d $(PREFIX)/lib/m5475
install -m 644 libgemv4e.a $(PREFIX)/lib/m5475/libgem.a
+ install -m 755 -d $(PREFIX)/lib/m5475/mshort
+ install -m 644 libgemv4e16.a $(PREFIX)/lib/m5475/mshort/libgem.a
+endif
install -m 755 -d $(PREFIX)/include
install -m 644 gem.h $(PREFIX)/include
install -m 644 gemx.h $(PREFIX)/include
diff -aurN -x CVS lib.orig/gemlib/Makefile.objs lib/gemlib/Makefile.objs
--- lib.orig/gemlib/Makefile.objs 2009-12-11 13:15:11.000000000 +0100
+++ lib/gemlib/Makefile.objs 2009-12-20 19:22:56.750000000 +0100
@@ -29,10 +29,18 @@
GENERAL += -m68020-60
endif
+ifeq ($(TARGET),02016)
+GENERAL += -m68020-60 -mshort
+endif
+
ifeq ($(TARGET),v4e)
GENERAL += -mcpu=5475
endif
+ifeq ($(TARGET),v4e16)
+GENERAL += -mcpu=5475 -mshort
+endif
+
# default definitions
OBJS = $(COBJS:.c=.o) $(SOBJS:.S=.o)