[PATCH] newlib: stop clobbering LDFLAGS with non-standard $ldflags
Mike Frysinger
vapier@gentoo.org
Mon Oct 16 04:55:43 GMT 2023
On 14 Apr 2023 23:51, Thomas Schwinge wrote:
> On 2022-01-20T23:51:52-0500, Mike Frysinger <vapier@gentoo.org> wrote:
> > Adjust the testsuite to match.
>
> > --- a/newlib/testsuite/lib/newlib.exp
> > +++ b/newlib/testsuite/lib/newlib.exp
> > @@ -66,13 +66,13 @@ proc newlib_target_compile { source dest type options } {
> > [target_info needs_status_wrapper] != "0" && \
> > [info exists gluefile] } {
> > lappend options "libs=$gluefile"
> > - lappend options "ldflags=$wrap_flags"
> > + lappend options "LDFLAGS=$wrap_flags"
> > }
> >
> > if [string match $host_triplet $target_triplet] then {
> > if [string match "i686-pc-linux-gnu" $host_triplet] then {
> > lappend options "libs=$objdir/crt0.o -lc -lgcc"
> > - lappend options "ldflags=-nostdlib -L$objdir/.libs [newlib_include_flags]"
> > + lappend options "LDFLAGS=-nostdlib -L$objdir/.libs [newlib_include_flags]"
> > }
> > }
>
> ..., is that really correct? As far as I know, DejaGnu only looks for
> the lower-case 'ldflags' in 'options', as documented in
> '[...]/share/dejagnu/target.exp'. (I just noticed this while looking for
> something else; I don't have any toolchains exercising the code paths
> you've changed.)
tbh, i'm not sure. i tried running the testsuite a few ways, but doesn't
seem to really work :/.
would be nice if these worked out of the box better. maybe with the GNU
sim by default or something.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/newlib/attachments/20231016/487a5516/attachment.sig>
More information about the Newlib
mailing list