Yeah, I used CheckLib wrong, but I had to dig into the SCons source to figure out why. With CheckLib, the "header" argument is passed through to the test program verbatim, but with CheckLibWithHeader it's processed by adding a #include, etc. CheckLib doesn't mention its "header" argument at all in the man page, let alone mention this fairly important difference. CheckLib seems to be more to verify that a symbol exists at all by tricking gcc into thinking it's a void () function and linking against its bare symbol, while CheckLibWithHeader tries to get a valid signature. I'll change it to CheckLibWithHeader since that seems to be the better way to go.
Gabe On 01/19/11 01:07, Gabe Black wrote: > I did have to use the --dynamic option with nm to get it to show any > symbols. Maybe that's the problem? Do we need to use an alternative to > CheckLib with dynamic libraries? I poked around in the man page for > scons and didn't notice anything like that. > > Gabe > > On 01/19/11 01:03, Gabe Black wrote: >> I was just building M5, and I noticed that scons wasn't able to find >> clock_nanosleep in librt even though it should be there, and nm verifies >> that the symbol is in the library. Is this happening to anybody else? Is >> there something else we need to do to get it to work? I see the code in >> Nate's change was pretty similar to mine, and that may be because it was >> based on mine or because that's just what you're supposed to do. I'll >> say up front that I was just winging it :-), so it's entirely possible I >> was doing it wrong. >> >> Gabe >> _______________________________________________ >> m5-dev mailing list >> m5-dev@m5sim.org >> http://m5sim.org/mailman/listinfo/m5-dev > _______________________________________________ > m5-dev mailing list > m5-dev@m5sim.org > http://m5sim.org/mailman/listinfo/m5-dev _______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev