Given this little beauty is gcc emerge log: '-lmpc -lmpfr -lgmp -rdynamic -ldl -lz -Lyes/lib -lzstd' it seems '$(use_with zstd)' should rather be something like '$(use_with zstd zstd /usr)'.
-L/usr/lib would also be incorrect on most 64-bit archs.
It looks like gcc-14 handles this correctly. What package/version were you building here? Please provide a build log.
Actually, upon further inspection, it looks like we might need to specify --with-zstd-lib for gcc.