invalid multilib selection on m68k/coldfire+msoft-float

Joel Sherrill joel.sherrill at OARcorp.com
Mon Apr 17 13:32:08 UTC 2000


GCC Version: 2.95.2
Target:      m68k-rtems (equivalent to m68k-elf)
             behavior is probably also in m68k-coff and m68k-aout.

Test file is main.c:

int main(int argc, char **argv)
{
  strlen( "invoke something in libc" );
}

Description:

Invoking gcc with -mXXX -msoft-float where -mXXX is a CPU model
without floating point support results in the wrong library
being linked against.  The following illustrates this on the
m68000

bash-2.03$ m68k-rtems-gcc -m68000 -msoft-float main.c -Wl,-t
/opt/rtems/m68k-rtems/bin/ld: warning: cannot find entry symbol _start;
defaulting to 80000074
/opt/rtems/m68k-rtems/bin/ld: mode m68kelf
/opt/rtems/m68k-rtems/lib/crt0.o
/tmp/ccKGcp5T.o
(/opt/rtems/m68k-rtems/lib/libc.a)strlen.o

Notice that the libc.a is the default m68020+hardware floating point
one.

If you drop the -msoft-float, then it selects the correct library.

bash-2.03$ m68k-rtems-gcc -m68000  main.c -Wl,-t
/opt/rtems/m68k-rtems/bin/ld: warning: cannot find entry symbol _start;
defaulting to 80000074
/opt/rtems/m68k-rtems/bin/ld: mode m68kelf
/opt/rtems/m68k-rtems/lib/m68000/crt0.o
/tmp/cc0Weu0t.o
(/opt/rtems/m68k-rtems/lib/m68000/libc.a)strlen.o


As best I can tell, the -m68000 flag can be replaced with any
68000-class CPU 
flag which results in the following combinations also linking against
the
wrong library

-mc68000
-m5200
-m68302
-m68332
-mcpu32

--
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list