Re: asm/string.h

Andrew E. Mileski (aem@nic.ott.hookup.net)
Mon, 15 Apr 1996 21:30:32 -0400 (EDT)


> Using the gcc v 2.7.0 compiler with the 1.3.8x kernel includes, if I include
> asm/string.h (ie via net/if_arp.h) and am using memset and strtok in the
> same program I get unresolved externs for __memset_generic etc. if I compile
> w/o optimization and unresolved externs for ___strtok if I compile w/
> optimization. The only way I can get around this is to define
> _I386_STRING_H_ so that asm/string.h doesn't get included.
>
> I'm sure lots of people have hit this before, is there a standard "fix" or
> is everybody doing the same thing I am?

At least -O2 is needed when using inline code.

This makes debugging a pain though.

This is a "feature" of GCC :-/

You can break the inlines out into a separate file and compile/link
them.

-- Andrew E. Mileski --
mailto:aem@ott.hookup.net
http://www.redhat.com/~aem/