Skip to contentSkip to conversation

RFC: Remove -e from default EXTRA_OEMAKE

DISCUSSION Stanislav Brabec 2 participants 2 messages May 23, 2011

lore
Share & tools
lore
#0 lore raw

Hallo.

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.

Signature · 3 lines
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
#1 lore raw
Quoted 13 lines · Stanislav Brabec

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

Quoted 8 lines

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.

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics