diff --git a/Cabal/src/Distribution/PackageDescription/Check/Target.hs b/Cabal/src/Distribution/PackageDescription/Check/Target.hs
index fdafa89b6e52e7d20ef1add32aa646824f277f19..cc869617795abb894a8cf70f869cba528e090a61 100644
--- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs
+++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs
@@ -825,9 +825,10 @@ checkGHCOptions title t opts = do
       checkFlags
         ["-prof"]
         (PackageBuildWarning $ OptProf title)
-      -- Does not apply to scripts.
-      -- Why do we need this? See #8963.
       pid <- asksCM (pnPackageId . ccNames)
+      -- Scripts add the -o flag in the fake-package.cabal in order to have the
+      -- executable name match the script name even when there are characters
+      -- in the script name which are illegal to have as a target name.
       unless (pid == fakePackageId) $
         checkFlags
           ["-o"]