[gccsdk] Patch for getgrouplist() and ELF questions

John Tytgat John.Tytgat at aaug.net
Fri Dec 5 13:20:33 PST 2008

In message <20081204215433.GA19708 at chiark.greenend.org.uk>
          Theo Markettos <theo at markettos.org.uk> wrote:

> Peter's given me SVN commit access.  However there are a few things I want
> to clear up before I start doing anything:

Superb.  Welcome.

> Is there a policy on code review?  Apart from fixing simple bugs, I probably
> don't want to start committing chunks of code without at least giving
> someone else the chance to say I'm being stupid.  Shall I continue to post
> patches to the list for feedback?

We don't have an explicit policy but as good rule I would say, if you feel
unsure, ask for a review.  Sending the diff to the mailing list is fine.

Make sure you're subscribed to the riscos-commits mailing list
so you can follow what your fellow developers are commiting.  If you would
have questions or see problems in the commited changes, feel free to
reply on those commit mails and those replies end up in this gccsdk
mailing list so discussion can continue here.

As for code style convention in GCCSDK we try to reasonably follow the GNU
one (<URL:http://www.gnu.org/prep/standards/standards.html#Writing-C>).
Certainly have your changes mentioned in the ChangeLog file.

When you encounter problems and don't have time or knowledge to follow 
up on them, please log them in our bugzilla so that we don't forget
about them (this is something which I feel we don't do enough).

> What's the autobuilder settings to build for the packaging website?  I had a
> go with a standard SVN HEAD checkout of both GCC4 and autobuilder, and it
> built everything as ELF very nicely.  But it also packaged them as ELF,
>/ which wasn't so good.  Do I need to have a 3.4 AIF compiler handy as well?
> (and if so, can they coexist?) Or do you just run elf2aif on everything? 
> I tried that, but it said:
> : ELF file 'ls,e1f' contains non-static program data which makes it
> : unconvertable to AIF
> Is that the default autobuilder setup building for a shared library system?

Actually I just noticed that RO_SHAREDLIBS (which defines if you want a
shared libs enabled build or not) was hardwired to "yes" in
$GCCSDK_INSTALL_ENV/ro-config.  That's wrong as this is a user (builder)
option and I've just commited a fix for this.  This also means now that
Autobuilder builds are by default 'static' now.

> Should programs for the end-user be built static?

Yes, I would prefer to have static AIF binaries released for now using the
current GCC4 infrastructure.  And this until we convinced ourselves that
our shared libraries are working for complex programs.  I believe Peter
got rather far with shared libs in his Firefox build but I'm not sure what
what the remaining issues are.

So basically you need to have the -static option specified during linking
and run the elf2aif program.

Setting Autobuilder compile/link options can be done by creating
a local autobuilder/build-setvars (see Autobuilder.html for documentation).

I wouldn't be too bothered about GCCSDK 3.4 AIF compatibility as I think
we can use all developer effort on finishing and testing GCCSDK 4.  After
that's done, I don't see any use for GCCSDK 3.4 in Autobuilder anymore.

> If I want to run ELF programs, what do I need?  I couldn't find anything on
> the wiki about this.

You need the !SharedLibs application (containing the SOManager module).
This supports both static ELF programs and ELF programs making use of
shared libraries.

When you've converted your static ELF program to AIF, you don't need the
SOManager module of course.

I waited to put this info in wiki until there is a well tested GCCSDK
release supporting shared libraries.

> Anyway, attached is a patch to provide getgrouplist() for review.

I'll give feedback on it in a separate mail.  Already a big thank you
upfront for your contribution.

John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven

More information about the gcc mailing list