Hello. I tried to update WebKit by copying it to my Applications folder so it would be replaced. But it got stuck and said libstdc++.6.dylib is in use. This had the effect of corrupting WebKit so Finder seems to think it's an Intel application and says it's not supported on this architecture when opening it. It also shows a cross across the icon.
However, WebKit can be deleted, and then replaced.
The stuck libstdc++.6.dylib in the trash also got in the way. Until the next reboot.
Well, I saw this too - but I switched to using a relinked Safari application bundle instead of the WebKit application bundle and didn't have those issues ever since - although the relinking process is not as simple as copying and may fail occasionally.
Since 601 Leopard WebKit ships with its own libgcc and libstdc++ because the current sources require a C++14 compatible compiler and runtime libraries.
I did relink Safari recently but your regular updates almost make doing so ineffective. :-)
Plus the last time I did it I discovered an instability so prefer to test a WebKit build before committing to a relink.
As to libgcc it does seem funny a compiler would need an executable to use a library of itself since the executable is meant to be the final product sans standard C libraries.
See here for information on what purpose libgcc serves.
For OS X Apple chose to always dynamically link against libgcc for reasons described here.
Okay thanks can see why.
I've found that even trashing WebKit and copying a new one over is not enough. For some reason even though it is not running it holds up the trash. The dylibs are still in use. And the trash can't be emptied cleanly. A reboot is needed to unblock the can. The new copy goes okay.