diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6fd8e52d2e59ad6ee4b6c180101125a28f224978..3c6c486c47ace9fe2140a7509b7ec0da889c4d30 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -401,7 +401,7 @@ hadrian-multi:
     # workaround for docker permissions
     - sudo chown ghc:ghc -R .
   variables:
-    GHC_FLAGS: -Werror
+    GHC_FLAGS: "-Werror -Wwarn=deprecations"
     CONFIGURE_ARGS: --enable-bootstrap-with-devel-snapshot
   tags:
     - x86_64-linux
diff --git a/compiler/GHC/Utils/Binary.hs b/compiler/GHC/Utils/Binary.hs
index 2f569a105a88bf1821191731d35e8c929d2ef7f6..03f13b1124dd16098d113e66d70171cda8bec32b 100644
--- a/compiler/GHC/Utils/Binary.hs
+++ b/compiler/GHC/Utils/Binary.hs
@@ -1240,13 +1240,13 @@ putBS :: BinHandle -> ByteString -> IO ()
 putBS bh bs =
   BS.unsafeUseAsCStringLen bs $ \(ptr, l) -> do
     put_ bh l
-    putPrim bh l (\op -> BS.memcpy op (castPtr ptr) l)
+    putPrim bh l (\op -> copyBytes op (castPtr ptr) l)
 
 getBS :: BinHandle -> IO ByteString
 getBS bh = do
   l <- get bh :: IO Int
   BS.create l $ \dest -> do
-    getPrim bh l (\src -> BS.memcpy dest src l)
+    getPrim bh l (\src -> copyBytes dest src l)
 
 instance Binary ByteString where
   put_ bh f = putBS bh f
diff --git a/hadrian/src/Settings/Warnings.hs b/hadrian/src/Settings/Warnings.hs
index 1d87f2f9127486f2300163c2675aac6518eaa56d..858f2a04952cd73393b507f25bfa7cffc427fd15 100644
--- a/hadrian/src/Settings/Warnings.hs
+++ b/hadrian/src/Settings/Warnings.hs
@@ -53,10 +53,12 @@ ghcWarningsArgs = do
         , package primitive    ? pure [ "-Wno-unused-imports"
                                       , "-Wno-deprecations" ]
         , package rts          ? pure [ "-Wcpp-undef" ]
+        , package text         ? pure [ "-Wno-deprecations" ]
         , package terminfo     ? pure [ "-Wno-unused-imports" ]
         , package transformers ? pure [ "-Wno-unused-matches"
                                       , "-Wno-unused-imports"
                                       , "-Wno-redundant-constraints"
                                       , "-Wno-orphans" ]
+        , package unix         ? pure [ "-Wno-deprecations" ]
         , package win32        ? pure [ "-Wno-trustworthy-safe" ]
         , package xhtml        ? pure [ "-Wno-unused-imports" ] ] ]
diff --git a/libraries/bytestring b/libraries/bytestring
index 9cab76dc861f651c3940e873ce921d9e09733cc8..2bdeb7b0e7dd100fce9e1f4d1ecf1cd6b5b9702c 160000
--- a/libraries/bytestring
+++ b/libraries/bytestring
@@ -1 +1 @@
-Subproject commit 9cab76dc861f651c3940e873ce921d9e09733cc8
+Subproject commit 2bdeb7b0e7dd100fce9e1f4d1ecf1cd6b5b9702c
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 62d18f42ff9b60aaf00ae9b40f70f876337c0586..650472ce5c6bdf212dd4125cabb2112403e80ad6 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -57,7 +57,11 @@ test('ghci024',
 test('T9367',
      [req_interp, when(fast() or config.os != 'mingw32', skip)],
      makefile_test, [])
-test('ghci025', extra_files(['Ghci025B.hs', 'Ghci025C.hs', 'Ghci025D.hs']), ghci_script, ['ghci025.script'])
+test('ghci025',
+     [  extra_files(['Ghci025B.hs', 'Ghci025C.hs', 'Ghci025D.hs']),
+        normalise_version("bytestring")],
+     ghci_script,
+     ['ghci025.script']),
 test('ghci026', extra_files(['../prog002']), ghci_script, ['ghci026.script'])
 
 test('ghci027', [], ghci_script, ['ghci027.script'])
@@ -216,7 +220,7 @@ test('T9762',
  , pre_cmd('$MAKE -s --no-print-directory T9762_prep')
  ],
  ghci_script, ['T9762.script'])
-test('T9881', normal, ghci_script, ['T9881.script'])
+test('T9881', normalise_version("bytestring"), ghci_script, ['T9881.script'])
 test('T9878', [], ghci_script, ['T9878.script'])
 test('T9878b', [extra_run_opts('-fobject-code')], ghci_script,
      ['T9878b.script'])