Disable saving the linker options in the binary on Solaris (#5382). Also refactor the check into one place.
Disable saving the linker options in the binary on Solaris (#5382).
Also refactor the check into one place.

gcampax/ghc,ml9951/ghc,fmthoma/ghc,jstolarek/ghc,acowley/ghc,ml9951/ghc,acowley/ghc,ryantm/ghc,AlexanderPankiv/ghc,siddhanathan/ghc,urbanslug/ghc,lukexi/ghc,bitemyapp/ghc,forked-upstream-packages-for-ghcjs/ghc,nushio3/ghc,ezyang/ghc,holzensp/ghc,ghc-android/ghc,forked-upstream-packages-for-ghcjs/ghc,oldmanmike/ghc,ilyasergey/GHC-XAppFix,nkaretnikov/ghc,shlevy/ghc,gridaphobe/ghc,vikraman/ghc,ghc-android/ghc,gcampax/ghc,mcschroeder/ghc,ilyasergey/GHC-XAppFix,mcmaniac/ghc,TomMD/ghc,elieux/ghc,gridaphobe/ghc,anton-dessiatov/ghc,da-x/ghc,mettekou/ghc,lukexi/ghc-7.8-arm64,vTurbine/ghc,tibbe/ghc,vikraman/ghc,sdiehl/ghc,oldmanmike/ghc,frantisekfarka/ghc-dsi,ryantm/ghc,nushio3/ghc,elieux/ghc,elieux/ghc,tibbe/ghc,gridaphobe/ghc,TomMD/ghc,green-haskell/ghc,mettekou/ghc,bitemyapp/ghc,elieux/ghc,wxwxwwxxx/ghc,siddhanathan/ghc,urbanslug/ghc,hferreiro/replay,hferreiro/replay,da-x/ghc,sdiehl/ghc,nkaretnikov/ghc,nathyong/microghc-ghc,GaloisInc/halvm-ghc,lukexi/ghc-7.8-arm64,ghc-android/ghc,AlexanderPankiv/ghc,oldmanmike/ghc,vTurbine/ghc,mfine/ghc,hferreiro/replay,mettekou/ghc,tjakway/ghcjvm,nkaretnikov/ghc,green-haskell/ghc,acowley/ghc,sdiehl/ghc,nathyong/microghc-ghc,nathyong/microghc-ghc,nathyong/microghc-ghc,christiaanb/ghc,mcmaniac/ghc,fmthoma/ghc,tjakway/ghcjvm,ezyang/ghc,lukexi/ghc-7.8-arm64,gridaphobe/ghc,vTurbine/ghc,mcmaniac/ghc,shlevy/ghc,mcmaniac/ghc,bitemyapp/ghc,ghc-android/ghc,mettekou/ghc,nkaretnikov/ghc,wxwxwwxxx/ghc,siddhanathan/ghc,da-x/ghc,ml9951/ghc,tibbe/ghc,tjakway/ghcjvm,green-haskell/ghc,vikraman/ghc,nathyong/microghc-ghc,wxwxwwxxx/ghc,sgillespie/ghc,siddhanathan/ghc,nomeata/ghc,lukexi/ghc-7.8-arm64,TomMD/ghc,sgillespie/ghc,tibbe/ghc,nomeata/ghc,anton-dessiatov/ghc,mfine/ghc,urbanslug/ghc,ml9951/ghc,snoyberg/ghc,mcschroeder/ghc,ekmett/ghc,snoyberg/ghc,gcampax/ghc,mcschroeder/ghc,lukexi/ghc-7.8-arm64,nathyong/microghc-ghc,green-haskell/ghc,fmthoma/ghc,vikraman/ghc,ezyang/ghc,christiaanb/ghc,AlexanderPankiv/ghc,nushio3/ghc,gcampax/ghc,acowley/ghc,acowley/ghc,spacekitteh/smcghc,TomMD/ghc,sgillespie/ghc,gcampax/ghc,wxwxwwxxx/ghc,hferreiro/replay,sgillespie/ghc,snoyberg/ghc,ekmett/ghc,ghc-android/ghc,spacekitteh/smcghc,olsner/ghc,AlexanderPankiv/ghc,ryantm/ghc,green-haskell/ghc,nathyong/microghc-ghc,vTurbine/ghc,GaloisInc/halvm-ghc,fmthoma/ghc,ml9951/ghc,AlexanderPankiv/ghc,holzensp/ghc,nushio3/ghc,spacekitteh/smcghc,anton-dessiatov/ghc,mfine/ghc,lukexi/ghc,ghc-android/ghc,oldmanmike/ghc,holzensp/ghc,bitemyapp/ghc,tjakway/ghcjvm,nkaretnikov/ghc,lukexi/ghc,elieux/ghc,urbanslug/ghc,fmthoma/ghc,mettekou/ghc,ryantm/ghc,snoyberg/ghc,ezyang/ghc,mettekou/ghc,spacekitteh/smcghc,anton-dessiatov/ghc,gridaphobe/ghc,sdiehl/ghc,olsner/ghc,forked-upstream-packages-for-ghcjs/ghc,urbanslug/ghc,wxwxwwxxx/ghc,lukexi/ghc,forked-upstream-packages-for-ghcjs/ghc,nomeata/ghc,ekmett/ghc,forked-upstream-packages-for-ghcjs/ghc,elieux/ghc,hferreiro/replay,forked-upstream-packages-for-ghcjs/ghc,da-x/ghc,tjakway/ghcjvm,acowley/ghc,TomMD/ghc,ghc-android/ghc,sdiehl/ghc,jstolarek/ghc,elieux/ghc,holzensp/ghc,shlevy/ghc,sgillespie/ghc,fmthoma/ghc,gridaphobe/ghc,oldmanmike/ghc,siddhanathan/ghc,nomeata/ghc,GaloisInc/halvm-ghc,da-x/ghc,snoyberg/ghc,jstolarek/ghc,TomMD/ghc,vikraman/ghc,siddhanathan/ghc,ezyang/ghc,sdiehl/ghc,wxwxwwxxx/ghc,ezyang/ghc,tibbe/ghc,mcschroeder/ghc,forked-upstream-packages-for-ghcjs/ghc,da-x/ghc,ezyang/ghc,lukexi/ghc,nkaretnikov/ghc,nushio3/ghc,olsner/ghc,frantisekfarka/ghc-dsi,vTurbine/ghc,wxwxwwxxx/ghc,olsner/ghc,christiaanb/ghc,christiaanb/ghc,sgillespie/ghc,ryantm/ghc,GaloisInc/halvm-ghc,shlevy/ghc,shlevy/ghc,olsner/ghc,snoyberg/ghc,urbanslug/ghc,vTurbine/ghc,spacekitteh/smcghc,ekmett/ghc,ekmett/ghc,ilyasergey/GHC-XAppFix,mcmaniac/ghc,holzensp/ghc,siddhanathan/ghc,mettekou/ghc,mcschroeder/ghc,tjakway/ghcjvm,nomeata/ghc,olsner/ghc,sdiehl/ghc,TomMD/ghc,AlexanderPankiv/ghc,ilyasergey/GHC-XAppFix,gridaphobe/ghc,shlevy/ghc,mfine/ghc,sgillespie/ghc,jstolarek/ghc,frantisekfarka/ghc-dsi,christiaanb/ghc,frantisekfarka/ghc-dsi,da-x/ghc,mfine/ghc,oldmanmike/ghc,mcschroeder/ghc,vTurbine/ghc,acowley/ghc,AlexanderPankiv/ghc,nkaretnikov/ghc,christiaanb/ghc,snoyberg/ghc,fmthoma/ghc,anton-dessiatov/ghc,vikraman/ghc,mfine/ghc,oldmanmike/ghc,anton-dessiatov/ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,jstolarek/ghc,ml9951/ghc,hferreiro/replay,tjakway/ghcjvm,ml9951/ghc,vikraman/ghc,olsner/ghc,nushio3/ghc,gcampax/ghc,shlevy/ghc,bitemyapp/ghc,frantisekfarka/ghc-dsi,anton-dessiatov/ghc,christiaanb/ghc,mfine/ghc,ml9951/ghc,urbanslug/ghc,GaloisInc/halvm-ghc,gcampax/ghc,hferreiro/replay,nushio3/ghc,mcschroeder/ghc