Commit 35f06ae4 by Paolo Bonzini Committed by Paolo Bonzini

configure.ac (symbolic_link): Replace with $LN_S.

2004-10-06  Paolo Bonzini  <bonzini@gnu.org>

	* configure.ac (symbolic_link): Replace with $LN_S.
	(Assembler/Linker): Hard link from gas and binutils trees.
	* aclocal.m4 (gcc_AC_PROG_LN_S): Try "cp -p" before cp.
	* configure: Regenerate.

From-SVN: r88920
parent db86dd14
2004-10-06 Paolo Bonzini <bonzini@gnu.org>
* configure.ac (symbolic_link): Replace with $LN_S.
(Assembler/Linker): Hard link from gas and binutils trees.
* aclocal.m4 (gcc_AC_PROG_LN_S): Try "cp -p" before cp.
* configure: Regenerate.
2004-10-12 Paul Brook <paul@codesourcery.com> 2004-10-12 Paul Brook <paul@codesourcery.com>
* configure.ac: Don't look for host assembler when building a canadian * configure.ac: Don't look for host assembler when building a canadian
......
...@@ -126,7 +126,12 @@ else ...@@ -126,7 +126,12 @@ else
then then
gcc_cv_prog_LN_S=ln gcc_cv_prog_LN_S=ln
else else
gcc_cv_prog_LN_S=cp if cp -p conftestdata_f conftestdata_t 2>/dev/null
then
gcc_cv_prog_LN_S="cp -p"
else
gcc_cv_prog_LN_S=cp
fi
fi fi
fi fi
rm -f conftestdata_f conftestdata_t rm -f conftestdata_f conftestdata_t
...@@ -138,7 +143,7 @@ else ...@@ -138,7 +143,7 @@ else
if test "$gcc_cv_prog_LN_S" = "ln"; then if test "$gcc_cv_prog_LN_S" = "ln"; then
AC_MSG_RESULT([no, using ln]) AC_MSG_RESULT([no, using ln])
else else
AC_MSG_RESULT([no, and neither does ln, so using cp]) AC_MSG_RESULT([no, and neither does ln, so using $gcc_cv_prog_LN_S])
fi fi
fi fi
AC_SUBST(LN_S)dnl AC_SUBST(LN_S)dnl
......
...@@ -1490,32 +1490,24 @@ do ...@@ -1490,32 +1490,24 @@ do
done done
tmake_file="${tmake_file_}" tmake_file="${tmake_file_}"
symbolic_link='ln -s'
# If the host doesn't support symlinks, modify CC in # If the host doesn't support symlinks, modify CC in
# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
# Otherwise, we can use "CC=$(CC)". # Otherwise, we can use "CC=$(CC)".
rm -f symtest.tem rm -f symtest.tem
if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null case "$LN_S" in
then *-s*)
cc_set_by_configure="\$(CC)" cc_set_by_configure="\$(CC)"
quoted_cc_set_by_configure="\$(CC)" quoted_cc_set_by_configure="\$(CC)"
stage_prefix_set_by_configure="\$(STAGE_PREFIX)" stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
else ;;
rm -f symtest.tem *)
if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
then quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
symbolic_link="cp -p" stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
else quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
symbolic_link="cp" ;;
fi esac
cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
fi
rm -f symtest.tem
out_object_file=`basename $out_file .c`.o out_object_file=`basename $out_file .c`.o
...@@ -1754,7 +1746,7 @@ elif test -f $gcc_cv_as_gas_srcdir/configure.in \ ...@@ -1754,7 +1746,7 @@ elif test -f $gcc_cv_as_gas_srcdir/configure.in \
in_tree_gas=yes in_tree_gas=yes
_gcc_COMPUTE_GAS_VERSION _gcc_COMPUTE_GAS_VERSION
rm -f as$host_exeext rm -f as$host_exeext
$symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null $LN ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
in_tree_gas_is_elf=no in_tree_gas_is_elf=no
if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
|| (grep 'obj_format = multi' ../gas/Makefile \ || (grep 'obj_format = multi' ../gas/Makefile \
...@@ -1887,8 +1879,7 @@ changequote(,)dnl ...@@ -1887,8 +1879,7 @@ changequote(,)dnl
gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
changequote([,])dnl changequote([,])dnl
rm -f collect-ld$host_exeext rm -f collect-ld$host_exeext
$symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \ $LN ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
2>/dev/null
elif test -x "$LD_FOR_TARGET"; then elif test -x "$LD_FOR_TARGET"; then
gcc_cv_ld="$LD_FOR_TARGET" gcc_cv_ld="$LD_FOR_TARGET"
elif test -x "$LD" && test x$host = x$target; then elif test -x "$LD" && test x$host = x$target; then
...@@ -1979,7 +1970,7 @@ elif test -f $gcc_cv_binutils_srcdir/configure.in \ ...@@ -1979,7 +1970,7 @@ elif test -f $gcc_cv_binutils_srcdir/configure.in \
in_tree_nm=yes in_tree_nm=yes
gcc_cv_nm=./nm$host_exeext gcc_cv_nm=./nm$host_exeext
rm -f nm$host_exeext rm -f nm$host_exeext
$symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null $LN ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
elif test "x$program_prefix" != xNONE; then elif test "x$program_prefix" != xNONE; then
gcc_cv_nm=${program_prefix}nm$host_exeext gcc_cv_nm=${program_prefix}nm$host_exeext
else else
...@@ -2001,8 +1992,7 @@ elif test -f $gcc_cv_binutils_srcdir/configure.in \ ...@@ -2001,8 +1992,7 @@ elif test -f $gcc_cv_binutils_srcdir/configure.in \
in_tree_objdump=yes in_tree_objdump=yes
gcc_cv_objdump=./objdump$host_exeext gcc_cv_objdump=./objdump$host_exeext
rm -f objdump$host_exeext rm -f objdump$host_exeext
$symbolic_link ../binutils/objdump$host_exeext \ $LN ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
objdump$host_exeext 2>/dev/null
elif test "x$program_prefix" != xNONE; then elif test "x$program_prefix" != xNONE; then
gcc_cv_objdump=${program_prefix}objdump$host_exeext gcc_cv_objdump=${program_prefix}objdump$host_exeext
else else
...@@ -3254,7 +3244,6 @@ AC_SUBST(out_file) ...@@ -3254,7 +3244,6 @@ AC_SUBST(out_file)
AC_SUBST(out_object_file) AC_SUBST(out_object_file)
AC_SUBST(stage_prefix_set_by_configure) AC_SUBST(stage_prefix_set_by_configure)
AC_SUBST(quoted_stage_prefix_set_by_configure) AC_SUBST(quoted_stage_prefix_set_by_configure)
AC_SUBST(symbolic_link)
AC_SUBST(thread_file) AC_SUBST(thread_file)
AC_SUBST(tm_file_list) AC_SUBST(tm_file_list)
AC_SUBST(tm_include_list) AC_SUBST(tm_include_list)
...@@ -3317,20 +3306,20 @@ done ...@@ -3317,20 +3306,20 @@ done
# FLAGS_TO_PASS has been modified to solve the problem there. # FLAGS_TO_PASS has been modified to solve the problem there.
# This is virtually a duplicate of what happens in configure.lang; we do # This is virtually a duplicate of what happens in configure.lang; we do
# an extra check to make sure this only happens if ln -s can be used. # an extra check to make sure this only happens if ln -s can be used.
if test "$symbolic_link" = "ln -s"; then case "$LN_S" in
for d in ${subdirs} ; do *-s*)
for d in ${subdirs} ; do
STARTDIR=`${PWDCMD-pwd}` STARTDIR=`${PWDCMD-pwd}`
cd $d cd $d
for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
do do
rm -f $t rm -f $t
$symbolic_link ../$t $t 2>/dev/null $LN_S ../$t $t 2>/dev/null
done done
cd $STARTDIR cd $STARTDIR
done done
else true ; fi ;;
esac
], ],
[subdirs='$subdirs' [subdirs='$subdirs'])
symbolic_link='$symbolic_link'
])
AC_OUTPUT AC_OUTPUT
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment