ext Daniel Jacobowitz wrote:
On Tue, Oct 13, 2009 at 11:28:07AM +0300, Juha Kallioinen wrote:Hello, I've downloaded this version of the compiler: arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 I'm seeing different behavior with gcc and g++ when using a specs file. It looks like if I define the option -mfpu=vfp in the specs file, g++ cannot override it from the command line.Judging from your specs file, you weren't passing -mfpu=vfp in your cc1 spec at all; I don't see any evidence of different behavior between the two.
I'm sorry, looks like my pasted example specs file was not really what I was using. I can assure the cc1 spec I'm using has -mfpu=vfp in it.
In any case, giving GCC multiple values for the same option has always been problematic. I recommend you use %{!...} instead, so you only provide a -mfpu if none was on the command line. There's plenty of examples of this in existing specs.
Thanks for the tip. I tried using that construct for the cc1plus spec, but it doesn't work there.
%rename cc1plus old_cc1plus *cc1plus:-march=armv7-a -mcpu=cortex-a8 %{!mfpu:-mfpu=vfp} -mfloat-abi=softfp -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wno-poison-system-directories %(old_cc1plus)
Similar line works with cc1 spec. -- Juha Kallioinen