Check for -shared-libgcc linker flag usage. Fix bug #34752.