https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84257
--- Comment #2 from 191919 <191919 at gmail dot com> --- I tried with the combination of the following settings under macOS 10.13.3: internal SSD / external HD HFS+ / APFS SIP enabled / SIP disabled The only factor that affects is SIP status. Once I disable it, DYLD_LIBRARY_PATH will be exported, then the scripts run slowly. I have reported the problem to Apple, but since turning off SIP is not recommended, I don't think they are going to fix it in short future.