[OpenAFS-devel] Re: Building OpenAFS on SmartOS
Andrew Deason
adeason@sinenomine.net
Fri, 9 May 2014 00:46:46 -0500
On Thu, 8 May 2014 22:08:54 -0400
Coy Hile <coy.hile@coyhile.com> wrote:
> I’ve made some further progress here, building against master;
Ah, I didn't mean you _had_ to work from master. I assume you'll want it
on 1.6 and master, so you/we're going to need to figure it out for both
anyway. But master is good.
> I managed to get the LWP stuff to build, but I had to hack up
> src/lwp/Makefile to hard-code —64 rather than $(ASFLAGS) in the
> assembler line to create process.o; my attempts to get ASFLAGS set to
> —64 if using gcc (and thus gas) have so far failed.
It should be set in src/cf/osconf.m4, in the same place other flags are set
to gcc-isms or sunwspro-isms. That is, assuming the problem was that we
were giving it -m64 instead of -64; if you got something else or no flag
at all then I'm not sure what the deal is.
> KDEFS_64 = -xarch=amd64 -xmodel=kernel
>
> What does -xmodel=kernel accomplish, and what’s the relevant gccism
> there? I can’t glean anything obvious from looking at, e.g.,
> MakefileProto.LINUX.in
The Linux makefiles don't say what flags we use for building the kernel
objects, because the Linux build infrastructure tells us what to use. So
that won't be of much help. If you want to see what flags we use while
actually building the Linux kernel module, you can build it on Linux
with some flag to say what the literal commands run are (you need to set
some var, but I don't remember at the moment how you do that; usually
it's 'make foo V=1' or something).
The analogous gcc option for -xmodel=kernel appears to be
-mcmodel=kernel, though. I'm not clear on if that's needed for Illumos
kernel modules, or what we're supposed to use (I can't find any
documentation for building Illumos kernel modules with gcc, but I just
looked around quickly).
Anyway, guessing at options like this might work for the short term, but
we really need to know what Illumos wants us to use; what the
"interface" is. That could be effectively a hard-coded set of flags
(like Solaris; our flags come from their documentation). Or we could get
what flags to use from the kernel configuration and build system
somewhere (like Linux; our flags come from a Linux-supplied makefile).
Or something else.
> so any help fine-tuning this is welcome. If somebody needs a SmartOS
> box to build on, I will spin up an internet-facing instance and create
> logins as needed.
I may be able to look a little in the next few days. But if you could
look into finding out the above information, that would be helpful.
Either via finding documentation on the subject, or asking
illumos/smartos people.
--
Andrew Deason
adeason@sinenomine.net