[gccsdk] RePackaging using trunk GCC instead of 4.1.2

Alan Buckley alan_baa at hotmail.com
Fri Jan 3 08:11:39 PST 2014

> Lee Noar wrote on Friday, January 03, 2014 2:41 PM

> On 03/01/14 12:47, Alan Buckley wrote:
> > I’m in the process of modifying the autobuilder packaging to set
> > up the new packaging Components field.

> > Once I’ve done this and tested it I intend to go through the
> > autobuilder programs/libraries that generate packages
> > and update them all (or as many as I can get to build).

> > I was wondering if this would be a good time to change my
> > machine to use the trunk version of the compiler (4.7?)
> > instead of the 4.1.2 version I currently use.

> > I’ve a few questions to see if it seems like a good idea.
> > Is the trunk compiler stable enough to use in this way?

> I've been using trunk for some time for development and it seems
> stable to me. The only problem I've had is a crash in Cairo which
> I traced to file cairo-1.12.16/src/cairo-boxes-intersect.c, function
> sweep_line_init(), GCC 4.7.4 produced this code snippet:
>    ldr r0, [r0, #-3936]
>    ldr r7, [r0, #-3940]
>    str r9, [r7, r0, asl #2]

> The first ldr corrupts r0 which is still required by the second ldr.
> I was able to work around it by declaring the function noinline.
> This must be an extremely obscure bug, because this is the only time
> I've seen it and I've compiled and run a fair bit of code with this
> compiler. Unfortunately, I wouldn't have a clue how to fix it.

> > To run programs compiled with it, does it need new versions
> > of the Shared Unix Library?

> I don't think so, they both appear to be V1.12.

> > To run programs compiled with it, does it need new versions
> > of SharedLibs?

> Yes, the shared library ABI changed after 4.1.2 to a more efficient
> scheme, so, a program compiled with 4.7 must run with libraries
> built with 4.7 and likewise for 4.1.2.

> > Can I freely use libraries compiled with 4.1.2 with the trunk
> > version and visa versa?

> As above, binaries must use libraries built with the same compiler,
> however, it is possible to have both types installed alongside
> each other. For this the !SharedLibs and SOManager from trunk
> are required. Libraries built with 4.1.2 are then installed
> in !SharedLibs.lib.abi-1/0 and those built with 4.7 (or later)
> are installed in !SharedLibs.lib.abi-2/0.
> The SOManager and dynamic linker will detect which compiler a
> binary was compiled with and load the appropriate libraries,
> but all libraries must be the same ABI as the binary.

All the packages currently are static libraries or binaries.
Would the static libraries be compatible with both compilers?
If they are, it sounds as if I could switch to 4.7 immediately.

As soon as anything is packaged which actually uses shared
libraries a new shared libraries package will need to be
created, but this could probably wait.


More information about the gcc mailing list