libc/(e)glibc: fix extra configparms

In case ${CT_LIBC_GLIBC_CONFIGPARMS} starts with a dash, printf will try
to interpret it as an option for itself, and will invariably flail in
panic as it does not recognise any of it.

Use a more robust solution, as suggested by Cody.

Reported-by: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Cody P Schafer <devel-lists@codyps.com>
This commit is contained in:
Yann E. MORIN" 2013-11-15 21:21:12 +01:00
parent 0226e35db7
commit edd01b7729

View File

@ -304,7 +304,7 @@ do_libc_backend_once() {
fi
# Pre-seed the configparms file with values from the config option
printf "${CT_LIBC_GLIBC_CONFIGPARMS}\n" > configparms
printf "%s\n" "${CT_LIBC_GLIBC_CONFIGPARMS}" > configparms
cross_cc=$(CT_Which "${CT_TARGET}-gcc")
extra_cc_args+=" ${extra_flags}"