Patchwork [PATCHv2,09/14] gcc: force symlink creation

login
register
mail settings
Submitter Thomas Petazzoni
Date Sept. 2, 2013, 4:06 p.m.
Message ID <1378138000-12739-10-git-send-email-thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/271986/
State Accepted
Headers show

Comments

Thomas Petazzoni - Sept. 2, 2013, 4:06 p.m.
The HOST_GCC_CONFIGURE_SYMLINK creates a symbolic link
$(@D)/build/configure -> $(@D)/configure for each build step of
gcc. However, it was only using 'ln -s' and not 'ln -sf', which was
causing problems when doing 'make host-gcc-final-reconfigure' for
example, because the configure commands (including this macro) are
being re-executed, but the symbolic link already exists.

Changing this symbolic link creation to 'ln -sf' fixes this problem.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gcc/gcc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Peter Korsgaard - Sept. 15, 2013, 9:08 p.m.
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> The HOST_GCC_CONFIGURE_SYMLINK creates a symbolic link
 Thomas> $(@D)/build/configure -> $(@D)/configure for each build step of
 Thomas> gcc. However, it was only using 'ln -s' and not 'ln -sf', which was
 Thomas> causing problems when doing 'make host-gcc-final-reconfigure' for
 Thomas> example, because the configure commands (including this macro) are
 Thomas> being re-executed, but the symbolic link already exists.

 Thomas> Changing this symbolic link creation to 'ln -sf' fixes this problem.

Committed, thanks.

Patch

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index cd6efed..20d6d14 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -76,7 +76,7 @@  endef
 
 define HOST_GCC_CONFIGURE_SYMLINK
 	mkdir -p $(@D)/build
-	ln -s ../configure $(@D)/build/configure
+	ln -sf ../configure $(@D)/build/configure
 endef
 
 #