Exceptions in ARM

Johannes Pfau nospam at example.com
Sun Mar 9 01:22:50 PST 2014


Am Sun, 09 Mar 2014 07:57:45 +0000
schrieb "Timo Sintonen" <t.sintonen at luukku.com>:

> Now I got the exceptions to work.
> 
> I have not been able to find how to control the libgcc build 
> process. The configure script seems not to know that I give 
> different defaults for the compiler in --with switches. Configure 
> still assumes the compiler defaults arm mode although it is in 
> thumb mode. I should also be able to give different default 
> values to all four libraries that are built.
> 
> I solved this by building with defaults and then hacked the 
> makefile of that libgcc directory I use. (fpu) Then I remade the 
> library. Changing LIBGCC_FLAGS at line 229 did the trick.
> [...]
> 

Great!
The configure script doesn't really have to know about the "-with-*"
flags - these are used by default if you don't pass any arguments to
gcc/gdc.

However this can't work for your multilib setup. libgcc should really
build with the correct multilib flags, so that's strange. You can check
the used multilib flags with
gcc -print-multi-lib

You might have to edit
gcc/config/arm/t-arm-elf

You could check how the gcc-arm-embedded project modifies that file,
IIRC they build special multilibs for cortex m3/m4 (the default gcc
configuration only builds thumb/not-thumb*)
https://launchpad.net/gcc-arm-embedded

http://airs.com/ian/configure/configure_8.html
http://gcc.gnu.org/onlinedocs/gccint/Target-Fragment.html

* BTW: This can explain invalid instructions in libgcc: it's only build
 with -mthumb but not with -march in the default multilib
 configuration.


More information about the D.gnu mailing list