Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Testing clang, anyone?



In article <20130222.101610.244208415.he%uninett.no@localhost>,
Havard Eidnes  <he%NetBSD.org@localhost> wrote:
>Hi,
>
>I have my Kurobox/pro running 6.0 trying to do a full bulk build of
>pkgsrc-2012Q4 at the moment.  I have now and then uploaded the
>resulting new binary packages and merged them with what's already in
>
>  ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/arm/6.0_2012Q4/
>
>I noticed last night that after a couple of days (I kid you not!),
>it managed to build clang.  However, attempts at running it
>errors out because NetBSD thinks the text segment is too large, and
>the kernel logs this message:
>
>check_exec: rejecting due to limits (t=25240936 > 16777216 || d=777088 >
>536870912)
>
>"size" on the clang executable gives:
>
># size /usr/pkg/bin/clang
>   text    data     bss     dec     hex filename
>25240656 749272   26432 26016360 18cfa68 /usr/pkg/bin/clang
># 
>
>i.e. the text segment it wants is around 25MB.
>On NetBSD/arm 6.0, the maximum text size is defined in
>sys/arch/arm/include/arm32/vmparam.h, like this:
>
>/*
> * Note that MAXTSIZ can't be larger than 32M, otherwise the compiler
> * would have to be changed to not generate "bl" instructions.
> */
>#define MAXTSIZ         (16*1024*1024)          /* max text size */
>
>So...  Which is it -- 32M or 16M?  If it can be adjusted to 32M, this
>would allow one to actually test the clang compiler.  I on my hand
>don't want to interrupt the bulk build to test, so would appreciate it
>if someone else could please test the clang build.

Typically we allow the text segment to be large on other architectures
that have branch limitations (-fpic -> -fPIC for example), and if the
branch limits are exceeded during link, the linker issues a warning
and does not produce an executable. I don't see a point in enforcing
the limit in the kernel.

christos



Home | Main Index | Thread Index | Old Index