[oe] RFC: Remove -e from default EXTRA_OEMAKE

Chris Larson clarson at kergoth.com
Mon May 23 21:30:35 UTC 2011


On Mon, May 23, 2011 at 2:26 PM, Stanislav Brabec <utx at penguin.cz> wrote:
>
> EXTRA_OEMAKE contains -e by default for years (in bitbake.conf). In my
> opinion it causes more bad than good.
>
> It makes live simpler in (rare) cases when Makefile proposes its own
> default CFLAGS without chance to easily change them from outside, but it
> causes subtle (and often overseen) breakages in many other cases. For
> example "-e" in EXTRA_OEMAKE caused breakage of crda (tested with GNU
> make 3.82):
> ifeq ($(USE_OPENSSL),1)
> CFLAGS += -DUSE_OPENSSL
> endif
>
> As you can check, there are several hundreds of recipes that need to
> override this default. Also autotools.bbclass,
> distutils-common-base.bbclass, qmake_base.bbclass and kernel.bbclass
> remove "-e" from default make flags. It means that at least 6000 recipes
> remove "-e" from EXTRA_OEMAKE.
>
> That is why I think that "-e" should not be a default. If needed, it
> would be easy to add it for particular recipes.

I have to agree, here. The biggest problem, I think, in addition to
the above breakage, is that it's too much "magic". It's too implicit.
It might simplify recipe creation in some cases, but that isn't
necessarily a good thing. If you're creating a recipe for a
non-autotools thing, you need to sit down and read its makefiles.
Hoping and crossing your fingers that the default behavior will work
is just asking for trouble. It would be better for things to not "just
work" for regular make and make the user read the makefiles and pass
the vars explicitly in EXTRA_OEMAKE, which thereby increases their
knowledge of the system, and encodes more of that knowledge in the
recipe for future maintenance.

It took me a heck of a lot of trial and error to come up with the -e
MAKEFLAGS='' hack to make sure the -e only took effect at the toplevel
make -- more trouble than its worth.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics




More information about the Openembedded-devel mailing list