summaryrefslogtreecommitdiff
path: root/scripts/build/libc/glibc.sh
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2016-03-19 07:13:52 (GMT)
committerAlexey Neyman <stilor@att.net>2016-06-10 00:12:49 (GMT)
commit55879ed1d83ebb72f2ab6cbbd892448c731a7163 (patch)
tree2f349229b283a9bb28c9245cd03adcdcb5266707 /scripts/build/libc/glibc.sh
parenta49e13fb4edeefba406d98754fb0ca04b707ff4c (diff)
glibc: do not add bogus options
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>
Diffstat (limited to 'scripts/build/libc/glibc.sh')
-rw-r--r--scripts/build/libc/glibc.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh
index 013c6eb..f8c970d 100644
--- a/scripts/build/libc/glibc.sh
+++ b/scripts/build/libc/glibc.sh
@@ -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}"
;;