Skip to content

Commit

Permalink
glibc: do not add bogus options
Browse files Browse the repository at this point in the history
If a multilib configuration contains an endianness option, the
${endian_extra} is set to, for example, 'mb' (note, no dash!). It is
then added to CFLAGS, resulting in bogus flags like 'mb -mb'. But it is
not even needed, as ${extra_flags} already contains the very same
option!

Found by experimenting with multilibs with different endianness on SH,
which still didn't work, but that's another story...

Signed-off-by: Alexey Neyman <stilor@att.net>
  • Loading branch information
stilor committed Jun 10, 2016
1 parent a49e13f commit 55879ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/build/libc/glibc.sh
Expand Up @@ -288,12 +288,12 @@ do_libc_backend_once() {
|${sed} -r -e '/^(.*[[:space:]])?-(E[BL]|m((big|little)(-endian)?|e?[bl]))([[:space:]].*)?$/!d;' \
-e 's//\2/;' \
)"
# If extra_flags contained an endianness option, no need to add it again. Otherwise,
# add the option from the configuration.
case "${endian_extra}" in
EB|mbig-endian|mbig|meb|mb)
extra_cc_args="${extra_cc_args} ${endian_extra}"
;;
EL|mlittle-endian|mlittle|mel|ml)
extra_cc_args="${extra_cc_args} ${endian_extra}"
;;
"") extra_cc_args="${extra_cc_args} ${CT_ARCH_ENDIAN_OPT}"
;;
Expand Down

0 comments on commit 55879ed

Please sign in to comment.