This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Building glibc for a mult-lib --target=m68k-linux
- From: Peter Barada <pbarada at mail dot wm dot sps dot mot dot com>
- To: rz at linux-m68k dot org
- Cc: Peter dot Barada at motorola dot com, howarth at bromo dot med dot uc dot edu, gcc at gcc dot gnu dot org
- Date: Fri, 23 Aug 2002 11:42:59 -0400
- Subject: Re: Building glibc for a mult-lib --target=m68k-linux
- References: <200208221923.g7MJNeX05448@hyper.wm.sps.mot.com> <20020823112644.B233@linux-m68k.org>
>this is not only a gcc isssue. For m68k-linux and v4e you will not
>only need a distinct set of libraries, but most likely also all application
>binaries? The easiest thing to do is to configure and build glibc for
>both targets separately.
Yes, that is the realization that I'm coming to. I'm not sure if I
want to attempt playing with CFLAGS= on the glibc configure line(I
already found out that CFLAGS has to include at least -O or glibc
won't configure correctly), or hatchet up gcc/config/m68k/linux.h to
make v4e the default. Right now I'm just trying to get glibc to build if
__mc68000 and __HAVE_68881 are not defined since these symbols are
used to key off lots of things that ColdFire doesn't support (dbra,
divll, 68881 fpu functions, etc).
>For m68k-linux I am thinking about multi-libing some gcc libraries.
>libgcc needs 68020/060 variants to avoid the emulation 32x32->64 mul/div
>instructions on the 68060.
>I assume those insn's aren't used at all in libstdc++ so there is no need
>to multilib that, but how about the java libs?
I'm not sure about other languages, but here's the t-linux I used to
create the c/c++ variants of libgcc/libstdc++:
# start m68k/t-linux
LIB1ASMSRC = m68k/lb1sf68.asm
LIB1ASMFUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
_double _float _floatex \
_eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
_eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
LIB2FUNCS_EXTRA = fpgnulib.c xfgnulib.c
fpgnulib.c: $(srcdir)/config/m68k/fpgnulib.c
cp $(srcdir)/config/m68k/fpgnulib.c fpgnulib.c
xfgnulib.c: $(srcdir)/config/m68k/fpgnulib.c
echo '#define EXTFLOAT' > xfgnulib.c
cat $(srcdir)/config/m68k/fpgnulib.c >> xfgnulib.c
# On GNU/Linux we can print long double
ENQUIRE_CFLAGS = -DNO_MEM -O0
MULTILIB_OPTIONS = m68020/m68040/m68060/ m68881
MULTILIB_DIRNAMES =
MULTILIB_MATCHES = m68020=mc68020
MULTILIB_EXCEPTIONS = m68040/m68881 m68060/m68881
# end m68k/t-linux
This will build variants for m68020 m68020/m68881 m68040 m68060
--
Peter Barada Peter.Barada@motorola.com
Wizard 781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)