diff options
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 63 |
1 files changed, 26 insertions, 37 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index c36bd01cd15..05e52d74946 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1490,32 +1490,24 @@ do done tmake_file="${tmake_file_}" -symbolic_link='ln -s' - # If the host doesn't support symlinks, modify CC in # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. # Otherwise, we can use "CC=$(CC)". rm -f symtest.tem -if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null -then - cc_set_by_configure="\$(CC)" - quoted_cc_set_by_configure="\$(CC)" - 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 - then - symbolic_link="cp -p" - else - symbolic_link="cp" - fi - 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 +case "$LN_S" in + *-s*) + cc_set_by_configure="\$(CC)" + quoted_cc_set_by_configure="\$(CC)" + stage_prefix_set_by_configure="\$(STAGE_PREFIX)" + quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" + ;; + *) + 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\\\`" + ;; +esac out_object_file=`basename $out_file .c`.o @@ -1754,7 +1746,7 @@ elif test -f $gcc_cv_as_gas_srcdir/configure.in \ in_tree_gas=yes _gcc_COMPUTE_GAS_VERSION 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 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ || (grep 'obj_format = multi' ../gas/Makefile \ @@ -1887,8 +1879,7 @@ changequote(,)dnl gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` changequote([,])dnl rm -f collect-ld$host_exeext - $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \ - 2>/dev/null + $LN ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null elif test -x "$LD_FOR_TARGET"; then gcc_cv_ld="$LD_FOR_TARGET" elif test -x "$LD" && test x$host = x$target; then @@ -1979,7 +1970,7 @@ elif test -f $gcc_cv_binutils_srcdir/configure.in \ in_tree_nm=yes gcc_cv_nm=./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 gcc_cv_nm=${program_prefix}nm$host_exeext else @@ -2001,8 +1992,7 @@ elif test -f $gcc_cv_binutils_srcdir/configure.in \ in_tree_objdump=yes gcc_cv_objdump=./objdump$host_exeext rm -f objdump$host_exeext - $symbolic_link ../binutils/objdump$host_exeext \ - objdump$host_exeext 2>/dev/null + $LN ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null elif test "x$program_prefix" != xNONE; then gcc_cv_objdump=${program_prefix}objdump$host_exeext else @@ -3254,7 +3244,6 @@ AC_SUBST(out_file) AC_SUBST(out_object_file) AC_SUBST(stage_prefix_set_by_configure) AC_SUBST(quoted_stage_prefix_set_by_configure) -AC_SUBST(symbolic_link) AC_SUBST(thread_file) AC_SUBST(tm_file_list) AC_SUBST(tm_include_list) @@ -3317,20 +3306,20 @@ done # FLAGS_TO_PASS has been modified to solve the problem there. # 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. -if test "$symbolic_link" = "ln -s"; then - for d in ${subdirs} ; do +case "$LN_S" in + *-s*) + for d in ${subdirs} ; do STARTDIR=`${PWDCMD-pwd}` cd $d for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include do rm -f $t - $symbolic_link ../$t $t 2>/dev/null + $LN_S ../$t $t 2>/dev/null done cd $STARTDIR - done -else true ; fi + done + ;; +esac ], -[subdirs='$subdirs' -symbolic_link='$symbolic_link' -]) +[subdirs='$subdirs']) AC_OUTPUT |