This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Configuring gcc without symlink support

Some environments don't support symbolic links :-(

If ln -s is not supported, configure can figure it out, and as a last resort uses:

LN_S = cp -p

I've found two problems with this.

The first problem is that LN_S is not propagated past the top-level Makefile. This
can manifest as strange GCC_NO_EXECUTABLES messages:

	Link tests are not allowed after GCC_NO_EXECUTABLES

The patch (against an older gcc 4.2.4) addresses this first problem.

The second is that:

	cp -p $1 $2  mimics  ln -s $1 $2

only if $1 is an absolute path, or $2 does not contain any path separators.
This is not always true. For example:

gcc/gcc/config/t-slibgcc-elf-ver:       $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)

There doesn't seem to be any straightforward way around this
except diligence:



--- gcc/gcc/    2012-02-01 11:27:52.783587886 -0800
+++ gcc/gcc/ 2012-02-01 11:56:37.973586113 -0800
@@ -1465,6 +1465,7 @@
+       LN_S='$(LN_S)' \
        mkinstalldirs='$(mkinstalldirs)' \
          $(SHELL) mklibgcc >
--- gcc/        2012-02-01 15:08:00.353579677 -0800
+++ gcc/     2012-02-01 15:09:38.196088006 -0800
@@ -486,7 +486,8 @@
        "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
        "LEAN=$(LEAN)" \
        "CONFIG_SHELL=$(SHELL)" \
+       "LN_S=$(LN_S)"

 # We leave this in just in case, but it is not needed anymore.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]