[OpenAFS-devel] Re: Building openafs on SmartOS?
Andrew Deason
adeason@sinenomine.net
Fri, 1 Nov 2013 10:14:14 -0500
On Fri, 1 Nov 2013 11:55:01 +0000
Coy Hile <Coy.Hile@COYHILE.COM> wrote:
> Do I have to do anything cute to make OpenAFS build on a
> Solaris-derivative without Studio? In a pinch, I could probably hack
> up a local SmartOS build that includes the bits from the solaris 11
> binary tarball, but that's not necessarily maintainable long-term.
What is the kernel built with? The last time I looked at illumos
(openindiana, I think), it was still being built with solaris studio,
but they were just making plans to build it with gcc. (That was a whole
ago, though, that may be wrong.) Just in case it's not clear, we can't
build our module with gcc if the kernel is built with something else;
but I'll assume you already know that and it's built with gcc :)
In order to get it to work, you need to change the sources; it just
support that right now.
The solaris-studio-specific CFLAGS and such are coming from at least two
places. You need to look at src/cf/osconf.m4, and edit the section for
sunx86_511. You also need to edit src/libafs/MakefileProto.SOLARIS.in,
and edit a few of the CFLAGS and such near the top (edit the sections
for sunx86_511, or just all of them), in order to build object files
appropriate for kernel modules. I don't know what, if any, special
options you need for the kernel module with gcc; what's in there is what
we needed for solaris studio. If there is an entirely separate "kernel
build system" that we can use, then the whole libafs build is going to
need to change for that platform...
Going forward, we'll need to autodetect which compiler we're using and
adjust things accordingly. But, if you provide us with a patch that just
uses gcc options everywhere unconditionally, we/I can take care of the
detection logic if you're not sure how to do that. I just need to know
what the correct options are for gcc, since I don't know what they are
yet.
--
Andrew Deason
adeason@sinenomine.net