2011/4/27 Aleksander Wabik <[email protected]>: >>2011/4/23 Aleksander Wabik <[email protected]>: >>> 2) Binutils-2.21 build fails: >>> .... > Reproduced with the clean env: > > ar: can't set BFD > default target to `x86_64-unknown-linux-gnu': Invalid bfd target > make[4]: *** [libbfd.la] Error 1 make[4]: Leaving directory > `/media/krypta/clfs-mips/rootfs/sources/binutils-build/bfd' make[3]: > *** [all-recursive] Error 1 make[3]: Leaving directory > `/media/krypta/clfs-mips/rootfs/sources/binutils-build/bfd' make[2]: > *** [all] Error 2 make[2]: Leaving directory > `/media/krypta/clfs-mips/rootfs/sources/binutils-build/bfd' make[1]: > *** [all-bfd] Error 2 make[1]: Leaving directory > `/media/krypta/clfs-mips/rootfs/sources/binutils-build' make: *** [all] > Error 2 > Environment: > > $ env > CLFS_HOST=x86_64-cross-linux-gnu > TERM=xterm > CLFS_TARGET=mips-unknown-linux-uclibc > OLDPWD=/media/krypta/clfs-mips/rootfs/sources/binutils-2.21 > LC_ALL=POSIX > CLFS=/media/krypta/clfs-mips/rootfs > PATH=/media/krypta/clfs-mips/rootfs/cross-tools/bin:/bin:/usr/bin:/usr/local/bin > PWD=/media/krypta/clfs-mips/rootfs/sources/binutils-build > CLFS_ARCH=mips > PS1=\u:\w\$ > SHLVL=1 > HOME=/home/clfs > CLFS_MIPS_LEVEL=32
CLFS_MIPS_LEVEL shouldn't be anything other than "1" or "3". This isn't the problem for binutils, but thought I'd mention it. It could affect GCC compilation. > CLFS_ABI=32 > CLFS_ENDIAN=big > CLFS_FLOAT=hard > _=/usr/bin/env > > Please notice, that my CLFS_HOST is x86_64-cross-linux-gnu, and my > whole system is x86_64-unknown-linux-gnu - that's the one that can't be > set as BFD target. Noted. The reason I'm confused is because my binutils configures for x86_64-unknown-linux-gnu as well, and I don't have any issues building binutils (just built cleanly again while writing this email). My CLFS_HOST is x86_64-cross-linux-gnu. This should be the same to yours. What host distribution are you running? What version of GCC? I'm running Debian 6 x86_64 and GCC 4.4.5 on my host. If you're running Debian or Ubuntu, I have chroots on my host for most recent versions of those and I can test this out to see if it can be reproduced. >>> 3) Building kernel with gcc 4.6.0 fails in mips-specific code. The problem >>> is caused by new warnings in gcc 4.6.0: > I attached the config file. It still fails when I have clean > environment - or in fact, the following environment: I've not had time yet to build this kernel but I will do this and let you know my findings. >>> 6) A word about CFLAGS: > Yes, but the point here is that I want to use platform-specific flags > for host and for target. While I can export CFLAGS="-march=core2 ..." > before building mpfr, and CFLAGS="-march=24kc ..." before building > uClibc, I can't do this before building gcc final, because this is the > build both for target (libgcc, libstdc++) and for host (gcc > executables). That's why I proposed to use CFLAGS_FOR_HOST, > CFLAGS_FOR_TARGET... before building gcc final. Ah, OK. I think I understand now. Yeah, that could be a deficiency. >From looking through GCC's config.log (from the final build configure), it looks like the variables you'd want to set might be CFLAGS, CFLAGS_FOR_BUILD, and CFLAGS_FOR_TARGET. I'm not sure how CLFAGS is different than the other two, the build scripts should hold the secret. If you have some insight here, it'd be appreciated. I can see now what you're getting at. It would be cool if there was a way to set these different CFLAGS. If you have any proposals, let me know or send a patch to the book. -Andrew _______________________________________________ Clfs-dev mailing list [email protected] http://lists.cross-lfs.org/listinfo.cgi/clfs-dev-cross-lfs.org
