* [Buildroot] [PATCH] host-gcc-final: don't install a dead symlink
@ 2015-09-12 14:31 Arnout Vandecappelle
2015-09-13 19:16 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Arnout Vandecappelle @ 2015-09-12 14:31 UTC (permalink / raw)
To: buildroot
Nothing is installed into $(HOST_DIR)/usr/$(GNU_TARGET_NAME) by
host-gcc-final (only by binutils), so no 'gcc' executable exists
there. Therefore, the cc -> gcc symlink that is created in that
directory is dead.
Since this was not working, the symlink is clearly not needed, so
remove its installation command.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
package/gcc/gcc-final/gcc-final.mk | 3 ---
1 file changed, 3 deletions(-)
diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index 86b3c78..3426ba4 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -92,9 +92,6 @@ define HOST_GCC_FINAL_CREATE_CC_SYMLINKS
ln -snf $(GNU_TARGET_NAME)-gcc \
$(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc; \
fi
- if [ ! -e $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin/cc ]; then \
- ln -snf gcc $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin/cc; \
- fi
endef
HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_CREATE_CC_SYMLINKS
--
2.5.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] host-gcc-final: don't install a dead symlink
2015-09-12 14:31 [Buildroot] [PATCH] host-gcc-final: don't install a dead symlink Arnout Vandecappelle
@ 2015-09-13 19:16 ` Thomas Petazzoni
2015-09-14 21:38 ` Arnout Vandecappelle
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2015-09-13 19:16 UTC (permalink / raw)
To: buildroot
Arnout,
On Sat, 12 Sep 2015 16:31:55 +0200, Arnout Vandecappelle
(Essensium/Mind) wrote:
> Nothing is installed into $(HOST_DIR)/usr/$(GNU_TARGET_NAME) by
> host-gcc-final (only by binutils), so no 'gcc' executable exists
> there. Therefore, the cc -> gcc symlink that is created in that
> directory is dead.
>
> Since this was not working, the symlink is clearly not needed, so
> remove its installation command.
>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
> package/gcc/gcc-final/gcc-final.mk | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
> index 86b3c78..3426ba4 100644
> --- a/package/gcc/gcc-final/gcc-final.mk
> +++ b/package/gcc/gcc-final/gcc-final.mk
> @@ -92,9 +92,6 @@ define HOST_GCC_FINAL_CREATE_CC_SYMLINKS
> ln -snf $(GNU_TARGET_NAME)-gcc \
> $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc; \
> fi
> - if [ ! -e $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin/cc ]; then \
> - ln -snf gcc $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin/cc; \
> - fi
Hum, are you sure? When I look at an external toolchain built with
Buildroot, I see:
$ ls -l arm-buildroot-linux-uclibcgnueabi/bin/cc
lrwxrwxrwx 1 thomas thomas 3 ao?t 8 16:14 arm-buildroot-linux-uclibcgnueabi/bin/cc -> gcc
$ ls -l arm-buildroot-linux-uclibcgnueabi/bin/gcc
-rwxr-xr-x 1 thomas thomas 595798 ao?t 8 16:14 arm-buildroot-linux-uclibcgnueabi/bin/gcc
This is the only file named 'cc' in the toolchain.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] host-gcc-final: don't install a dead symlink
2015-09-13 19:16 ` Thomas Petazzoni
@ 2015-09-14 21:38 ` Arnout Vandecappelle
0 siblings, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2015-09-14 21:38 UTC (permalink / raw)
To: buildroot
On 13-09-15 21:16, Thomas Petazzoni wrote:
> Arnout,
>
> On Sat, 12 Sep 2015 16:31:55 +0200, Arnout Vandecappelle
> (Essensium/Mind) wrote:
>> Nothing is installed into $(HOST_DIR)/usr/$(GNU_TARGET_NAME) by
>> host-gcc-final (only by binutils), so no 'gcc' executable exists
>> there. Therefore, the cc -> gcc symlink that is created in that
>> directory is dead.
>>
>> Since this was not working, the symlink is clearly not needed, so
>> remove its installation command.
>>
>> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>> ---
>> package/gcc/gcc-final/gcc-final.mk | 3 ---
>> 1 file changed, 3 deletions(-)
>>
>> diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
>> index 86b3c78..3426ba4 100644
>> --- a/package/gcc/gcc-final/gcc-final.mk
>> +++ b/package/gcc/gcc-final/gcc-final.mk
>> @@ -92,9 +92,6 @@ define HOST_GCC_FINAL_CREATE_CC_SYMLINKS
>> ln -snf $(GNU_TARGET_NAME)-gcc \
>> $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc; \
>> fi
>> - if [ ! -e $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin/cc ]; then \
>> - ln -snf gcc $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin/cc; \
>> - fi
>
> Hum, are you sure? When I look at an external toolchain built with
> Buildroot, I see:
>
> $ ls -l arm-buildroot-linux-uclibcgnueabi/bin/cc
> lrwxrwxrwx 1 thomas thomas 3 ao?t 8 16:14 arm-buildroot-linux-uclibcgnueabi/bin/cc -> gcc
> $ ls -l arm-buildroot-linux-uclibcgnueabi/bin/gcc
> -rwxr-xr-x 1 thomas thomas 595798 ao?t 8 16:14 arm-buildroot-linux-uclibcgnueabi/bin/gcc
>
> This is the only file named 'cc' in the toolchain.
Ah, it seems that it was removed in gcc 4.9.x. Look at e.g.
br-arm-full-static-2015.08-rc1-38-gad0f85e.tar.bz2
There are quite a few gcc 4.9 or gcc 5 toolchains in the autobuilders and no
marked failures, so I still think it's going to be pretty harmless.
I created this patch because I'm working on the internal toolchain wrapper.
There has to be an equivalent real file for every wrapped executable, without
any intermediate symlinks - e.g. cc -> gcc -> toolchain-wrapper wouldn't work,
it has to be cc -> toolchain-wrapper and there has to be a cc.real -> gcc.real
as well. So all these additional symlinks are pretty annoying.
So, what do you think: resubmit with an updated commit message, or drop it and
handle the additional symlink in the internal toolchain wrapper?
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-14 21:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-12 14:31 [Buildroot] [PATCH] host-gcc-final: don't install a dead symlink Arnout Vandecappelle
2015-09-13 19:16 ` Thomas Petazzoni
2015-09-14 21:38 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox