undefined reference to `memset'

Vinod Kashyap vkashyap at amcc.com
Wed Mar 23 13:49:04 PST 2005


If any kernel module has the following, or a similar line in it:
-----
char x[100] = {0};
-----
building of the GENERIC kernel on FreeBSD 5 -STABLE for amd64
as of 03/19/05, fails with the following message at the time of linking:
"undefined reference to `memset'".

The same problem is not seen on i386.

The problem goes away if the above line is changed to:
-----
char x[100];
memset(x, 0, 100);
-----

Adding CFLAGS+=-fbuiltin, or CFLAGS+=-fno-builtin to /sys/conf/Makefile.amd64
does not help.

Anyone knows what's happening?


Thanks,

Vinod.




More information about the freebsd-amd64 mailing list