diff --git a/compiler/GHC/Linker/Loader.hs b/compiler/GHC/Linker/Loader.hs
index 8f5a013d6c40132b2879c996cfd4bb328c5f9bda..c3f9a8de2e1cdb7d3a3b1acc71757c8ed89595bc 100644
--- a/compiler/GHC/Linker/Loader.hs
+++ b/compiler/GHC/Linker/Loader.hs
@@ -566,7 +566,7 @@ preloadLib interp hsc_env lib_paths framework_paths pls lib_spec = do
     preload_statics _paths names
        = do b <- or <$> mapM doesFileExist names
             if not b then return (False, pls)
-                     else if hostIsDynamic
+                     else if interpreterDynamic interp
                              then  do pls1 <- dynLoadObjs interp hsc_env pls names
                                       return (True, pls1)
                              else  do mapM_ (loadObj interp) names
@@ -575,7 +575,7 @@ preloadLib interp hsc_env lib_paths framework_paths pls lib_spec = do
     preload_static_archive _paths name
        = do b <- doesFileExist name
             if not b then return False
-                     else do if hostIsDynamic
+                     else do if interpreterDynamic interp
                                  then throwGhcExceptionIO $
                                       CmdLineError dynamic_msg
                                  else loadArchive interp name
diff --git a/testsuite/tests/quasiquotation/Makefile b/testsuite/tests/quasiquotation/Makefile
index 9a9db1ead9bbcdcb2ba6bf567e06208ebbf8421a..0f246c31eb08c88f1127f97aa72dd1baad8894ff 100644
--- a/testsuite/tests/quasiquotation/Makefile
+++ b/testsuite/tests/quasiquotation/Makefile
@@ -10,6 +10,6 @@ T4150:
 	-'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c T4150.hs
 
 T14028:
-	'$(TEST_HC)' $(TEST_HC_OPTS) -v0 T14028Quote.hs
-	'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -fPIC -c T14028C.c
-	'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -fexternal-interpreter T14028 T14028C.o
+	'$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -v0 T14028Quote.hs
+	'$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -v0 -c T14028C.c -o T14028C.o
+	'$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -v0 -fexternal-interpreter T14028 T14028C.o
diff --git a/testsuite/tests/quasiquotation/all.T b/testsuite/tests/quasiquotation/all.T
index 875d38a6016e9fa4e933295b2a6007bba17dbc58..5c9e7560ec7d3e1b9e20c988b29e21250fbe2b40 100644
--- a/testsuite/tests/quasiquotation/all.T
+++ b/testsuite/tests/quasiquotation/all.T
@@ -10,4 +10,4 @@ test('T14028',
       only_ways([config.ghc_th_way]),
       unless(config.have_ext_interp, skip),
       when(opsys('freebsd'), expect_broken(19723))],
-     makefile_test, ['T14028'])
+     makefile_test, ['T14028 ghcThWayFlags=' + config.ghc_th_way_flags])
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index dddfbdaca224668fe50501712b503b52e692195e..c590d1ba90fe59de2e52bcae8da1088119fe9823 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -591,7 +591,7 @@ test('T23829_hasty', normal, compile_fail, [''])
 test('T23829_hasty_b', normal, compile_fail, [''])
 test('T23927', normal, compile_and_run, [''])
 test('T23954', normal, compile_and_run, [''])
-test('T23309', [extra_files(['T23309A.hs']), req_c], multimod_compile, ['T23309', '-v0 T23309.c -optc-fPIC'])
+test('T23309', [extra_files(['T23309A.hs']), req_c], multimod_compile, ['T23309', '-v0 T23309.c ' + config.ghc_th_way_flags])
 test('T23378', [extra_files(['T23378A.hs']), js_skip], multimod_compile, ['T23378', '-v0'])
 test('T23962', normal, compile_and_run, [''])
 test('T23968', normal, compile_and_run, [''])