This is the mail archive of the gcc-patches@gcc.gnu.org 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:

	cd $(SHLIB_DIR) && $(LN_S) $(SHLIB_SONAME) $(SHLIB_SOLINK)


Earl


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

 # We leave this in just in case, but it is not needed anymore.
 RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS)





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