summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/config-ml.in
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2001-05-28 05:21:37 +0000
committerobrien <obrien@FreeBSD.org>2001-05-28 05:21:37 +0000
commit328e45595b12375b6d16a846069507d25086abdb (patch)
treeae2a6f4f4987889b7bd2af7bdf0b86fa580df011 /contrib/binutils/config-ml.in
parent7fbb72605a1c3bcb81f8b6bb6297ffef30f84335 (diff)
downloadFreeBSD-src-328e45595b12375b6d16a846069507d25086abdb.zip
FreeBSD-src-328e45595b12375b6d16a846069507d25086abdb.tar.gz
Import of GNU Binutils version 2.11.0.
Believe it or not, this is heavily stripped down.
Diffstat (limited to 'contrib/binutils/config-ml.in')
-rw-r--r--contrib/binutils/config-ml.in159
1 files changed, 156 insertions, 3 deletions
diff --git a/contrib/binutils/config-ml.in b/contrib/binutils/config-ml.in
index 503f7cf..c968bf0 100644
--- a/contrib/binutils/config-ml.in
+++ b/contrib/binutils/config-ml.in
@@ -280,6 +280,17 @@ arm-*-*)
esac
done
fi
+ if [ x"$enable_nofmult" = xno ]
+ then
+ old_multidirs="${multidirs}"
+ multidirs=""
+ for x in ${old_multidirs}; do
+ case "$x" in
+ *nofmult* ) : ;;
+ *) multidirs="${multidirs} ${x}" ;;
+ esac
+ done
+ fi
;;
m68*-*-*)
if [ x$enable_softfloat = xno ]
@@ -362,6 +373,28 @@ mips*-*-*)
esac
done
fi
+ case " $multidirs " in
+ *" mabi=64 "*)
+ # We will not be able to create libraries with -mabi=64 if
+ # we cannot even link a trivial program. It usually
+ # indicates the 64bit libraries are missing.
+ if echo 'main() {}' > conftest.c &&
+ ${CC-gcc} -mabi=64 conftest.c -o conftest; then
+ :
+ else
+ echo Could not link program with -mabi=64, disabling it.
+ old_multidirs="${multidirs}"
+ multidirs=""
+ for x in ${old_multidirs}; do
+ case "$x" in
+ *mabi=64* ) : ;;
+ *) multidirs="${multidirs} ${x}" ;;
+ esac
+ done
+ fi
+ rm -f conftest.c conftest
+ ;;
+ esac
;;
powerpc*-*-* | rs6000*-*-*)
if [ x$enable_softfloat = xno ]
@@ -442,6 +475,30 @@ powerpc*-*-* | rs6000*-*-*)
done
fi
;;
+sparc*-*-*)
+ case " $multidirs " in
+ *" m64 "*)
+ # We will not be able to create libraries with -m64 if
+ # we cannot even link a trivial program. It usually
+ # indicates the 64bit libraries are missing.
+ if echo 'main() {}' > conftest.c &&
+ ${CC-gcc} -m64 conftest.c -o conftest; then
+ :
+ else
+ echo Could not link program with -m64, disabling it.
+ old_multidirs="${multidirs}"
+ multidirs=""
+ for x in ${old_multidirs}; do
+ case "$x" in
+ *m64* ) : ;;
+ *) multidirs="${multidirs} ${x}" ;;
+ esac
+ done
+ fi
+ rm -f conftest.c conftest
+ ;;
+ esac
+ ;;
esac
# Remove extraneous blanks from multidirs.
@@ -472,6 +529,8 @@ multi-do:
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(CFLAGS) $${flags}" \
+ prefix="$(prefix)" \
+ exec_prefix="$(exec_prefix)" \
CXXFLAGS="$(CXXFLAGS) $${flags}" \
LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
@@ -615,7 +674,24 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
echo "pwd: `pwd`"
fi
- if [ -d ${ml_dir} ]; then true; else mkdir ${ml_dir}; fi
+ if [ -d ${ml_dir} ]; then true; else
+ # ``mkdir -p ${ml_dir}'' See also mkinstalldirs.
+ pathcomp=""
+ for d in `echo ":${ml_dir}" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`; do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp" 1>&2
+ mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
+ fi
+ if test ! -d "$pathcomp"; then
+ exit $lasterr
+ fi
+ pathcomp="$pathcomp/"
+ done
+ fi
if [ -d ${ml_dir}/${ml_libdir} ]; then true; else mkdir ${ml_dir}/${ml_libdir}; fi
# Eg: if ${ml_dir} = m68000/m68881, dotdot = ../../
@@ -666,9 +742,86 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
cd ${ml_dir}/${ml_libdir}
if [ -f ${ml_newsrcdir}/configure ]; then
- ml_recprog=${ml_newsrcdir}/configure
+ ml_recprog="${ml_newsrcdir}/configure --cache-file=../config.cache"
fi
- if eval ${ml_config_shell} ${ml_recprog} \
+
+ # find compiler flag corresponding to ${ml_dir}
+ for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
+ dir=`echo $i | sed -e 's/;.*$//'`
+ if [ "${dir}" = "${ml_dir}" ]; then
+ flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`
+ break
+ fi
+ done
+ ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags"'
+
+ if [ "${with_target_subdir}" = "." ]; then
+ CC_=$CC' '
+ CXX_=$CXX' '
+ else
+ # Create a regular expression that matches any string as long
+ # as ML_POPDIR.
+ popdir_rx=`echo ${ML_POPDIR} | sed 's,.,.,g'`
+ CC_=
+ for arg in ${CC}; do
+ case $arg in
+ -[BIL]"${ML_POPDIR}"/*)
+ CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\1/p"`' ' ;;
+ "${ML_POPDIR}"/*)
+ CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+ *)
+ CC_="${CC_}${arg} " ;;
+ esac
+ done
+
+ CXX_=
+ for arg in ${CXX}; do
+ case $arg in
+ -[BIL]"${ML_POPDIR}"/*)
+ CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+ "${ML_POPDIR}"/*)
+ CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+ *)
+ CXX_="${CXX_}${arg} " ;;
+ esac
+ done
+
+ if test "x${LD_LIBRARY_PATH+set}" = xset; then
+ LD_LIBRARY_PATH_=
+ for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do
+ case "$arg" in
+ "${ML_POPDIR}"/*)
+ arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`
+ ;;
+ esac
+ if test "x$LD_LIBRARY_PATH_" != x; then
+ LD_LIBRARY_PATH_=$LD_LIBRARY_PATH_:$arg
+ else
+ LD_LIBRARY_PATH_=$arg
+ fi
+ done
+ ml_config_env="$ml_config_env LD_LIBRARY_PATH=$LD_LIBRARY_PATH_"
+ fi
+
+ if test "x${SHLIB_PATH+set}" = xset; then
+ SHLIB_PATH_=
+ for arg in `echo "$SHLIB_PATH" | tr ':' ' '`; do
+ case "$arg" in
+ "${ML_POPDIR}"/*)
+ arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`
+ ;;
+ esac
+ if test "x$SHLIB_PATH_" != x; then
+ SHLIB_PATH_=$SHLIB_PATH_:$arg
+ else
+ SHLIB_PATH_=$arg
+ fi
+ done
+ ml_config_env="$ml_config_env SHLIB_PATH=$SHLIB_PATH_"
+ fi
+ fi
+
+ if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
--with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
${ml_arguments} ${ml_srcdiroption} ; then
true
OpenPOWER on IntegriCloud