* [Buildroot] Why is sysroot under i686-buildroot-linux-gnu? @ 2014-01-03 23:54 Bryce Schober 2014-01-04 21:28 ` Thomas Petazzoni 0 siblings, 1 reply; 6+ messages in thread From: Bryce Schober @ 2014-01-03 23:54 UTC (permalink / raw) To: buildroot I'm using a custom external toolchain built by crosstool-ng that's a fairly ordinary configuration, other than using an old gcc-4.3 and glibc-2.9, ending up with a i686-unknown-linux-gnu toolchain. Why does buildroot end up installing the toolchain sysroot under output/host/usr/i686-buildroot-linux-gnu instead of under output/host/usr/i686-unknown-linux-gnu? This is causing some problems in some of my external makefiles I have that expect the sysroot dir to match the toolchain tuple... <>< <>< <>< Bryce Schober ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Why is sysroot under i686-buildroot-linux-gnu? 2014-01-03 23:54 [Buildroot] Why is sysroot under i686-buildroot-linux-gnu? Bryce Schober @ 2014-01-04 21:28 ` Thomas Petazzoni 2014-01-06 18:39 ` Bryce Schober 0 siblings, 1 reply; 6+ messages in thread From: Thomas Petazzoni @ 2014-01-04 21:28 UTC (permalink / raw) To: buildroot Dear Bryce Schober, On Fri, 3 Jan 2014 15:54:09 -0800, Bryce Schober wrote: > I'm using a custom external toolchain built by crosstool-ng that's a > fairly ordinary configuration, other than using an old gcc-4.3 and > glibc-2.9, ending up with a i686-unknown-linux-gnu toolchain. > > Why does buildroot end up installing the toolchain sysroot under > output/host/usr/i686-buildroot-linux-gnu instead of under > output/host/usr/i686-unknown-linux-gnu? Just because we set the vendor part of the tuple to "Buildroot" to distinguish the Buildroot compiler/sysroot from the one of the original toolchain. There is no strong need for this, it's just a bit nicer. > This is causing some problems in some of my external makefiles I have > that expect the sysroot dir to match the toolchain tuple... They do: in host/usr/bin/, you have a compiler whose tuple matches the sysroot directory name. Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Why is sysroot under i686-buildroot-linux-gnu? 2014-01-04 21:28 ` Thomas Petazzoni @ 2014-01-06 18:39 ` Bryce Schober 2014-01-07 6:45 ` Thomas Petazzoni 0 siblings, 1 reply; 6+ messages in thread From: Bryce Schober @ 2014-01-06 18:39 UTC (permalink / raw) To: buildroot On Sat, Jan 4, 2014 at 1:28 PM, Thomas Petazzoni < thomas.petazzoni@free-electrons.com> wrote: > > Why does buildroot end up installing the toolchain sysroot under > > output/host/usr/i686-buildroot-linux-gnu instead of under > > output/host/usr/i686-unknown-linux-gnu? > > Just because we set the vendor part of the tuple to "Buildroot" to > distinguish the Buildroot compiler/sysroot from the one of the original > toolchain. There is no strong need for this, it's just a bit nicer. > Where is this done? In some brief probing of the toolchain makefiles, I didn't see it. Also it would be nice if it was an optional behavior, maybe I'll submit a patch when I find it... > > This is causing some problems in some of my external makefiles I have > > that expect the sysroot dir to match the toolchain tuple... > > They do: in host/usr/bin/, you have a compiler whose tuple matches the > sysroot directory name. > Yeah, my complaint is that the tuple in the path for the sysroot is different than that of the compiler, which makes any external reference to the buildroot toolchain more complicated. I have external makefiles that use the buildroot toolchain, and now I'll have to keep a $TOOLCHAIN_NAME separate from a $SYSROOT_NAME. <>< <>< <>< Bryce Schober -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140106/3e3b9ce0/attachment.html> ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Why is sysroot under i686-buildroot-linux-gnu? 2014-01-06 18:39 ` Bryce Schober @ 2014-01-07 6:45 ` Thomas Petazzoni 2014-01-07 20:43 ` Bryce Schober 0 siblings, 1 reply; 6+ messages in thread From: Thomas Petazzoni @ 2014-01-07 6:45 UTC (permalink / raw) To: buildroot Dear Bryce Schober, On Mon, 6 Jan 2014 10:39:34 -0800, Bryce Schober wrote: > > > Why does buildroot end up installing the toolchain sysroot under > > > output/host/usr/i686-buildroot-linux-gnu instead of under > > > output/host/usr/i686-unknown-linux-gnu? > > > > Just because we set the vendor part of the tuple to "Buildroot" to > > distinguish the Buildroot compiler/sysroot from the one of the original > > toolchain. There is no strong need for this, it's just a bit nicer. > > Where is this done? In some brief probing of the toolchain makefiles, I > didn't see it. Also it would be nice if it was an optional behavior, maybe > I'll submit a patch when I find it... http://git.buildroot.net/buildroot/tree/package/Makefile.in#n23 > > > This is causing some problems in some of my external makefiles I have > > > that expect the sysroot dir to match the toolchain tuple... > > > > They do: in host/usr/bin/, you have a compiler whose tuple matches the > > sysroot directory name. > > > > Yeah, my complaint is that the tuple in the path for the sysroot is > different than that of the compiler, which makes any external reference to > the buildroot toolchain more complicated. I have external makefiles that > use the buildroot toolchain, and now I'll have to keep a $TOOLCHAIN_NAME > separate from a $SYSROOT_NAME. Ok, I think I see what you mean. Can you test the following patch and see if it fixes the problem for you? diff --git a/package/Makefile.in b/package/Makefile.in index f5d6289..44cf046 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -138,11 +138,7 @@ TARGET_CFLAGS += -fstack-protector-all TARGET_CXXFLAGS += -fstack-protector-all endif -ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) TARGET_CROSS=$(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)- -else -TARGET_CROSS=$(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))- -endif # Quotes are needed for spaces et al in path components. TARGET_PATH="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)" diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk index 1084ee2..cbfc15d 100644 --- a/toolchain/toolchain-external/toolchain-external.mk +++ b/toolchain/toolchain-external/toolchain-external.mk @@ -589,17 +589,18 @@ define TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER mkdir -p $(HOST_DIR)/usr/bin; cd $(HOST_DIR)/usr/bin; \ for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \ base=$${i##*/}; \ + tool=$${base##$(TOOLCHAIN_EXTERNAL_PREFIX)-}; \ case "$$base" in \ *cc|*cc-*|*++|*++-*|*cpp) \ - ln -sf ext-toolchain-wrapper $$base; \ + ln -sf ext-toolchain-wrapper $(TARGET_CROSS)$$tool; \ ;; \ *gdb|*gdbtui) \ if test "$(BR2_PACKAGE_HOST_GDB)" != "y"; then \ - ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \ + ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') $(TARGET_CROSS)$$tool ; \ fi \ ;; \ *) \ - ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \ + ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') $(TARGET_CROSS)$$tool; \ ;; \ esac; \ done ; -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] Why is sysroot under i686-buildroot-linux-gnu? 2014-01-07 6:45 ` Thomas Petazzoni @ 2014-01-07 20:43 ` Bryce Schober 2014-01-07 22:04 ` Thomas Petazzoni 0 siblings, 1 reply; 6+ messages in thread From: Bryce Schober @ 2014-01-07 20:43 UTC (permalink / raw) To: buildroot On Mon, Jan 6, 2014 at 10:45 PM, Thomas Petazzoni < thomas.petazzoni@free-electrons.com> wrote: > Ok, I think I see what you mean. Can you test the following patch and > see if it fixes the problem for you? > I don't see how it could, at least not as I was thinking, since STAGING_SUBDIR still uses $(GNU_TARGET_NAME)... <>< <>< <>< Bryce Schober -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140107/1a7e98e8/attachment-0001.html> ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Why is sysroot under i686-buildroot-linux-gnu? 2014-01-07 20:43 ` Bryce Schober @ 2014-01-07 22:04 ` Thomas Petazzoni 0 siblings, 0 replies; 6+ messages in thread From: Thomas Petazzoni @ 2014-01-07 22:04 UTC (permalink / raw) To: buildroot Dear Bryce Schober, On Tue, 7 Jan 2014 12:43:41 -0800, Bryce Schober wrote: > On Mon, Jan 6, 2014 at 10:45 PM, Thomas Petazzoni < > thomas.petazzoni at free-electrons.com> wrote: > > > Ok, I think I see what you mean. Can you test the following patch and > > see if it fixes the problem for you? > > I don't see how it could, at least not as I was thinking, since > STAGING_SUBDIR still uses $(GNU_TARGET_NAME)... Yes, but the name of the compiler in host/usr/bin now matches the sysroot directory name, which is what you requested in the first place: $ ls output/host/usr/ arm-buildroot-linux-uclibcgnueabi bin lib share $ ls output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc Note that we are *not* interested in having the sysroot directory name match the tuple of your original toolchain. What this patch is doing is that it is making sure that the sysroot directory name matches the tuple of the Buildroot generated toolchain (which is either a toolchain fully built by Buildroot, or a set of symlinks+wrapper when an external toolchain is used). So the fact that the compiler in output/host/opt/ext-toolchain/ might have a different tuple is expected. Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-01-07 22:04 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-01-03 23:54 [Buildroot] Why is sysroot under i686-buildroot-linux-gnu? Bryce Schober 2014-01-04 21:28 ` Thomas Petazzoni 2014-01-06 18:39 ` Bryce Schober 2014-01-07 6:45 ` Thomas Petazzoni 2014-01-07 20:43 ` Bryce Schober 2014-01-07 22:04 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox