Created attachment 674386 [details]
gcc -m64 -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"' -DCONF_OSTYPE='"darwin18"' -DCONF_MACHTYPE='"x86_64-apple-darwin18"' -DCONF_VENDOR='"apple"' -DLOCALEDIR='"/Users/sam/Gentoo/tmp/usr/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -DMACOSX -I. -I./include -I. -I./include -I./lib -isystem /Users/sam/Gentoo/tmp/usr/include -isystem /Users/sam/Gentoo/MacOSX.sdk/usr/include -DDEFAULT_PATH_VALUE='"/Users/sam/Gentoo/tmp/usr/local/sbin:/Users/sam/Gentoo/tmp/usr/local/bin:/Users/sam/Gentoo/tmp/usr/sbin:/Users/sam/Gentoo/tmp/usr/bin:/Users/sam/Gentoo/tmp/sbin:/Users/sam/Gentoo/tmp/bin"' -DSTANDARD_UTILS_PATH='"/Users/sam/Gentoo/tmp/bin:/Users/sam/Gentoo/tmp/usr/bin:/Users/sam/Gentoo/tmp/sbin:/Users/sam/Gentoo/tmp/usr/sbin"' -DSYS_BASHRC='"/Users/sam/Gentoo/tmp/etc/bash/bashrc"' -DSYS_BASH_LOGOUT='"/Users/sam/Gentoo/tmp/etc/bash/bash_logout"' -DNON_INTERACTIVE_LOGIN_SHELLS -DSSH_SOURCE_BASHRC -march=native -O2 -pipe -Wno-parentheses -Wno-format-security -c xmalloc.c
In file included from siglist.c:36:
In file included from ./xmalloc.h:25:
In file included from ./bashansi.h:28:
/Users/sam/Gentoo/MacOSX.sdk/usr/include/string.h:134:7: error: expected
identifier or '('
char *strsignal(int __sig);
./siglist.h:37:27: note: expanded from macro 'strsignal'
# define strsignal(sig) (char *)sys_siglist[sig]
This is actually the same type of error I had building Bash when I used the latest gawk to fix bug 756136 (which I ended up reverting).
I'm a bit lost with this one, especially because I didn't hit this on a previous attempt with /usr/local/include hacks.
I didn't want to mess around with applying the patch because I'd have needed to autoreconf it externally and apply a patch(?)
So, I switched to app-shells/bash-5.1-rc3 and the corresponding sys-libs/readline-8.1_rc3, and added keywords there locally. Bash has now built.
I've unmasked bash-5.1 in the BigSur profile, using an accept_keywords entry