[06/21] libgloss: Necessary fixes related to MIPS.
Commit Message
From: Matthew Fortune <matthew.fortune@imgtec.com>
Signed-off-by: Matthew Fortune <matthew.fortune@imgtec.com>
Signed-off-by: Aleksandar Rikalo <arikalo@gmail.com>
---
config-ml.in | 25 ++++++++++++++++++++++++-
config/mt-sde | 4 ++--
2 files changed, 26 insertions(+), 3 deletions(-)
@@ -382,6 +382,23 @@ mips*-*-*)
esac
done
fi
+ if [ x$with_multi_buildlist != x ]
+ then
+ old_multidirs="${multidirs}"
+ if [ ! -f $with_multi_buildlist ]
+ then
+ echo "config-ml.in: Failed to find $with_multi_buildlist"
+ exit 1
+ fi
+ multidirs=""
+ for x in ${old_multidirs}; do
+ found=`grep "^${x}$" $with_multi_buildlist`
+ if [ -n "$found" ]
+ then
+ multidirs="${multidirs} ${x}"
+ fi
+ done
+ fi
;;
powerpc*-*-* | rs6000*-*-*)
if [ x$enable_aix64 = xno ]
@@ -583,7 +600,8 @@ else
fi
if [ -z "${with_multisubdir}" ]; then
- ml_subdir=
+ ml_top_subdir=`${CC-gcc} --print-multi-directory 2>/dev/null`
+ ml_subdir=/$ml_top_subdir
ml_builddotdot=
: # ml_srcdotdot= # already set
else
@@ -662,6 +680,11 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
for ml_dir in ${multidirs}; do
+ if [ "${ml_dir}" == "${ml_top_subdir}" ]; then
+ echo "Skipping configure in multilib subdir ${ml_dir}"
+ continue
+ fi
+
if [ "${ml_verbose}" = --verbose ]; then
echo "Running configure in multilib subdir ${ml_dir}"
echo "pwd: `${PWDCMD-pwd}`"
@@ -6,5 +6,5 @@
# has two purposes: it allows libraries to be used in situations where
# $gp != our _gp, and it allows them to be built with -G8 while
# retaining link compatibility with -G0 and -G4.
-CFLAGS_FOR_TARGET += -Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt
-CXXFLAGS_FOR_TARGET += -Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt
+CFLAGS_FOR_TARGET += -Os -minterlink-mips16 -mcode-readable=no -mno-gpopt
+CXXFLAGS_FOR_TARGET += -Os -minterlink-mips16 -mcode-readable=no -mno-gpopt