As requested, here is the sec diff from prefix to gx86. Diff as such cannot be applied to gx86 without appropriate guarding for EAPI < 3.
Created attachment 217657 [details, diff] prefix patch
I have committed majority of this patch.
"${EPREFIX}" should not be used in the 2 lines previously containing: if ! _python_implementation && [[ "$1" =~ ^/usr/lib(32|64)?/python[[:digit:]]+\.[[:digit:]]+ ]]; then Paths passed to python_mod_optimize() and python_mod_cleanup() in EAPI >=3 should be relative to "${EROOT}" and prepended with "/". The incorrect changes will be reverted soon.
(In reply to comment #3) > Paths s/Paths/Paths of modules outside of site-packages directories/