Running echo a | /usr/local/libexec/gcc11/gcc/x86_64-portbld-freebsd15.0/11.3.0/d21 - -quiet -dumpdir a- -dumpbase - -mtune=generic -march=x86-64 -version -fsyntax-only -o /dev/null -v 1>/dev/null produces a ton of <stdin>:2: error: Outside Unicode code space <stdin>:2: error: character 0xa5 is not a valid token errors. The lang/ldc fails due that because it runs echo "pragma(msg, int(__VERSION__));" | gdmd - -o- and takes "<stdin>" part as output. The problem can be seed on CURRENT and probably 14.0, but not on 13.2.
I confirm the bug is present in FreeBSD 14: http://cirrus-ci.com/task/5329230926446592 Unfortunately, I am dealing with a lot of GCC related issues and I do not have the time for this one right now, but I will try to find it as soon as possible. I add to the CC list Daniel who has enabled the D compiler in lang/gcc11{-devel} and then might be helpful. Actually, even before trying to fix that bug, it would probably be better to try to enable the D compiler in higher versions of GCC, which is not an easy task due to boostrap issues. I have postponed this problem for a while, but I guess it is time to solve it.
As a side note: I submitted an update for lang/ldc and switched to using binaries provided by the upstream as a bootstrap.
(In reply to Gleb Popov from comment #2) Oh, this is great. Then we can probably use ldc to bootstrap gdc and test if the issue affects later versions of GCC as well.
I have landed lang/ldc update, which now doesn't require lang/gcc11 but uses a bootstrap provided by the upstream.