[Git][ghc/ghc][master] Load .lo as well.

Marge Bot gitlab at gitlab.haskell.org
Mon Jun 15 17:10:50 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
761dcb84 by Moritz Angermann at 2020-06-15T13:10:36-04:00
Load .lo as well.

Some archives contain so called linker objects, with the affectionate
.lo suffic.  For example the musl libc.a will come in that form.  We
still want to load those objects, hence we should not discard them and
look for .lo as well.  Ultimately we might want to fix this proerly by
looking at the file magic.

- - - - -


1 changed file:

- rts/linker/LoadArchive.c


Changes:

=====================================
rts/linker/LoadArchive.c
=====================================
@@ -461,6 +461,7 @@ static HsInt loadArchive_ (pathchar *path)
         /* TODO: Stop relying on file extensions to determine input formats.
                  Instead try to match file headers. See #13103.  */
         isObject = (thisFileNameSize >= 2 && strncmp(fileName + thisFileNameSize - 2, ".o"  , 2) == 0)
+                || (thisFileNameSize >= 3 && strncmp(fileName + thisFileNameSize - 3, ".lo" , 3) == 0)
                 || (thisFileNameSize >= 4 && strncmp(fileName + thisFileNameSize - 4, ".p_o", 4) == 0)
                 || (thisFileNameSize >= 4 && strncmp(fileName + thisFileNameSize - 4, ".obj", 4) == 0);
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/761dcb84cd4c50c6fbb361eb26fb429af87392a3

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/761dcb84cd4c50c6fbb361eb26fb429af87392a3
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200615/1b326e13/attachment-0001.html>


More information about the ghc-commits mailing list