[OpenAFS-devel] Re: Choice of C compiler on AIX

Andrew Deason adeason@sinenomine.net
Mon, 4 Oct 2010 10:06:16 -0500


On Sun, 3 Oct 2010 12:11:31 +0100
Simon Wilkinson <simon@sxw.org.uk> wrote:

> AIX is the only platform on which we use a different C compiler binary
> to build against pthreads - xlc_r, rather than cc.
> 
> Is there any reason that we couldn't just use xlc_r to build both LWP
> and pthread targets?

I wouldn't be the one to know about this, but... I thought the only
difference between xlc_r and xlc is that certain flags have different
defaults. While I assume just using xlc_r everywhere would work (unless
LWP's specialness somehow screws something up), I would think that using
xlc everywhere and altering MT_CFLAGS/MT_LIBS (or the equivalent in the
new system, if you're changing those) would be the way to go. I have no
idea how consistent those flags are across AIX versions, though.

Doing this may be against common AIX practices and user expectations,
too, since (for example) AIX compiler tools have a configuration file
that provide default flags and libs and such depending on whether you
run xlc, xlc_r, xlc128, etc. It's possible using only one compiler may
be confusing when the user expects some locally-configured defaults to
be used for multithreaded stuff, but we just use 'xlc' instead of
'xlc_r' so it doesn't happen.

I don't know if that really affects anyone, though... and I'm assuming
it would be easy to just specify CC=xlc_r anyway.

-- 
Andrew Deason
adeason@sinenomine.net