Open inferiorhumanorgans opened 2 years ago
what's gcc version, etc, you're building? best to paste entire config.
$uname -sr
Darwin 18.7.0
$egrep -v '^#' config.mak
TARGET = mipsel-linux-musl
So whatever the current defaults are. Looks like gcc 9.4.0.
i tried default config with TARGET=mipsel-linux-muslsf on linux, and it builds without issue. so it appears to be a mac specific issue.
Okay I'll try again and post the rest of the logs. It looks like this is a longstanding issue with gcc. Sigh.
https://www.spinics.net/lists/gcchelp/msg42102.html
https://devel.rtems.org/ticket/2300?cversion=0&cnum_hist=4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62097
There's a patch here to use (GNU) awk instead of GNU sed:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66032
The next error is:
true DO=all multi-do # /Applications/Xcode.app/Contents/Developer/usr/bin/make MULTILIB_OSDIRNAMES= INFO_DEPS= infodir= ac_cv_prog_lex_root=lex.yy MAKEINFO=false
Checking multilib configuration for libatomic...
Makefile:558: .deps/fenv.Plo: No such file or directory
Makefile:559: .deps/flag.Plo: No such file or directory
Makefile:560: .deps/gcas.Plo: No such file or directory
Makefile:561: .deps/gexch.Plo: No such file or directory
Makefile:562: .deps/glfree.Plo: No such file or directory
Makefile:563: .deps/gload.Plo: No such file or directory
Makefile:564: .deps/gstore.Plo: No such file or directory
Makefile:565: .deps/init.Plo: No such file or directory
Makefile:566: .deps/lock.Plo: No such file or directory
Makefile:867: warning: overriding commands for target `all-multi'
Makefile:861: warning: ignoring old commands for target `all-multi'
make[4]: *** No rule to make target `.deps/lock.Plo'. Stop.
make[3]: *** [all-target-libatomic] Error 2
make[2]: *** [all] Error 2
make[1]: *** [obj_gcc/.lc_built] Error 2
make: *** [all] Error 2
Correction, with that patch applied it's possible to build a mipsel
cross toolchain on OSX so long as you don't try to parallelize the build.
does the patch require gawk, or does it work with posix awk too ?
so long as you don't try to parallelize the build.
this seems to suggest the patch didn't declare its prerequisites/dependencies in the Makefile right, as the build without works fine with multiple processes.
It works with BSD awk (unsure if it deviates from the POSIX spec) since that's what Apple ships by default. Honestly I think the more elegant solution would be to parameterize sed and just set SED=gsed on OSX and require GNU sed to be installed.
I don't know enough about MIPS to say, but is there anything that could be taken from the big endian targets instead?
I should also add I'm not 100% sure that the parallel build was the issue, but I can't think of how my build env would've gotten corrupted otherwise. At this point though it should be easy enough to test on a non-Mac.
Note: mips-linux-muslsf builds successfully.