Date: Fri, 23 Oct 2015 02:13:53 +0200 From: Denys Vlasenko <vda.linux@...glemail.com> To: musl <musl@...ts.openwall.com> Cc: Rich Felker <dalias@...c.org> Subject: Re: Having hard time adding to CFLAGS On Fri, Oct 23, 2015 at 1:04 AM, Josiah Worcester <josiahw@...il.com> wrote: > On Thu, Oct 22, 2015 at 3:31 PM Denys Vlasenko <vda.linux@...glemail.com> > wrote: >> Evidently, my CFLAGS replaced needed flags instead of being added at the >> end. >> >> Can this be fixed? If user needs to use e.g. EXTRA_CFLAGS instead, >> please fix configure --help. > > > This appears to be an issue with how you're expecting CFLAGS to work. I don't expect CFLAGS to work in any particular way. I would use whichever variable musl build system's documentation tells me to in order to add my own flags to gcc. My point is, documentation does not tell me how to achieve that. > As > with almost anything with configure, all the optimization flags you want > need to be in CFLAGS. Normally, a program would have nothing in there > otherwise, so you'd be just getting the "-falign-functions=1" flag going to > GCC. If you want to optimize it, you would actually need CFLAGS="-Os ...". And I would need to know to add -fPIC etc, right? Now, how would I make -fPIC appear *only where it is needed*? The project may build some *.c files as part of a *library* and therefore need -fPIC, and some other *.c files as a part of a *binary*, where -fPIC is better not be used. > As for the "no -fPIC", I believe you're looking at the build for two > different objects. No, I don't.
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.