Cross Compile krb5

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cross Compile krb5

Pedro Cavalcante
Hi everybody

I'm trying to cross compile krb5 for sh4 (STLinux) and i stopped in
this problem: "Cannot test for constructor/destructor support when cross
compiling". My question is: Can I cross compile krb5 for any plataform?
Could you share with me the solution?

Thanks a lot.

Pedro Cavalcante.

________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos
Reply | Threaded
Open this post in threaded view
|

Re: Cross Compile krb5

Kenneth G Raeburn
On Jan 8, 2009, at 15:44, Pedro Cavalcante wrote:
> Hi everybody
>
> I'm trying to cross compile krb5 for sh4 (STLinux) and i stopped in
> this problem: "Cannot test for constructor/destructor support when  
> cross
> compiling". My question is: Can I cross compile krb5 for any  
> plataform?
> Could you share with me the solution?

It's not trivial, as you've noticed, but I think it should be  
possible.  You may have to spent a little time working on some of the  
makefile rules, and setting a few configuration variables before  
starting.

The autoconf-generated configure scripts generally have the ability to  
cache configuration information learned from the environment, to speed  
up later invocations.  The file "config.cache" will be generated after  
a successful invocation, so you can look at the sort of stuff that  
goes in there if you do a native build on some system.

In this case, the variable krb5_cv_attr_constructor_destructor is set  
to "yes" if you're using a compilation environment that supports  
"__attribute__((constructor))" to indicate functions that should be  
run at startup or library load time and "__attribute__((destructor))"  
for cleanup functions; generally that equates to whether you're using  
GCC, but not always.  If you set it to "no", you may have to add  
support in config/shlib.conf and include/k5-platform.h to support the  
target, and it's a bit convoluted...

Ken
________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos
Reply | Threaded
Open this post in threaded view
|

Re: Cross Compile krb5

Kenneth G Raeburn
On Jan 8, 2009, at 18:47, Ken Raeburn wrote:
> The autoconf-generated configure scripts generally have the ability  
> to cache configuration information learned from the environment, to  
> speed up later invocations.  The file "config.cache" will be  
> generated after a successful invocation, so you can look at the sort  
> of stuff that goes in there if you do a native build on some system.

Ah, and what I forgot to say here is that you can set these in the  
environment before running "configure" for your cross compilation, so  
that tests that can't be run for cross-compilation environments can  
have answers pre-set.

I think you can also set the values in $prefix/share/config.site or  
$prefix/etc/config.site before running configure, too; they'll take  
effect for any autoconf-based configure script you run with the given  
installation prefix.

Ken
________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos