[uClibc] Re: frv-uclibc port updates

Peter S. Mazinger ps.m at gmx.net
Thu Nov 4 22:59:14 UTC 2004


On 4 Nov 2004, Alexandre Oliva wrote:

> On Nov  4, 2004, "Peter S. Mazinger" <ps.m at gmx.net> wrote:
> 
> > Removing -nostdinc is incorrect, if we do that, we will end up using 
> > installed system headers instead of the ones provided by uClibc sources.
> 
> But if I don't do that, I can't find stddef.h, which is only provided
> by the compiler.

But if you do that, you'll build against /usr/include/ instead of 
uClibc/include.

Than you probably have to add some -I... path (maybe using GCCDIR from 
Rules.mak), although I wonder, that gcc can't find it's own file, I have 
thought, that -nostdinc influences only the standard paths (like 
/usr/include), but not the gcc ones.
Where is your stddef.h located?

> > which is the correct pie flag for frv, -fpie or -fPIE (or is it 
> > unrelevant, or if you don't know, then is -fpic or -fPIC correct?)
> 
> -fpie and -fPIE are both correct.  -fpie assumes all GOT entries fit
> in a 12-bit immediate offset field, whereas -fPIE doesn't make any
> such assumption.  -fpie happens to work ATM.

generally -fPIE is used (at least in gentoo/adamantix land), there is only 
one case I know, where it does not make sense, because the GOT entries fit 
in the space for -fpie (ppc)

> > You have also removed the (check_gcc,-fpie,)
> 
> The only existing port of GCC that supports frv-uclinux supports
> -fpie, so it's pointless to test for it.

if you think so ;)

> > Please also check your crt0.S file, I can't see any difference between the 
> > created crt1.o and Scrt1.o files
> 
> That sounds about right.  On FR-V, all executables are PIE, in a
> sense.  The difference is that PIE executables use dynamic
> relocations, whereas non-PIE ones use .rofixup entries to
> self-relocate.
> 
> The reason I actually generate such an object file is that the same
> toolchain can be used for both uClibc and glibc, and glibc has both of
> them, like most (all?) other GNU/Linux ports.  I figured it didn't
> make much sense to introduce gratuitous differences in this regard.
> It doesn't hurt to have two such small object files.

probably later on all archs will provide also Scrt1.o unconditionally.
I wanted to check only that the file is correct.
Then I think the PIE_SUPPORT option should be turned on for FR-V.

Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2




More information about the uClibc mailing list