Paul Irofti <p...@irofti.net> wrote: > Yeah, I just followed the dlfcn/dlfcn_stubs.c example from libc. Which > I see now it is commented out... > > >>> --- lib/libc/dlfcn/init.c.before Sat May 30 23:26:35 2020 > >>> +++ lib/libc/dlfcn/init.c Sat May 30 18:00:45 2020 > >>> @@ -70,7 +70,7 @@ > >>> /* provide definitions for these */ > >>> const dl_cb *_dl_cb __relro = NULL; > >>> -#if defined(__amd64) > >>> +#if defined(__amd64__) || defined(__powerpc__) > >>> uint64_t (*const tc_get_timecount)(void) = tc_get_timecount_md; > >>> #else > >>> uint64_t (*const tc_get_timecount)(void) = NULL; > > > > 1) I think adding _md to the name is superflous. There will never > > be a MI version, so tc_get_timecount() is enough. > > What about pvclock(4)?
What about it? Is it MI? > > 2) I hope we can get away from #ifdef __ arch__. > > Maybe this can be split into architectures which > > a) have a function called tc_get_timecount() > > or > > b) tc_get_timecount is #define'd to NULL, though I don't > > know which MD include file to do that in > > If we go with something like this or with something like -DTIMEKEEP, > how do we handle the different PROTO_WRAP vs. PROTO_NORMAL > declarations? Split them in MD headers? But then we end up in the same > place. Sort of. Sorry you lost me here. But go ahead, continue with your plan which will result in 6-line chunk which will look something like this: #if defined || defined || defined || defined || defined || defined || defined || defined || defined || defined || defined || defined || defined || defined