On Sun, May 06, 2007, Christoph Schug wrote:

> On Sat, May 05, 2007, Ralf S. Engelschall wrote:
>
> > On Sat, May 05, 2007, Christoph Schug wrote:
> >
> > >     sparc64-freebsd platform fixes
> >
> > Christoph, as it seems to be a generic PIC issue, wouldn't it be more
> > reasonable to fixate to PIC building directly via rpmtool as we are
> > already doing for amd64-freebsd? Because I'm sure these are not the only
> > libraries which are affected...
>
> Yeah, I had a similar idea but wasn't aware of the rpmtool(8) hack. I'm
> not completely satisfied with the way it is done in rpmtool(8) also
> as '-fPIC' is being set always, even if not necessary. While vendor
> compiler on FreeBSD is always gcc(1) there might be other platforms in
> the future were this isn't the case. Wouldn't it be better to introduce
> an additional macro which defaults to '%nil' and expands to '-fPIC' on
> specific cases?

Yes, some specific macro could be useful. Or an option like -l as in
%{l_cflags -l} which tells RPM that compiler flags should be expanded
for use with libraries. The reason why I've done a "force PIC at all"
under amd64-freebsd was because (as you noticed) GCC is present anyway
_AND_ especially because one cannot easily distinguish when it is
necessary. And even on platforms where GCC is not always present we
could add an "if" cascade to rpmtool for the various compilers. But
this is at least still better than a "case" construct in dozend of
packages...

> Nevertheless I consider this commit as a quick hackish solution just to
> get a step forword and to evaluate whether sparc64-freebsd might be a
> suitable platform for OpenPKG stuff. Sorry for the mess, should I back
> out the change?

I personally would prefer to back it out and instead add a similar hack
for sparc64-freebsd as we already have for amd64-freebsd to rpmtool.
This way you also can proceed under sparc64-freebsd but without having
to touch dozend of packages.
                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
OpenPKG                                             http://openpkg.org
Developer Communication List                   openpkg-dev@openpkg.org

Reply via email to