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..602fd2f3470f180d64cb8baadf63e94baec66b60 160000
--- a/libraries/bytestring
+++ b/libraries/bytestring
@@ -1 +1 @@
-Subproject commit 9cab76dc861f651c3940e873ce921d9e09733cc8
+Subproject commit 602fd2f3470f180d64cb8baadf63e94baec66b60
diff --git a/testsuite/tests/ghci/scripts/T9881.stdout b/testsuite/tests/ghci/scripts/T9881.stdout
index 24923474a9a505bf6eaa246d4b6815794bd72253..8c2b8fff6e6e81abc381985a3da1c39c79b8df5c 100644
--- a/testsuite/tests/ghci/scripts/T9881.stdout
+++ b/testsuite/tests/ghci/scripts/T9881.stdout
@@ -19,19 +19,19 @@ instance Ord Data.ByteString.Lazy.ByteString
 
 type Data.ByteString.ByteString :: *
 data Data.ByteString.ByteString
-  = bytestring-0.11.4.0:Data.ByteString.Internal.Type.BS {-# UNPACK #-}(GHC.ForeignPtr.ForeignPtr
+  = bytestring-0.11.5.1:Data.ByteString.Internal.Type.BS {-# UNPACK #-}(GHC.ForeignPtr.ForeignPtr
                                                                           GHC.Word.Word8)
                                                          {-# UNPACK #-}Int
-  	-- Defined in ‘bytestring-0.11.4.0:Data.ByteString.Internal.Type’
+  	-- Defined in ‘bytestring-0.11.5.1:Data.ByteString.Internal.Type’
 instance Monoid Data.ByteString.ByteString
-  -- Defined in ‘bytestring-0.11.4.0:Data.ByteString.Internal.Type’
+  -- Defined in ‘bytestring-0.11.5.1:Data.ByteString.Internal.Type’
 instance Read Data.ByteString.ByteString
-  -- Defined in ‘bytestring-0.11.4.0:Data.ByteString.Internal.Type’
+  -- Defined in ‘bytestring-0.11.5.1:Data.ByteString.Internal.Type’
 instance Semigroup Data.ByteString.ByteString
-  -- Defined in ‘bytestring-0.11.4.0:Data.ByteString.Internal.Type’
+  -- Defined in ‘bytestring-0.11.5.1:Data.ByteString.Internal.Type’
 instance Show Data.ByteString.ByteString
-  -- Defined in ‘bytestring-0.11.4.0:Data.ByteString.Internal.Type’
+  -- Defined in ‘bytestring-0.11.5.1:Data.ByteString.Internal.Type’
 instance Eq Data.ByteString.ByteString
-  -- Defined in ‘bytestring-0.11.4.0:Data.ByteString.Internal.Type’
+  -- Defined in ‘bytestring-0.11.5.1:Data.ByteString.Internal.Type’
 instance Ord Data.ByteString.ByteString
-  -- Defined in ‘bytestring-0.11.4.0:Data.ByteString.Internal.Type’
+  -- Defined in ‘bytestring-0.11.5.1:Data.ByteString.Internal.Type’
diff --git a/testsuite/tests/ghci/scripts/ghci025.stdout b/testsuite/tests/ghci/scripts/ghci025.stdout
index 6dce41ecc333a214e1cf46b8f1ef8d4ff32ce05c..16e42f478d016ea876e7927178efafe7665f7d3e 100644
--- a/testsuite/tests/ghci/scripts/ghci025.stdout
+++ b/testsuite/tests/ghci/scripts/ghci025.stdout
@@ -54,7 +54,7 @@ Prelude.length :: Data.Foldable.Foldable t => t a -> GHC.Types.Int
 type T.Integer :: *
 data T.Integer = ...
 T.length ::
-  bytestring-0.11.4.0:Data.ByteString.Internal.Type.ByteString
+  bytestring-0.11.5.1:Data.ByteString.Internal.Type.ByteString
   -> GHC.Types.Int
 :browse! T
 -- defined locally