Summary: | dev-lang/erlang ebuilds have typo with USE="kpoll" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Holger Hoffstätte <holger> |
Component: | New packages | Assignee: | Christian Faulhammer (RETIRED) <fauli> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | lang-misc+disabled |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | fix for USE="kpoll" typo to pass the correct option to configure |
Description
Holger Hoffstätte
2008-02-07 17:26:01 UTC
Created attachment 142912 [details, diff]
fix for USE="kpoll" typo to pass the correct option to configure
This typo was there since this... 24 Feb 2007; Christian Faulhammer <opfer@gentoo.org> +erlang-11.2.3-r1.ebuild: added smp and kpoll USE flags to enable/disable those features, adjusted some bits; thanks to Max Loparyev <max@city.veganet.ru> nearly one year and nobody noticed. Fixed. Great, thanks. FWIW I figured out the kpoll mystery - you have to start erl with "+K true" to explicitly make it use kpoll: holger>erl +K true Erlang (BEAM) emulator version 5.6.1 [source] [smp:1] [async-threads:0] [hipe] [kernel-poll:true] so the flag works and all is good. :) (In reply to comment #3) > Great, thanks. FWIW I figured out the kpoll mystery - you have to start erl > with "+K true" to explicitly make it use kpoll: How can this be activated by default? Because someone requesting USE=kpoll wants it to work out of the box. Good question. The easiest/non-intrusive way seems to be to define a default environment variable as documented in man erl. There are two, ERL_FLAGS (appended to the end of the commandline) and ERL_AFLAGS (prepended to the beginning) so it seems ERL_AFLAGS is a good candidate for setting defaults. Overriding works too: holger>unset ERL_FLAGS holger>unset ERL_AFLAGS holger>erl Erlang (BEAM) emulator version 5.6.1 [source] [smp:1] [async-threads:0] [hipe] [kernel-poll:false] holger>export ERL_AFLAGS="+K true" holger>erl Erlang (BEAM) emulator version 5.6.1 [source] [smp:1] [async-threads:0] [hipe] [kernel-poll:true] holger>erl +K false Erlang (BEAM) emulator version 5.6.1 [source] [smp:1] [async-threads:0] [hipe] [kernel-poll:false] Looks like a reasonable approach instead of patching around in the source, right? The argument handling can be found in erts/etc/common/erlexec.c:main but that seems to be the wrong place to force +K. A quick read through the various erl_poll.(c,h) files didn't show any simple switches either. |