Apparently upgrading to GMP 6.1.0 would fix build on powerpc64* systems: https://review.coreboot.org/plugins/gitiles/coreboot/+/9631016660423d0585a145400232fd68b7e3da8f
Making changes to the versions of packages used to build the toolchain is non-trivial; would you consider adding (actually: adding back) BROKEN_powerpc64 an acceptable fix?
I found after creating this PR this patch https://cgit.openembedded.org/openembedded-core/tree/meta/recipes-support/gmp/gmp-6.0.0/gmp-6.0.0-ppc64.patch?h=jethro I'm testing it right now.
That fixes the error, but now build fails later at: [INFO ] Installing pass-2 core C gcc compiler [ERROR] /wrkdirs/usr/ports/devel/xtensa-esp32-elf/work/crosstool-NG-1.22.0-97-gc752ad5/.build/src/gcc-5.2.0/gcc/match.pd:120:1 error: expected (, got NAME [ERROR] gmake[3]: *** [Makefile:2303: s-match] Error 1 [ERROR] gmake[2]: *** [Makefile:4098: all-gcc] Error 2 [ERROR] [ERROR] >> [ERROR] >> Build failed in step 'Installing pass-2 core C gcc compiler' [ERROR] >> called in step '(top-level)' [ERROR] >> [ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@257] [ERROR] >> called from: do_gcc_core_backend[scripts/build/cc/100-gcc.sh@545] [ERROR] >> called from: do_gcc_core_pass_2[scripts/build/cc/100-gcc.sh@160] [ERROR] >> called from: do_cc_core_pass_2[scripts/build/cc.sh@42] [ERROR] >> called from: main[scripts/crosstool-NG.sh@646] This is on powerpc64le.
Are you trying to use this port on powerpc? Can I test your patch on amd64 (I don't think I have access to powerpc). If so, could you please share your patch?
Created attachment 228970 [details] patch Attached (and drop the patch I linked to before to files/0001-gmp-6.0.0a.patch).
Your Makefile patch does not cleanly apply for me but I made the changes by hand, downloaded 0001-gmp-6.0.0a.patch and was able to build under 12.2-RELEASE-p10/amd64. Which version of FreeBSD and what arch are you testing on?
13.0-RELEASE, powerpc64le.
I installed 13.0-RELEASE (amd64) on a spare SSD and was able to use poudriere to build the current version of devel/xtensa-esp32-elf and also a version with your suggested patches. I've cross compiled ports for pfsense before using qemu-user-static but haven't been able to get a 13.0-RELEASE, powerpc64le poudriere jail to install. I even tried qemu-user-static-devel. powerpc64 almost works. sea 135 # pkg info | fgrep qemu qemu-user-static-devel-6.0.91 QEMU CPU Emulator (github bsd-user branch) sea 136 # poudriere jail -c -j 13rease-powerpc64le -a powerpc64le -v 13.0-RELEASE [00:00:00] Cross-building ports for powerpc64le on amd64 requires QEMU [00:00:00] Error: You need to install the qemu-user-static package or setup an emulator with binmiscctl(8) for powerpc64le sea 137 # poudriere jail -c -j 13release-powerpc64 -a powerpc64 -v 13.0-RELEASE [00:00:00] Cross-building ports for powerpc64 on amd64 requires QEMU [00:00:00] Creating 13release-powerpc64 fs at /usr/local/poudriere/jails/13release-powerpc64... done [00:00:01] Fetching MANIFEST for FreeBSD 13.0-RELEASE powerpc64 fetch: https://download.FreeBSD.org/ftp/releases/powerpc64/powerpc64/13.0-RELEASE/MANIFEST: Not Found fetch: https://download.FreeBSD.org/ftp/releases/powerpc64/powerpc64/13.0-RELEASE/MANIFEST: Not Found [00:00:02] Error: Failed to fetch from https://download.FreeBSD.org/ftp/releases/powerpc64/powerpc64/13.0-RELEASE/MANIFEST [00:00:02] Error while creating jail, cleaning up. [00:00:02] Removing 13release-powerpc64 jail... done [00:00:03] Cleaning 13release-powerpc64 data... done