Bug 50980 - arm-rtems multilib not matching for -mfpu=vfp -mfloat-abi=soft
Summary: arm-rtems multilib not matching for -mfpu=vfp -mfloat-abi=soft
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-03 14:19 UTC by Joel Sherrill
Modified: 2011-11-04 15:22 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Sherrill 2011-11-03 14:19:05 UTC
This is a regression from 4.6 and older.

GCC Revision: Thu Nov  3 12:25:34 UTC 2011 (revision 180821)

The compiler builds and installs fine.  But a multilib mismatch has crept in.  
This worked in 4.6 and older.  The test program is a minimal "main() {}"

arm-rtems4.11-gcc -mstructure-size-boundary=8 -mcpu=arm920 -mfpu=vfp \
   -mfloat-abi=soft -O2 -g m.c

Now it gives this error:

/users/joel/test-gcc/install-svn/lib/gcc/arm-rtems4.11/4.7.0/../../../../arm-rtems4.11/bin/ld: error: /tmp/ccNtArTU.o uses VFP instructions, whereas a.out does not

Adding -v it is easy to see that it is not using the "vfp" 
multilib like it was in 4.6.2

4.6.2============================
/opt/rtems-4.11/libexec/gcc/arm-rtems4.11/4.6.2/collect2 -X /opt/rtems-4.11/lib/gcc/arm-rtems4.11/4.6.2/../../../../arm-rtems4.11/lib/vfp/crt0.o -L/opt/rtems-4.11/lib/gcc/arm-rtems4.11/4.6.2/vfp -L/opt/rtems-4.11/lib/gcc/arm-rtems4.11/4.6.2/../../../../arm-rtems4.11/lib/vfp -L/opt/rtems-4.11/lib/gcc/arm-rtems4.11/4.6.2 -L/opt/rtems-4.11/lib/gcc/arm-rtems4.11/4.6.2/../../../../arm-rtems4.11/lib /tmp/ccMcThnp.o -lgcc -lg -lc -lgcc
===============================

4.7-pre===========================
/users/joel/test-gcc/install-svn/libexec/gcc/arm-rtems4.11/4.7.0/collect2 -X /users/joel/test-gcc/install-svn/lib/gcc/arm-rtems4.11/4.7.0/../../../../arm-rtems4.11/lib/crt0.o -L/users/joel/test-gcc/install-svn/lib/gcc/arm-rtems4.11/4.7.0 -L/users/joel/test-gcc/install-svn/lib/gcc/arm-rtems4.11/4.7.0/../../../../arm-rtems4.11/lib /tmp/ccxFgIuB.o -lgcc -lg -lc -lgcc
===============================
Comment 1 Joel Sherrill 2011-11-04 13:27:12 UTC
Sebastian Huber posted http://gcc.gnu.org/ml/gcc-patches/2011-11/msg00500.html and I have been using it successfully.  A variant of this has been used for months with the shipping RTEMS 4.6 toolchains.
Comment 2 Joel Sherrill 2011-11-04 15:22:11 UTC
Author: joel
Date: Fri Nov  4 15:22:06 2011
New Revision: 180959

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180959
Log:
2011-11-04	Thomas Doerfler <thomas.doerfler@embedded-brains.de>

	PR target/50980
	* config/arm/rtems-elf.h, config/arm/t-rtems: Add optional
	support for VFP floating point model.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/arm/rtems-elf.h
    trunk/gcc/config/arm/t-rtems
Comment 3 Joel Sherrill 2011-11-04 15:22:42 UTC
Committed patch resolves this.