Add a final newline to the link-time C file that we generate,
authorSimon Marlow <marlowsd@gmail.com>
Thu, 14 Apr 2011 09:40:17 +0000 (10:40 +0100)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 14 Apr 2011 09:40:17 +0000 (10:40 +0100)
otherwise some versions of gcc complain about a missing final newline.

compiler/main/DriverPipeline.hs

index 61486fc..488012d 100644 (file)
@@ -1433,7 +1433,10 @@ mkExtraObjToLinkIntoBinary dflags dep_packages = do
    link_info <- getLinkInfo dflags dep_packages
    mkExtraCObj dflags (showSDoc (vcat [rts_opts_enabled,
                                        extra_rts_opts,
-                                       link_opts link_info]))
+                                       link_opts link_info]
+                                   <> char '\n')) -- final newline, to
+                                                  -- keep gcc happy
+
   where
     mk_rts_opts_enabled val
          = vcat [text "#include \"Rts.h\"",