Created attachment 217344 [details] lang/gcc7: Fix build with clang 11 With clang 11, imported into base r364284, building lang/gcc7 results in: /wrkdirs/usr/ports/lang/gcc7/work/gcc-7.5.0/gcc/config/i386/i386.c:9631:8: error: cannot initialize a variable of type 'bool' with an rvalue of type 'nullptr_t' bool error_p = NULL; ^ ~~~~ Upstream has already fixed this at some point, by replacing 'NULL' with 'false'.
Thank you, Dim! I did a bit of archeology, and upstream addressed this via commit 9f36390d429502f0a0dee20bda5b4870da948f6a Author: Uros Bizjak <ubizjak@gmail.com> Date: Sat May 6 09:01:51 2017 +0200 i386.c (ext_80387_constant_init): Do not explicitly initialize to zero. * config/i386/i386.c (ext_80387_constant_init): Do not explicitly initialize to zero. (init_regs): Remove declaration. (function_arg_advance_32): Initialize error_p as boolean variable. From-SVN: r247711 Maybe mention that in the patch file? I'll commit that first thing tomorrow (after some testing); if it is time sensitive for you, also cool if you want to go ahead with Approved-by: gerald (maintainer) Thanks again!
A commit references this bug: Author: gerald Date: Sat Aug 22 09:06:01 UTC 2020 New revision: 545751 URL: https://svnweb.freebsd.org/changeset/ports/545751 Log: Fix the build with clang 11. This was fixed upstream as part of a larger commit on May 6th 2017, and dim@ now encountered the same and fixed the specific issue for our GCC 7 port. Newer versions should not exhibit this. (See the new files/patch-gcc_config_i386_i386.c for more details.) PR: 248755 Submitted by: dim Changes: head/lang/gcc7/files/patch-gcc_config_i386_i386.c
Thank you dim for the report and patch! I believe newer versions of lang/gcc* should be okay, but please advise if there's anything to do there.
(In reply to Gerald Pfeifer from comment #3) Yes, I've built these all successfully: lang/gcc lang/gcc48 lang/gcc7 lang/gcc8 lang/gcc9 lang/gcc10-devel Thanks!