This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [patch] Fix for libgloss/m68k
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: jjohnstn at redhat dot com
- Cc: monaka at monami-software dot com
- Cc: newlib at sources dot redhat dot com
- Date: Mon, 11 Dec 2006 08:19:05 -0800
- Subject: Re: [patch] Fix for libgloss/m68k
Hi,
> Regarding problem 1. I was kind of hoping some m68k experts would pipe
> up. Is there a workaround for the halt instruction? Is there a
> compiler architecture flag that could be checked to see if the halt
> insn is available? (similar to the situation we recently ran into with
> the ARM bx instruction).
A patch I posted a few days ago
http://sources.redhat.com/ml/newlib/2006/msg00965.html
fixes the problem. Specifically, I have libgloss/m68k/configure check
for __mcoldfire__. If that is defined, then I build the ColdFire
portion of libgloss/m68k. In terms of actual script, I do something
like:
AC_MSG_CHECKING([target cpu family])
DO=m68k
AC_PREPROC_IFELSE([#ifndef __mcoldfire__
#error we are not coldfire
#endif],
DO="cf",)
AC_MSG_RESULT($DO)
AC_SUBST(DO)
And then I use DO in Makefile.in to build an appropriate portion of
libgloss/m68k.
This approach should fix the problem you are having. Thoughts?
Thanks,
Kazu Hirata