Commit ac64120e by Jim Wilson

Add Fred Fish's LN/LN_S patch.

From-SVN: r15415
parent 7f699781
Thu Sep 11 11:09:43 1997 Jeffrey A Law (law@cygnus.com)
* loop.c (strength_reduce): Fix typo.
Wed Sep 10 21:37:30 1997 Jeffrey A Law (law@cygnus.com)
* version.c: Bump for snapshot.
......@@ -14,6 +10,17 @@ Wed Sep 10 17:05:46 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
* config/alpha/elf.h (CPP_PREDEFINES): Remove -D__PIC__ -D__pic__.
Wed Sep 10 16:37:28 1997 Fred Fish <fnf@ninemoons.com>
* Makefile.in (LN, LN_S): New macros, use where appropriate.
* aclocal.m4 (GCC_PROG_LN_S, GCC_PROG_LN): New tests.
* configure.in: Use GCC_PROG_LN_S and GCC_PROG_LN.
* configure: Regenerated.
Thu Sep 11 11:09:43 1997 Jeffrey A Law (law@cygnus.com)
* loop.c (strength_reduce): Fix typo.
Wed Sep 10 16:01:15 1997 Jim Wilson <wilson@cygnus.com>
* m88k/m88k.c (struct option): Rename to struct options.
......
......@@ -77,6 +77,10 @@ DLLTOOL = dlltool
SHELL = /bin/sh
# on sysV, define this as cp.
INSTALL = @INSTALL@
# Some systems may be missing symbolic links, regular links, or both.
# Allow configure to check this and use "ln -s", "ln", or "cp" as appropriate.
LN=@LN@
LN_S=@LN_S@
# These permit overriding just for certain files.
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)
......@@ -530,6 +534,8 @@ FLAGS_TO_PASS = \
"LDFLAGS=$(LDFLAGS)" \
"LEX=$(LEX)" \
"LEXFLAGS=$(LEXFLAGS)" \
"LN=$(LN)" \
"LN_S=$(LN_S)" \
"MAKEINFO=$(MAKEINFO)" \
"MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
......@@ -1187,8 +1193,7 @@ c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
# To make a configuration always use collect2, set USE_COLLECT2 to ld.
ld: collect2
rm -f ld$(exeext)
ln collect2$(exeext) ld$(exeext) > /dev/null 2>&1 \
|| cp collect2$(exeext) ld$(exeext)
$(LN) collect2$(exeext) ld$(exeext)
collect2: collect2.o tlink.o hash.o cplus-dem.o underscore.o version.o \
choose-temp.o $(LIBDEPS)
......@@ -1717,8 +1722,7 @@ bytecode.maintainer-clean: bytecode.clean
# Making the preprocessor
cpp: $(CCCP)
-rm -f cpp$(exeext)
ln $(CCCP)$(exeext) cpp$(exeext) > /dev/null 2>&1 \
|| cp $(CCCP)$(exeext) cpp$(exeext)
$(LN) $(CCCP)$(exeext) cpp$(exeext)
cccp: cccp.o cexp.o version.o $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o \
version.o $(LIBS)
......@@ -2239,9 +2243,7 @@ install-driver: xgcc
rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
$(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
rm -f $(bindir)/$(target_alias)-gcc-1$(exeext); \
ln $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext) \
> /dev/null 2>&1 \
|| cp $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \
$(LN) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \
mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(target_alias)-gcc$(exeext); \
fi
......@@ -2299,6 +2301,7 @@ install-multilib: stmp-multilib installdirs
install-headers: install-include-dir $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H)
# Fix symlinks to absolute paths in the installed include directory to
# point to the installed directory, not the build directory.
# Don't need to use LN_S here since we really do need ln -s and no substitutes.
-files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
if [ $$? -eq 0 ]; then \
dir=`cd include; pwd`; \
......@@ -2509,7 +2512,7 @@ distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
mkdir tmp/ginclude
mkdir tmp/objc
for file in *[0-9a-zA-Z+]; do \
ln $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
$(LN) $$file tmp; \
done
cd config; \
for file in *[0-9a-zA-Z+]; do \
......@@ -2517,25 +2520,22 @@ distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
mkdir ../tmp/config/$$file; \
cd $$file; \
for subfile in *[0-9a-zA-Z+]; do \
ln $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
|| cp $$subfile ../../tmp/config/$$file; \
$(LN) $$subfile ../../tmp/config/$$file; \
done; \
cd ..; \
else \
ln $$file ../tmp/config >/dev/null 2>&1 \
|| cp $$file ../tmp/config; \
$(LN) $$file ../tmp/config; \
fi; \
done
cd ginclude; \
for file in *[0-9a-zA-Z+]; do \
ln $$file ../tmp/ginclude >/dev/null 2>&1 \
|| cp $$file ../tmp/ginclude; \
$(LN) $$file ../tmp/ginclude; \
done
cd objc; \
for file in *[0-9a-zA-Z+]; do \
ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
$(LN) $$file ../tmp/objc; \
done
ln .gdbinit tmp
$(LN) .gdbinit tmp
# Finish making `distdir', after the languages have done their thing.
distdir-finish:
......@@ -2609,8 +2609,6 @@ compare: force
exit 1; \
else true; \
fi
# Similar, but compare with stage3 directory
compare3: force
......@@ -2669,9 +2667,9 @@ stage1-start:
-mv $(STAGESTUFF) stage1
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
-if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage1 || cp as$(exeext) stage1 ; else true ; fi
-if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage1 || cp ld$(exeext) stage1 ; else true ; fi
-if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage1 || cp collect-ld$(exeext) stage1 ; else true ; fi
-if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage1 ; else true ; fi
-if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage1 ; else true ; fi
-if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage1 ; else true ; fi
-rm -f stage1/libgcc.a
-cp libgcc.a stage1
-if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
......@@ -2690,9 +2688,9 @@ stage2-start:
-mv $(STAGESTUFF) stage2
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
-if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage2 || cp as$(exeext) stage2 ; else true ; fi
-if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage2 || cp ld$(exeext) stage2 ; else true ; fi
-if [ -f collect-ld ] ; then ln -s ../collect-ld$(exeext) stage2 || cp collect-ld$(exeext) stage2 ; else true ; fi
-if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage2 ; else true ; fi
-if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage2 ; else true ; fi
-if [ -f collect-ld ] ; then $(LN_S) ../collect-ld$(exeext) stage2 ; else true ; fi
-rm -f stage2/libgcc.a
-cp libgcc.a stage2
-if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
......@@ -2711,9 +2709,9 @@ stage3-start:
-mv $(STAGESTUFF) stage3
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
-if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage3 || cp as$(exeext) stage3 ; else true ; fi
-if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage3 || cp ld$(exeext) stage3 ; else true ; fi
-if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage3 || cp collect-ld$(exeext) stage3 ; else true ; fi
-if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage3 ; else true ; fi
-if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage3 ; else true ; fi
-if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage3 ; else true ; fi
-rm -f stage3/libgcc.a
-cp libgcc.a stage3
-if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
......@@ -2732,9 +2730,9 @@ stage4-start:
-mv $(STAGESTUFF) stage4
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
-if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage4 || cp as$(exeext) stage4 ; else true ; fi
-if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage4 || cp ld$(exeext) stage4 ; else true ; fi
-if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage4 || cp collect-ld$(exeext) stage4 ; else true ; fi
-if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage4 ; else true ; fi
-if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage4 ; else true ; fi
-if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage4 ; else true ; fi
-rm -f stage4/libgcc.a
-cp libgcc.a stage4
-if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
......
......@@ -25,3 +25,67 @@ if test $gcc_cv_decl_needed_$1 = yes; then
AC_DEFINE_UNQUOTED($gcc_tr_decl)
fi
])dnl
dnl See if symbolic links work and if not, try to substitute either hard links or simple copy.
AC_DEFUN(GCC_PROG_LN_S,
[AC_MSG_CHECKING(whether ln -s works)
AC_CACHE_VAL(gcc_cv_prog_LN_S,
[rm -f conftestdata_to
echo >conftestdata_from
if ln -s conftestdata_from conftestdata_to 2>/dev/null
then
gcc_cv_prog_LN_S="ln -s"
else
if ln conftestdata_from conftestdata_to 2>/dev/null
then
gcc_cv_prog_LN_S=ln
else
gcc_cv_prog_LN_S=cp
fi
fi
rm -f conftestdata_from conftestdata_to
])dnl
LN_S="$gcc_cv_prog_LN_S"
if test "$gcc_cv_prog_LN_S" = "ln -s"; then
AC_MSG_RESULT(yes)
else
if test "$gcc_cv_prog_LN_S" = "ln"; then
AC_MSG_RESULT([no, using ln])
else
AC_MSG_RESULT([no, and neither does ln, so using cp])
fi
fi
AC_SUBST(LN_S)dnl
])
dnl See if hard links work and if not, try to substitute either symbolic links or simple copy.
AC_DEFUN(GCC_PROG_LN,
[AC_MSG_CHECKING(whether ln works)
AC_CACHE_VAL(gcc_cv_prog_LN,
[rm -f conftestdata_to
echo >conftestdata_from
if ln conftestdata_from conftestdata_to 2>/dev/null
then
gcc_cv_prog_LN="ln"
else
if ln -s conftestdata_from conftestdata_to 2>/dev/null
then
gcc_cv_prog_LN="ln -s"
else
gcc_cv_prog_LN=cp
fi
fi
rm -f conftestdata_from conftestdata_to
])dnl
LN="$gcc_cv_prog_LN"
if test "$gcc_cv_prog_LN" = "ln"; then
AC_MSG_RESULT(yes)
else
if test "$gcc_cv_prog_LN" = "ln -s"; then
AC_MSG_RESULT([no, using ln -s])
else
AC_MSG_RESULT([no, and neither does ln -s, so using cp])
fi
fi
AC_SUBST(LN)dnl
])
......@@ -124,7 +124,8 @@ AC_CANONICAL_SYSTEM
# Find some useful tools
AC_PROG_AWK
AC_PROG_LEX
AC_PROG_LN_S
GCC_PROG_LN
GCC_PROG_LN_S
AC_PROG_RANLIB
AC_PROG_YACC
AC_PROG_INSTALL
......
Wed Sep 10 16:39:26 1997 Jim Wilson <wilson@cygnus.com>
* Make-lang.in (LN, LN_S): New macros, use where appropriate.
......@@ -74,7 +74,7 @@ C++ c++: cc1plus
g++.c: $(srcdir)/gcc.c
-rm -f $@
ln -s $(srcdir)/gcc.c $@ || cp $(srcdir)/gcc.c $@
$(LN_S) $(srcdir)/gcc.c $@
g++spec.o: $(srcdir)/cp/g++spec.c
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/cp/g++spec.c
......@@ -101,8 +101,7 @@ g++-cross$(exeext): g++$(exeext)
cxxmain.o: cplus-dem.c demangle.h
rm -f cxxmain.c
ln -s $(srcdir)/cplus-dem.c cxxmain.c > /dev/null 2>&1 \
|| cp $(srcdir)/cplus-dem.c cxxmain.c
$(LN_S) $(srcdir)/cplus-dem.c cxxmain.c
$(CC) -c -DMAIN $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DVERSION=\"$(version)\" cxxmain.c
rm -f cxxmain.c
......@@ -199,17 +198,13 @@ c++.install-common:
$(INSTALL_PROGRAM) g++-cross$(exeext) $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
chmod a+x $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
rm -f $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
ln $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext) \
> /dev/null 2>&1 \
|| cp $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext) ; \
$(LN) $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
else \
rm -f $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
$(INSTALL_PROGRAM) g++$(exeext) $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
chmod a+x $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
rm -f $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
ln $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) \
> /dev/null 2>&1 \
|| cp $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) ; \
$(LN) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
fi ; \
fi
......@@ -273,5 +268,5 @@ c++.distdir:
cd cp ; $(MAKE) $(FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) parse.c hash.h
cd cp; \
for file in *[0-9a-zA-Z+]; do \
ln $$file ../tmp/cp >/dev/null 2>&1 || cp $$file ../tmp/cp; \
$(LN) $$file ../tmp/cp; \
done
Wed Sep 10 16:39:47 1997 Jim Wilson <wilson@cygnus.com>
* Make-lang.in (LN, LN_S): New macros, use where appropriate.
Tue Sep 9 13:20:40 1997 Jim Wilson <wilson@cygnus.com>
* g77.c (pexecute, doit): Add checks for __CYGWIN32__.
......
......@@ -450,9 +450,7 @@ f77.install-common:
chmod a+x $(bindir)/$(G77_CROSS_NAME)$(exeext); \
if $(F77_INSTALL_FLAG) ; then \
rm -f $(bindir)/$(F77_CROSS_NAME)$(exeext); \
ln $(bindir)/$(G77_CROSS_NAME)$(exeext) $(bindir)/$(F77_CROSS_NAME)$(exeext) \
> /dev/null 2>&1 \
|| cp $(bindir)/$(G77_CROSS_NAME)$(exeext) $(bindir)/$(F77_CROSS_NAME)$(exeext) ; \
$(LN) $(bindir)/$(G77_CROSS_NAME)$(exeext) $(bindir)/$(F77_CROSS_NAME)$(exeext); \
fi ; \
else \
rm -f $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
......@@ -460,9 +458,7 @@ f77.install-common:
chmod a+x $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
if $(F77_INSTALL_FLAG) ; then \
rm -f $(bindir)/$(F77_INSTALL_NAME)$(exeext); \
ln $(bindir)/$(G77_INSTALL_NAME)$(exeext) $(bindir)/$(F77_INSTALL_NAME)$(exeext) \
> /dev/null 2>&1 \
|| cp $(bindir)/$(G77_INSTALL_NAME)$(exeext) $(bindir)/$(F77_INSTALL_NAME)$(exeext) ; \
$(LN) $(bindir)/$(G77_INSTALL_NAME)$(exeext) $(bindir)/$(F77_INSTALL_NAME)$(exeext); \
fi ; \
fi ; \
else true; fi
......@@ -485,9 +481,7 @@ f77.install-man: $(srcdir)/f/g77.1
chmod a-x $(mandir)/$(G77_CROSS_NAME)$(manext); \
if $(F77_INSTALL_FLAG) ; then \
rm -f $(mandir)/$(F77_CROSS_NAME)$(manext); \
ln $(mandir)/$(G77_CROSS_NAME)$(manext) $(mandir)/$(F77_CROSS_NAME)$(manext) \
> /dev/null 2>&1 \
|| cp $(mandir)/$(F77_CROSS_NAME)$(manext) $(mandir)/$(F77_CROSS_NAME)$(manext) ; \
$(LN) $(mandir)/$(G77_CROSS_NAME)$(manext) $(mandir)/$(F77_CROSS_NAME)$(manext); \
fi ;\
else \
rm -f $(mandir)/$(G77_INSTALL_NAME)$(manext); \
......@@ -495,9 +489,7 @@ f77.install-man: $(srcdir)/f/g77.1
chmod a-x $(mandir)/$(G77_INSTALL_NAME)$(manext); \
if $(F77_INSTALL_FLAG) ; then \
rm -f $(mandir)/$(F77_INSTALL_NAME)$(manext); \
ln $(mandir)/$(G77_INSTALL_NAME)$(manext) $(mandir)/$(F77_INSTALL_NAME)$(manext) \
> /dev/null 2>&1 \
|| cp $(mandir)/$(F77_INSTALL_NAME)$(manext) $(mandir)/$(F77_INSTALL_NAME)$(manext) ; \
$(LN) $(mandir)/$(G77_INSTALL_NAME)$(manext) $(mandir)/$(F77_INSTALL_NAME)$(manext); \
fi ;\
fi; \
else true; fi
......@@ -606,5 +598,5 @@ f77.distdir: f77.rebuilt
mkdir tmp/f
cd f; \
for file in *[0-9a-zA-Z+]; do \
ln $$file ../tmp/f >/dev/null 2>&1 || cp $$file ../tmp/f; \
($LN) $$file ../tmp/f
done
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