Re: [coldfire-gnu-discuss] coldfire-toolchain: "make dep" fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coldfire-gnu-discuss] coldfire-toolchain: "make dep" fails



Michel Marti wrote:

I now tried to build 2.6.12-uc0 for the M5271EVB platform using the CodeSourcery
toolchain, but this fails as well:


In file included from include/linux/nfs_fs.h:15,
                 from init/do_mounts.c:11:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:236: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:236: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:236: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:236: warning: passing argument 1 of 'memcpy' discards qualifiers
from pointer target type
include/linux/pagemap.h:236: error: assignment of read-only variable '__gu_val'
include/linux/pagemap.h:242: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:242: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:242: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:242: warning: passing argument 1 of 'memcpy' discards qualifiers
from pointer target type
include/linux/pagemap.h:242: error: assignment of read-only variable '__gu_val'
make[1]: *** [init/do_mounts.o] Error 1
make: *** [init] Error 2

Any further hints?

I'm not sure if you received a reply to this, and I'm just catching up with my email. This problem is a bug with the kernel sources. GCC 4.1 is stricter in verifying const qualifiers on asm outputs. This case is something like
	const int __gu_val;
	asm ("..." : "=r" (__gu_val) ...);
which is now correctly diagnosed. (IIRC, actually it's inside a macro and uses __typeof__ in the form of '__typeof__(*FOO) __gu_val;' and FOO is a pointer to const qualified type.)

The 2.6 kernel sources have been patched (across the several architectures that had this problem).

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery
nathan@xxxxxxxxxxxxxxxx    ::     http://www.planetfall.pwp.blueyonder.co.uk