The gawk in prefixed portage triggered 'illegal instruction' exception due to a spelling mistake in the Makefile. That spelling mistake was triggered by me using the following CFLAGS: -march=prescott -O2 -pipe -mfpmath=sse -msse2 -msse3 -fno-builtin However, the CFLAGS didn't get passed along with the gawk extension module which then probably used FPU floating point numbers. Anyways, passing along CFLAGS fixed the issue. Secondly, I believe that the proper type for the gawk extension is a module (something that is loaded by the application itself by using dlopen&co), rather than a dynamic library (something that is loaded by the dynamic linker). The modification consists of a patch to the gawk ebuild as well as a patch to the gawk extension itself.
Created attachment 133757 [details, diff] Patch for gawk to apply the ${P}-darwin.patch
Created attachment 133758 [details, diff] Make the extension being a bundle instead of dynamiclib The -install_name was cut out as it is not supported for bundles. The -O2 was cut out as it would be in CFLAGS normally. I guess this patch should go upstream.
fixed, thanks!