On 10/04/2016 08:54 AM, Bernd Schmidt wrote: > On 10/04/2016 04:34 PM, Martin Sebor wrote: >> >> I copied the conditional from config/linux.h but I admit I don't >> fully understand when the macro is defined. > > AFAICT it's done in config.gcc, for a limited set of targets. > >> Should I still remove it from targhooks.c? > > That is compiled for all targets, not just for those which define the > macro, so yes. > >> Yes, the glibc and uclibc hooks are the same. I don't know what >> the convention is for these target hooks (i.e., whether they are >> expected to be duplicated across targets even if they are the >> same to reduce the risk of breaking one target as a result of >> changing another, or whether duplication should be avoided even >> at this risk). From your comment it sounds like it should be >> the latter and I'm okay with that. > > There's arguments for both. In this particular case I don't see a strong > reason not to have a general hook available. Sounds good. Attached is an updated patch reflecting these changes. Restested by building the powerpc64-linux and tic6x-uclinux cross toolchains. (Sharing the Glibc and uClibc implementation of the target hook and defining it in targhooks.c also obviates the patch I sent in for bug 77837 last night so it seems like a win-win.) Martin