Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] gcc-final: hard link TARGET-cc -> TARGET-gcc
@ 2015-11-04  7:34 Steven Noonan
  2015-11-04 21:39 ` Arnout Vandecappelle
  2015-11-08 14:01 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Steven Noonan @ 2015-11-04  7:34 UTC (permalink / raw)
  To: buildroot

Doing a symlink results in incorrect behavior:

    $ x86_64-buildroot-linux-gnux32-cc
    --version
    ccache: error: execv of [...]/x86_64-buildroot-linux-gnux32-cc.br_real.br_real failed: No such file or directory

    $ x86_64-buildroot-linux-gnux32-gcc --version
    x86_64-buildroot-linux-gnux32-gcc.br_real (Buildroot 2015.11-git-00965-g8d89653-dirty) 5.2.0
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Note the double .br_real on the invocation by toolchain-wrapper.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
---
 package/gcc/gcc-final/gcc-final.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index 8ac2968..7ccc533 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -91,7 +91,7 @@ HOST_GCC_FINAL_MAKE_OPTS += $(HOST_GCC_COMMON_MAKE_OPTS)
 # Make sure we have 'cc'
 define HOST_GCC_FINAL_CREATE_CC_SYMLINKS
 	if [ ! -e $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc ]; then \
-		ln -snf $(GNU_TARGET_NAME)-gcc \
+		cp -l $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc \
 			$(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc; \
 	fi
 endef
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-08 14:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-04  7:34 [Buildroot] [PATCH] gcc-final: hard link TARGET-cc -> TARGET-gcc Steven Noonan
2015-11-04 21:39 ` Arnout Vandecappelle
2015-11-04 23:05   ` Steven Noonan
2015-11-08 14:01 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox