Re: [PATCH v2] newlib: libm: workaround ar duplicate member behavior
Jon Turney <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On 22/02/2022 11:31, Corinna Vinschen wrote: > On Feb 21 19:21, Mike Frysinger wrote: >> GNU ar has undocumented behavior where it doesn't dedupe its inputs if >> they're all on the same command line, so we have to dedupe ourselves. >> --- >> v2 >> - use awk to dedupe the object list I think this could still at least use a comment about how the ordering of the inputs relates to which duplicate object are dropped and which are kept. (I'm assuming cpu-specific ones are meant to be kept in preference to generic routines, but how does this achieve that?) > This seems to work. > > However, what do we have to do in future to make sure the order is > always correct? > > And the heritic question: Wouldn't it be safer to keep the old > per-subdir lib.a logic? Considering the problem in the next larger context: why are we doing this at all? Is this just so the generic fenv routines are chewed on as they contain the doc markup? In which case it would be simpler to do that explicitly. If it's so that a cpu- specific fenv doesn't need to provide all the objects, well, that could be done explicitly as well, I think?