Hello,
when bash is being cross-compiled it can't detect if getenv can be
redefined...
configure:14432: checking to see if getenv can be redefined
configure:14438: WARNING: cannot check getenv redefinition if cross
compiling -- defaulting to yes
configure:14489: result: yes
...so it defaults to 'yes', and can cause build failures like this one:
/br/output/host/usr/bin/mipsel-ctng-linux-uclibc-gcc -L./builtins
-L/br/output/host/usr/mipsel-buildroot-linux-uclibc/sysroot/lib
-L/br/output/host/usr/mipsel-buildroot-linux-uclibc/sysroot/lib
-L./lib/glob -L./lib/tilde -L./lib/sh -static -static -static -rdynamic
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-pipe -Os -static -o bash shell.o eval.o y.tab.o general.o make_cmd.o
print_cmd.o dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o
expr.o flags.o jobs.o subst.o hashcmd.o hashlib.o mailcheck.o trap.o
input.o unwind_prot.o pathexp.o sig.o test.o version.o alias.o array.o
arrayfunc.o assoc.o braces.o bracecomp.o bashhist.o bashline.o list.o
stringlib.o locale.o findcmd.o redir.o pcomplete.o pcomplib.o syntax.o
xmalloc.o signames.o -lbuiltins -lglob -lsh -lreadline -lhistory
-lcurses -ltilde
/br/output/host/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(getenv.os):
In function `__GI_getenv':
getenv.c:(.text+0x0): multiple definition of `getenv'
./lib/sh/libsh.a(getenv.o):getenv.c:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
What do you think about adding a new configure option like
"--with-getenv=yes|no" to explicitly state if getenv has to be redefined?
Thanks.
--
Vincent