From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Thu, 25 Mar 2010 23:32:14 +0100 Subject: [Buildroot] external toolchain and sysroot In-Reply-To: References: <1272730299.20100325182803@ya.ru> Message-ID: <20100325233214.26a4f01d@surf> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hello, On Thu, 25 Mar 2010 16:14:19 +0000 (UTC) Grant Edwards wrote: > > But in linking phase: > > /home/yury/toolchain/arm-indigo-linux-uclibcgnueabi/bin/arm-indigo-linux-uclibcgnueabi-gcc > > -DAUTOCONF -DPOSIX -DUSG -o em ansi.o basic.o bind.o buffer.o crypt.o display.o eval.o exec.o > > file.o fileio.o ibmpc.o input.o isearch.o line.o lock.o main.o pklock.o posix.o random.o > > region.o search.o spawn.o tcap.o termio.o vmsvt.o vt52.o window.o word.o -lncurses > > /home/yury/toolchain/arm-indigo-linux-uclibcgnueabi/lib/gcc/arm-indigo-linux-uclibcgnueabi/4.3.4/../.. > > /../../arm-indigo-linux-uclibcgnueabi/bin/ld: cannot find -lncurses > > > > here --sysroot is omitted and thus I'm very sad :-) That's a problem of uemacs.mk, as you found out later. In fact, many of the packages that do not use the Makefile.autotools.in infrastructure are broken with regard to external toolchain support. I've fixed some of the packages I tested, but I couldn't fix them all. So it's our job, external toolchain users, to progressively fix all packages so that they build nicely with external toolchains. Of course, if you don't know how to fix a package, just report the bug, so we'll know it's broken and we'll try to fix it. > I know how you feel. That's exactly the same problem I had building > busybox two weeks ago: --sysroot was passed correctly in the compile > phase, but wasn't passed in the link phase. Apparently the external > toolchains used by the devs don't need a --sysroot during linking. > Apparently our toolchains do. I don't think so. Just like Yury, I use toolchains generated by Crosstool-NG (for i686, ARM glibc, ARM uClibc OABI, ARM uClibc EABI, PowerPC, etc.). So I encounter the same problem, it's just that I never tried to build uemacs or vsftpd. > > I can't figure this out by myself. TARGET_LDFLAGS are good, > > TARGET_CFLAGS are too. > > In the busybox .mk file, I found that TARGET_LDFLAGS wasn't being used > (it wasn't being passed to the "make" command). I had to patch the > .mk file to pass the TARGET_LDFLAGS value to make. I've seen your bug about this and I don't have the same problem with Crosstool-NG toolchains. It's still on my TODO-list to try to reproduce the problem you're having. For the moment, I'm busy doing some more heavy development work for Buildroot, I plan to do more bug-fixing related work during the last month of the release cycle. Regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com