@Johan-Simons Thanks for the quick reply.
Surprised to hear that removing the sigaddset doesn't work for you - it seems to do so for me. I will have a closer look and get back to you as and when I find anything.
Thanks for the info on how you are building - this implies that the extra memory usage for new-gpio is down to the extra code functionality