X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=config-ml.in;h=4909a4905ca77c043a7d34f8b23f73fe087bc716;hb=6712be04bef8fd755de00650afec5a2a80dbe591;hp=af606349956984fcd2cd0549adacaf64dec9b7a9;hpb=d1265690b14611e1c96edf5b4935d09eca6b3988;p=deliverable%2Fbinutils-gdb.git diff --git a/config-ml.in b/config-ml.in index af60634995..4909a4905c 100644 --- a/config-ml.in +++ b/config-ml.in @@ -9,9 +9,9 @@ # # if [ "${srcdir}" = "." ] ; then # if [ "${with_target_subdir}" != "." ] ; then -# . ${srcdir}/${with_multisrctop}../../config-ml.in +# . ${with_multisrctop}../../config-ml.in # else -# . ${srcdir}/${with_multisrctop}../config-ml.in +# . ${with_multisrctop}../config-ml.in # fi # else # . ${srcdir}/../config-ml.in @@ -44,6 +44,10 @@ # inter-library references also work in the source tree because symlink trees # are built when srcdir=. # +# Unfortunately, trying to access the libraries in the build tree requires +# the user to manually choose which library to use as GCC won't be able to +# find the right one. This is viewed as the lesser of two evils. +# # Configure variables: # ${with_target_subdir} = "." for native, or ${target_alias} for cross. # Set by top level Makefile. @@ -54,7 +58,8 @@ # # Makefile variables: # MULTISRCTOP = number of multilib levels in source tree (+1 if cross) -# MULITBUILDTOP = number of multilib levels in build tree +# (FIXME: note that this is different than ${with_multisrctop}. Check out.). +# MULTIBUILDTOP = number of multilib levels in build tree # MULTIDIRS = list of multilib subdirs (eg: m68000 m68020 ...) # (only defined in each library's main Makefile). # MULTISUBDIR = installed subdirectory name with leading '/' (eg: /m68000) @@ -65,23 +70,36 @@ # libraries as desired. # We have to handle being invoked by both Cygnus configure and Autoconf. -# We except both to define `srcdir' and `target' (we *could* figure them -# out, but we'd have to do work that they're already done to figure them out). -# We expect Cygnus configure to define `arguments' and Autoconf to define -# `ac_configure_args'. +# +# Cygnus configure incoming variables: +# srcdir, subdir, target, arguments +# +# Autoconf incoming variables: +# srcdir, target, ac_configure_args +# +# We *could* figure srcdir and target out, but we'd have to do work that +# our caller has already done to figure them out and requiring these two +# seems reasonable. if [ -n "${ac_configure_args}" ]; then Makefile=${ac_file-Makefile} ml_config_shell=${CONFIG_SHELL-/bin/sh} ml_arguments="${ac_configure_args}" + ml_realsrcdir=${srcdir} else Makefile=${Makefile-Makefile} ml_config_shell=${config_shell-/bin/sh} ml_arguments="${arguments}" + if [ -n "${subdir}" -a "${subdir}" != "." ] ; then + ml_realsrcdir=${srcdir}/${subdir} + else + ml_realsrcdir=${srcdir} + fi fi # Scan all the arguments and set all the ones we need. +ml_verbose=--verbose for option in ${ml_arguments} do case $option in @@ -111,6 +129,9 @@ do --norecursion | --no*) ml_norecursion=yes ;; + --silent | --sil* | --quiet | --q*) + ml_verbose=--silent + ;; --verbose | --v | --verb*) ml_verbose=--verbose ;; @@ -144,18 +165,20 @@ if [ "${enable_multilib}" = yes ]; then ml_toplevel_p=no if [ -z "${with_multisubdir}" ]; then if [ "${srcdir}" = "." ]; then + # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}. # ${with_target_subdir} = "." for native, otherwise target alias. if [ "${with_target_subdir}" = "." ]; then - if [ -f ../config-ml.in ]; then + if [ -f ${ml_realsrcdir}/../config-ml.in ]; then ml_toplevel_p=yes fi else - if [ -f ../../config-ml.in ]; then + if [ -f ${ml_realsrcdir}/../../config-ml.in ]; then ml_toplevel_p=yes fi fi else - if [ -f ${srcdir}/../config-ml.in ]; then + # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}. + if [ -f ${ml_realsrcdir}/../config-ml.in ]; then ml_toplevel_p=yes fi fi @@ -182,148 +205,169 @@ for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do done case "${target}" in -# start-sanitize-arc -arc-sbp-elf*) +arc-*-elf*) if [ x$enable_biendian != xyes ] then old_multidirs=${multidirs} - multidirs= + multidirs="" for x in ${old_multidirs}; do case "${x}" in - *be*) ;; - *) if [ x"$multidirs" = x ]; then - multidirs="$x"; - else - multidirs="${multidirs} ${x}"; - fi - ;; + *be*) : ;; + *) multidirs="${multidirs} ${x}" ;; esac done fi ;; -# end-sanitize-arc -mips*-*-*) - if [ x$enable_single_float = xno ] +# start-sanitize-m32rx +m32r-*-*) + if [ x$enable_m32rx = xno ] + then + old_multidirs=${multidirs} + multidirs="" + for x in ${old_multidirs}; do + case "${x}" in + *m32rx*) : ;; + *) multidirs="${multidirs} ${x}" ;; + esac + done + fi + ;; +# end-sanitize-m32rx +m68*-*-*) + if [ x$enable_softfloat = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in - *single* ) : ;; - *) if [ x"$multidirs" = x ]; then multidirs="$x"; else multidirs="${multidirs} ${x}"; fi ;; + *soft-float* ) : ;; + *) multidirs="${multidirs} ${x}" ;; esac done fi - if [ x$enable_biendian = xno ] + if [ x$enable_m68881 = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in - *el* ) : ;; - *eb* ) : ;; - *) if [ x"$multidirs" = x ]; then multidirs="$x"; else multidirs="${multidirs} ${x}"; fi ;; + *m68881* ) : ;; + *) multidirs="${multidirs} ${x}" ;; esac done fi - if [ x$enable_softfloat = xno ] + if [ x$enable_m68000 = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in - *soft-float* ) : ;; - *) if [ x"$multidirs" = x ]; then multidirs="$x"; else multidirs="${multidirs} ${x}"; fi ;; + *m68000* ) : ;; + *) multidirs="${multidirs} ${x}" ;; + esac + done + fi + if [ x$enable_m68020 = xno ] + then + old_multidirs="${multidirs}" + multidirs="" + for x in ${old_multidirs}; do + case "$x" in + *m68020* ) : ;; + *) multidirs="${multidirs} ${x}" ;; esac done fi ;; -powerpc*-*-* | rs6000*-*-*) - if [ x$enable_softfloat = xno ] +mips*-*-*) + if [ x$enable_single_float = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in - *soft-float* ) : ;; - *) if [ x"$multidirs" = x ]; then multidirs="$x"; else multidirs="${multidirs} ${x}"; fi ;; + *single* ) : ;; + *) multidirs="${multidirs} ${x}" ;; esac done fi - if [ x$enable_commoncpu = xno ] + if [ x$enable_biendian = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in - *common* ) : ;; - *) if [ x"$multidirs" = x ]; then multidirs="$x"; else multidirs="${multidirs} ${x}"; fi ;; + *el* ) : ;; + *eb* ) : ;; + *) multidirs="${multidirs} ${x}" ;; esac done fi - if [ x$enable_powercpu = xno ] + if [ x$enable_softfloat = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in - power | */power | */power/* ) : ;; - *) if [ x"$multidirs" = x ]; then multidirs="$x"; else multidirs="${multidirs} ${x}"; fi ;; + *soft-float* ) : ;; + *) multidirs="${multidirs} ${x}" ;; esac done fi - if [ x$enable_power2cpu = xno ] + ;; +powerpc*-*-* | rs6000*-*-*) + if [ x$enable_softfloat = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in - *power2* ) : ;; - *) if [ x"$multidirs" = x ]; then multidirs="$x"; else multidirs="${multidirs} ${x}"; fi ;; + *soft-float* ) : ;; + *) multidirs="${multidirs} ${x}" ;; esac done fi - if [ x$enable_powerpccpu = xno ] + if [ x$enable_powercpu = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in - *powerpc* ) : ;; - *) if [ x"$multidirs" = x ]; then multidirs="$x"; else multidirs="${multidirs} ${x}"; fi ;; + power | */power | */power/* ) : ;; + *) multidirs="${multidirs} ${x}" ;; esac done fi - if [ x$enable_601cpu = xno ] + if [ x$enable_powerpccpu = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in - *601* ) : ;; - *) if [ x"$multidirs" = x ]; then multidirs="$x"; else multidirs="${multidirs} ${x}"; fi ;; + *powerpc* ) : ;; + *) multidirs="${multidirs} ${x}" ;; esac done fi - if [ x$enable_biendian = xno ] + if [ x$enable_powerpcos = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in - *endian* ) : ;; - *) if [ x"$multidirs" = x ]; then multidirs="$x"; else multidirs="${multidirs} ${x}"; fi ;; + *mcall-linux* | *mcall-solaris* ) : ;; + *) multidirs="${multidirs} ${x}" ;; esac done fi - if [ x$enable_relocatable = xno ] + if [ x$enable_biendian = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in - *relocatable* ) : ;; - *) if [ x"$multidirs" = x ]; then multidirs="$x"; else multidirs="${multidirs} ${x}"; fi ;; + *mlittle* | *mbig* ) : ;; + *) multidirs="${multidirs} ${x}" ;; esac done fi @@ -333,8 +377,8 @@ powerpc*-*-* | rs6000*-*-*) multidirs="" for x in ${old_multidirs}; do case "$x" in - *sysv* ) : ;; - *) if [ x"$multidirs" = x ]; then multidirs="$x"; else multidirs="${multidirs} ${x}"; fi ;; + *mcall-sysv* ) : ;; + *) multidirs="${multidirs} ${x}" ;; esac done fi @@ -344,14 +388,18 @@ powerpc*-*-* | rs6000*-*-*) multidirs="" for x in ${old_multidirs}; do case "$x" in - *aix* ) : ;; - *) if [ x"$multidirs" = x ]; then multidirs="$x"; else multidirs="${multidirs} ${x}"; fi ;; + *mcall-aix* ) : ;; + *) multidirs="${multidirs} ${x}" ;; esac done fi ;; esac +# Remove extraneous blanks from multidirs. +# Tests like `if [ -n "$multidirs" ]' require it. +multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ][ ]*/ /g'` + # Add code to library's top level makefile to handle building the multilib # subdirs. @@ -379,6 +427,7 @@ multi-do: CXXFLAGS="$(CXXFLAGS) $${flags}" \ LIBCFLAGS="$(LIBCFLAGS) $${flags}" \ LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \ + LDFLAGS="$(LDFLAGS) $${flags}" \ $(DO)); then \ true; \ else \ @@ -416,7 +465,7 @@ mv Makefile.tem ${Makefile} fi # ${ml_toplevel_p} = yes if [ "${ml_verbose}" = --verbose ]; then - echo "Adding multilib support to Makefile in `pwd`" + echo "Adding multilib support to Makefile in ${ml_realsrcdir}" if [ "${ml_toplevel_p}" = yes ]; then echo "multidirs=${multidirs}" fi @@ -534,6 +583,13 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then fi (cd ${ml_dir}/${ml_libdir}; ../${dotdot}${ml_unsubdir}symlink-tree ../${dotdot}${ml_unsubdir}${ml_libdir} "") + if [ -f ${ml_dir}/${ml_libdir}/Makefile ]; then + if [ x"${MAKE}" = x ]; then + (cd ${ml_dir}/${ml_libdir}; make distclean) + else + (cd ${ml_dir}/${ml_libdir}; ${MAKE} distclean) + fi + fi ml_newsrcdir="." ml_srcdiroption= multisrctop=${dotdot}