[oe] [PATCH 3/3] mupdf-0.6: new recipe

Dmitry Artamonow mad_soft at inbox.ru
Wed Jun 9 19:37:17 UTC 2010


On 06:36 Wed 09 Jun     , Khem Raj wrote:
> On (09/06/10 11:33), Dmitry Artamonow wrote:
> > +# mupdf crashes (at least on arm) when built with high level of optimization
> > +FULL_OPTIMIZATION = "-O2"
> 
> the commend does not go with the code. O2 is high enough optimization.
> be more specific what does not work and by default OE uses -Os + some 
> specific opt passes.
I think optimization options vary depending on distro. Anyway, I had runtime
crashes on armv5 (hx4700) when mupdf is built with Angstrom's default
optimization flags:
-fexpensive-optimizations -frename-registers -fomit-frame-pointer -Os -ggdb3
Didn't investigate which exactly option leads to fault, but changing CFLAGS to
simple "-O2" produced working build ("-Os" without other flags probably
also does the trick, need to recheck).

So would it be better to add some more text in comment to prevent ambiguity -
something like this?
# mupdf crashes (at least on arm) when built with high level of optimization
# so we need to provide some safe settings


> > +
> > +do_configure() {
> > +    cp ${WORKDIR}/Makerules ${S}/Makerules
> > +
> 
> Why not create a patch for Makerules instread of creating a file and then
> copying. It will help upgrades the patch will get refreshed for any changes
> but this will overwrite those changes.

Well, as far as I can understand, Makerules was designed just to keep
CFLAGS and other host-specific tunings separate from main Makefile.
Currently, Makerules in original tarball contains some host-detecting
logic and corresponding sections with CFLAGS, LDFLAGS, etc. for each
host OS: Linux, Darwin, MinGW and build type - debug or release.
As there's really nothing to reuse for cross-compiling, I decided that
it's better to rewrite this file, than patching it. Patch would be
almost as big as original Makerules (as it would throw almost
everything from it), hard to maintain, and absolutely no help in
upgrades.

-- 
Best regards,
Dmitry "MAD" Artamonow





More information about the Openembedded-devel mailing list