tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Another rump question ...
On Sun, 27 Dec 2015, Paul Goyette wrote:
I can't figure out how to get a rump_sysctlbyname() routine (or some
equivalent) to be included into the test program. None of the libraries
in /usr/lib seem to include any relevant symbols for the rump version of
this routine.
Any clues on how to do this?
Try something like:
.PATH: ${NETBSDSRCDIR}/lib/libc/gen
SRCS+= sysctlbyname.c
SRCS+= sysctlgetmibinfo.c
CPPFLAGS+= -DRUMP_ACTION
Then just use sysctlbyname as usual. That's how rump.sysctl works.
Ah, kewl! Thanks!
This doesn't actually work.
Adding those lines to the Makefile _does_ create xxx.d files, and those
xxx.d files are included in the .depend file. But it does not compile
them and does not attempt to include them in the target image.
Since bsd.test.mk uses PROGS (to, presumably, build multiple images
which might include helper programs?) I had to use
SRCS.t_modautoload+= t_modautoload.c
SRCS.t_modautoload+= sysctlbyname.c
SRCS.t_modautoload+= sysctlgetmibinfo.c
(Note that I had to include both library sources as well as the main
program's source!)
Anyway, it now works!
Thanks for the clue.
+------------------+--------------------------+------------------------+
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| (Retired) | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+
Home |
Main Index |
Thread Index |
Old Index