pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Build problems for liboil on netbsd-macppc



On Sun, 3 Sep 2006 23:56:55 +0200
Georg Schwarz <georg.schwarz%freenet.de@localhost> wrote:
> 
> you might at least consider to ad a hacks.mk for the package in  
> question which could contain something like
> 
> 
> .if ${OPSYS} == Darwin && {PKGSRC_COMPILER} == gcc && exists(/usr/bin/ 
> machine)
> _CPUTYPE!=    /usr/bin/machine
> . if "${_CPUTYPE}" == "ppc7400" || "${_CPUTYPE}" == "ppc970" # G4 or G5
> PKG_HACKS+=   enable-altivec
> CFLAGS+=      -maltivec
> . endif
> .endif
> 

Thanks for answering. /usr/bin/machine seems to be pretty generic on my machine 
('macppc'), so I used the following hacks.mk. I don't know if there's a better 
way to detect altivec, but it does work for me.

.if ${OPSYS} == NetBSD && ${PKGSRC_COMPILER} == gcc && exists(/usr/bin/machine) 
&& exists(/sbin/sysctl)
_CPUTYPE!=      /usr/bin/machine
. if "${_CPUTYPE}" == "macppc"
_HAS_ALTIVEC!=  /sbin/sysctl -n machdep.altivec
.  if "${_HAS_ALTIVEC}" == "1"
PKG_HACKS+=     enable-altivec
CFLAGS+=        -maltivec
.  endif
. endif
.endif

In any case, I think it's a bug in liboil, given that the -maltivec flag is 
added during the altivec test, but not during the build phase, or am I wrong ?
I have somehow resolved the relocation issues that I described earlier 
(Unsupported relocation type 10 in non-PLT relocations). There are only a 
couple of functions that use that type of relocation, and they are both 
assembler-optimized-altivec-version of memcpy and memset, so I axed them out, 
and got rid of those messages.
While the fix is pretty small (a line changed in a Makefile.am) it involves 
rerunning automake. How should this be handled, making a big patch for all the 
files changed after the rerun of automake ?
(I know this is not exactly 'fixing' the problem, but it's what I can do for 
now, at least until I can get some advice from someone more expert, maybe on 
the liboil ml ).

Marco
-- 

                
___________________________________ 
Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive 
http://it.messenger.yahoo.com



Home | Main Index | Thread Index | Old Index