I applied the patch to my local copy of emacs-25, and it built fine. Will test the official port when available.
Going back to the master branch build, the log shows a warning, unrelated to the -no-pie issue:
/work/emacs/master/src/gmalloc.c:1760:1: warning: no previous prototype for ‘hybrid_aligned_alloc’ [-Wmissing-prototypes]
hybrid_aligned_alloc (size_t alignment, size_t size)
This is not happening in the emacs-25 branch. Maybe the conditional compilation is hiding a prototype in master but not in emacs-25. I will take another look, and report it tomorrow if I can confirm the difference.