add USE_PORTABLE_CODE option and use it in find applet
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
7649bd024c
commit
aa7da73880
@ -30,6 +30,14 @@ config EXTRA_COMPAT
|
|||||||
some GNU extensions in libc. You probably only need this option
|
some GNU extensions in libc. You probably only need this option
|
||||||
if you plan to run busybox on desktop.
|
if you plan to run busybox on desktop.
|
||||||
|
|
||||||
|
config USE_PORTABLE_CODE
|
||||||
|
bool "Avoid using GCC-specific code constructs"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Use this option if you are trying to compile busybox with
|
||||||
|
compiler other than gcc.
|
||||||
|
If you do use gcc, this option may needlessly increase code size.
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Buffer allocation policy"
|
prompt "Buffer allocation policy"
|
||||||
default FEATURE_BUFFERS_USE_MALLOC
|
default FEATURE_BUFFERS_USE_MALLOC
|
||||||
|
@ -276,7 +276,11 @@ ACTF(inum)
|
|||||||
ACTF(exec)
|
ACTF(exec)
|
||||||
{
|
{
|
||||||
int i, rc;
|
int i, rc;
|
||||||
|
#if ENABLE_USE_PORTABLE_CODE
|
||||||
|
char **argv = alloca(sizeof(char*) * (ap->exec_argc + 1));
|
||||||
|
#else /* gcc 4.3.1 generates smaller code: */
|
||||||
char *argv[ap->exec_argc + 1];
|
char *argv[ap->exec_argc + 1];
|
||||||
|
#endif
|
||||||
for (i = 0; i < ap->exec_argc; i++)
|
for (i = 0; i < ap->exec_argc; i++)
|
||||||
argv[i] = subst(ap->exec_argv[i], ap->subst_count[i], fileName);
|
argv[i] = subst(ap->exec_argv[i], ap->subst_count[i], fileName);
|
||||||
argv[i] = NULL; /* terminate the list */
|
argv[i] = NULL; /* terminate the list */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user