[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: #1788: Static link file contains bogus unit names
From: |
Chicken Trac |
Subject: |
Re: #1788: Static link file contains bogus unit names |
Date: |
Mon, 27 Sep 2021 07:58:24 -0000 |
#1788: Static link file contains bogus unit names
-------------------------------------+-------------------------------------
Reporter: sjamaan | Owner: (none)
Type: defect | Status: new
Priority: major | Milestone: 5.3
Component: compiler | Version: 5.2.0
Resolution: | Keywords: static linking,
Estimated difficulty: medium | dependencies
-------------------------------------+-------------------------------------
Comment (by sjamaan):
> The only fix I can think of is to add another explicit filtering out of
builtin-features when populating the .link file. Unfortunately builtin-
features is only visible in eval.scm.
I think a simple fix could be to partially restore the original
implementation of `##sys#process-require`, particularly the `mark-static`
argument. This could then mutate `required-libraries`, and drop the `(set!
required-libraries (lset-adjoin/eq? required-libraries lib))`. I think the
`set!` here is the incorrect bit, as it doesn't have enough information
here to know whether it's a library that should be required; that, only
`process-require` knows.
A more elaborate but arguably cleaner fix would involve adding a predicate
to `eval.scm` check whether it's part of `core-unit-requirements` or
`builtin-features` or `core-units`, and use that as a guard around that
`set!` mentioned above. That does have a drawback though: there's repeated
code so it might possibly diverge over time resulting in new bugs of this
kind.
--
Ticket URL: <https://bugs.call-cc.org/ticket/1788#comment:2>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.
- #1788: Static link file contains bogus unit names, Chicken Trac, 2021/09/24
- Re: #1788: Static link file contains bogus unit names, Chicken Trac, 2021/09/24
- Re: #1788: Static link file contains bogus unit names,
Chicken Trac <=
- Re: #1788: Static link file contains bogus unit names, Chicken Trac, 2021/09/27
- Re: #1788: Static link file contains bogus unit names, Chicken Trac, 2021/09/27
- Re: #1788: Static link file contains bogus unit names, Chicken Trac, 2021/09/27
- Re: #1788: Static link file contains bogus unit names, Chicken Trac, 2021/09/28
- Re: #1788: Static link file contains bogus unit names, Chicken Trac, 2021/09/28
- Re: #1788: Static link file contains bogus unit names, Chicken Trac, 2021/09/29