On 15/12/2015 21:27, Ken Moffat wrote:
> On Tue, Dec 15, 2015 at 07:00:15PM +0000, Read, James C wrote:
>>
>> At this stage I can only make suggestions as I don't know enough about the
>> correct assertions to make. But what about running this after each build
>> from the second pass of binutils onwards to check that no binaries or
>> libraries are incorrectly linked to host libraries:
>>
>> for P in /tools/bin/* ; do echo $P ; ldd $P | grep ' /lib/' ; done
>> for P in /tools/lib/* ; do echo $P ; ldd $P | grep ' /lib/' ; done
>>
>
> I did say on -support that those were quick suggestions. Your later
> posts on -support, and now Chris's confirmation, show that the
> ${LFS_TGT} programs need to be ignored. Also, those hacks were to
> help identify _which_ progs or libs were wrong. The initial tests
> can drop the 'echo $P ;' in the expectation that nothing will be
> found.
>
Actually, we could improve the sanity check after gcc-pass2 to something like:
---
echo 'int main(){}' > dummy.c
cc -v -Wl,-verbose -lrt dummy.c >& dummy.log
readelf -l a.out | grep ': /tools'
grep libpthread dummy.log # should return /tools/lib/libpthread
# or /mnt/lfs/tools/lib/libpthread
# maybe a few other "grep"
---
I guess that, if it passes, a lot of common errors have been avoided. It would
not tell where the error is, but at least it would prevent beginning the build
with a bad toolchain.
Pierre
Pierre
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page