[Flac-dev] flac-1.1.1 completely broken on linux/ppc and on macosx if built with the standard toolchain (not xcode)

Luca Barbato lu_zero at gentoo.org
Wed Oct 6 09:28:13 PDT 2004


Sadly the latest optimization broke completely everything.

The asm code isn't gas compliant. the libFLAC linker script has a typo, 
disabling the asm optimization and/or altivec won't let a correct build 
anyway.

Instant fixes for the asm stuff:

sed -i -e"s:;:\#:" on the  lpc_asm.s
to load address instead of addis+ori you could use
lis and la and PLEASE use the @l(register) and @ha macros instead of the 
not gas supported hi/lo16().

eg:

lis 31,LABEL at ha
la 31,LABEL at l(31)


append use -mregnames as as options (remove the other)

(the option there isn't present in the as manual, and I could just try 
to figure what's supposed to do)

there are -rpath $(libdir) when -rpath,$(libdir) should be used

in src/libFLAC/Makefile
libFLAC.la: $(libFLAC_la_OBJECTS) $(libFLAC_la_DEPENDENCIES)
         $(LINK) -rpath $(libdir) $(libFLAC_la_LDFLAGS)
		$(libFLAC_la_OBJECTS) $(libFLAC_la_LIBADD) $(LIBS)


the final build still doesn't link correctly (the 2 altivec asm function 
  aren't properly linked in, I haven't the time to investigate the issue 
yet=/)


More verbose report about the no altivec bug:

If I disable altivec optimization (with --disable-asm-optimizations 
--disable-altivec)

the result is:

stream_decoder.c: In function `FLAC__stream_decoder_init':
stream_decoder.c:296: error: `FLAC__lpc_restore_signal' undeclared 
(first use in this function)
stream_decoder.c:296: error: (Each undeclared identifier is reported 
only once
stream_decoder.c:296: error: for each function it appears in.)
stream_decoder.c:297: error: `FLAC__lpc_restore_signal_wide' undeclared 
(first use in this function)
make[4]: *** [stream_decoder.lo] Error 1
make[4]: Leaving directory 
`/var/tmp/portage/flac-1.1.1/work/flac-1.1.1/src/libFLAC'

Could you please at least make sure that disabling altivec optimization 
won't break the build?
That's a bit higher whish:
could you please write the altivec optimization using C intrinsics? That 
way they should work with no/little modification even on ppc 970 in 
ppc64 mode.

Regards

lu

PS:put my address in CC to the replies.

-- 
Luca Barbato
Developer
Gentoo Linux				http://www.gentoo.org/~lu_zero




More information about the Flac-dev mailing list