![]() |
|
Message-ID: <CADef55qUFDe9NooxFOfJWqnCnyE78PBJ7-8QnpXjEY_-tAVkCw@mail.gmail.com>
Date: Mon, 12 May 2025 10:45:23 +0900
From: Slava Barinov <rayslava@...il.com>
To: Slava Barinov <rayslava@...il.com>, musl@...ts.openwall.com
Subject: Re: [PATCH] force -fno-lto for CRT files
Hello,
Okay, I've rechecked the build and it seems that the check should be applied to
exactly the same objects as NO_SSP flags.
Please find the updated patch.
Best Regards,
Slava Barinov.
On Sat, Apr 26, 2025 at 3:28 AM Szabolcs Nagy <nsz@...t70.net> wrote:
>
> * Slava Barinov <rayslava@...il.com> [2025-04-26 00:38:18 +0900]:
> > If the library is built using -flto flag the symbol only referenced in inline
> > assembly is considered unused and therefore is removed.
> >
> > Zig compiler has the same issue: https://github.com/ziglang/zig/issues/10364
>
> cflags like -fno-lto require configure check, see CFLAGS_NOSSP
>
> > ---
> > Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 3ad88b35..709c5860 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -127,7 +127,7 @@ NOSSP_OBJS = $(CRT_OBJS) $(LDSO_OBJS) $(filter \
> > , $(LIBC_OBJS))
> > $(NOSSP_OBJS) $(NOSSP_OBJS:%.o=%.lo): CFLAGS_ALL += $(CFLAGS_NOSSP)
> >
> > -$(CRT_OBJS): CFLAGS_ALL += -DCRT
> > +$(CRT_OBJS): CFLAGS_ALL += -DCRT -fno-lto
> >
> > $(LOBJS) $(LDSO_OBJS): CFLAGS_ALL += -fPIC
> >
> > --
> > 2.49.0
View attachment "0001-force-fno-lto-for-CRT-files.patch" of type "text/x-patch" (1860 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.