From mint-bounce@lists.fishpool.fi Sun Dec 20 18:11:59 2009 Message-ID: <4B2EAEBF.4010608@freesbee.fr> Date: Mon, 21 Dec 2009 00:09:51 +0100 From: =?ISO-8859-1?Q?Vincent_Rivi=E8re?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: mint@lists.fishpool.fi Subject: Re: [MiNT] Missing clobbered register in gemlib References: <20091210202514.b9397305.mandin.patrice@orange.fr> <4B2234E7.7070006@freesbee.fr> <1260533779.20336.1191.camel@jetpack.demon.co.uk> <4B2E123D.6090301@freesbee.fr> <1261312552.16683.10.camel@jetpack.demon.co.uk> In-Reply-To: <1261312552.16683.10.camel@jetpack.demon.co.uk> Content-Type: multipart/mixed; boundary="------------020002030201040906070604" X-Antivirus: avast! (VPS 091220-1, 20/12/2009), Outbound message X-Antivirus-Status: Clean X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: vincent.riviere@freesbee.fr Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: This is a multi-part message in MIME format. --------------020002030201040906070604 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable 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 -lgem= 16. >> >> What do you think ? > > Sounds good. Here is my patch for the lib directory to fix the bad makefile changes fr= om=20 my previous one. This patch fixes only the GemLib makefiles. I didn't change stuff for cfl= ib=20 and gemma, because I didn't broke them, as I have never worked on them. I= =20 plan to enable ColdFire support for them one day. Basically, this patch adds 2 new variables in CONFIGVARS to enable the bu= ild=20 of the 68020-60 and ColdFire libraries. They are disabled by default, so = no=20 one should see any difference. When they are enabled, the makefile builds= =20 the full set of libraries (6 versions !), including the mshort ones since= =20 they are required by XaAES. As I explained in my previous message, I replaced libgem16.a by a symlink= to=20 keep compatibility. New makefiles should use -lgem with the correct multilib options, like an= y=20 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 geml= ib=20 (rpm ? zip ?), maybe some further changes should be added for that. This=20 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 versio= ns=20 of GemLib. They are named WITH_020_LIB and WITH_V4E_LIB, and set to "no" = by=20 default. - Moved libgem16.a to mshort/libgem.a to follow the standard GCC naming=20 rules. Added a symlink to keep the compatibility. Patch provided by Vincent Riviere. --=20 Vincent Rivi=E8re --------------020002030201040906070604 Content-Type: text/plain; name="libmake.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libmake.patch" 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) --------------020002030201040906070604--