Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ln -s with $(LN_S) #2

Open
komh opened this issue Aug 12, 2024 · 0 comments
Open

Replace ln -s with $(LN_S) #2

komh opened this issue Aug 12, 2024 · 0 comments

Comments

@komh
Copy link

komh commented Aug 12, 2024

Hi/2.

This provides a choice to a user whether or not to use a symbolic link.

Here is the patch.

0001-Replace-ln-s-with-LN_S.patch

From 7a0f69b1a12f0f70e8a4d3619b0752820ac85977 Mon Sep 17 00:00:00 2001
From: KO Myung-Hun <[email protected]>
Date: Fri, 9 Aug 2024 21:43:15 +0900
Subject: [PATCH 1/4] Replace `ln -s' with `$(LN_S)'

---
 gcc/Makefile.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 2171693d4..8cbf65427 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2387,10 +2387,10 @@ CFLAGS-gcc-nm.o += $(DRIVER_DEFINES) \
 # ??? the implicit rules dont trigger if the source file has a different name
 # so copy instead
 gcc-ranlib.cc: gcc-ar.cc
-	ln -s $^ $@
+	$(LN_S) $^ $@
 
 gcc-nm.cc: gcc-ar.cc
-	ln -s $^ $@
+	$(LN_S) $^ $@
 
 COLLECT2_OBJS = collect2.o collect2-aix.o vec.o ggc-none.o \
   collect-utils.o file-find.o hash-table.o selftest.o
@@ -4127,7 +4127,7 @@ install-headers: $(INSTALL_HEADERS_DIR)
 	    dest=`ls -ld $(DESTDIR)$(libsubdir)/include-fixed/$$i | sed -n 's/.*-> //p'`; \
 	    if expr "$$dest" : "$$dir.*" > /dev/null; then \
 	      rm -f $(DESTDIR)$(libsubdir)/include-fixed/$$i; \
-	      ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(DESTDIR)$(libsubdir)/include-fixed/$$i; \
+	      $(LN_S) `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(DESTDIR)$(libsubdir)/include-fixed/$$i; \
 	    fi; \
 	  done; \
 	fi
-- 
2.42.0

@komh komh changed the title Replace ln -s' with $(LN_S)' Replace ln -s with $(LN_S) Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant