Re: configure sets CFLAGS or how to disable default CFLAGS='-g -O2' for gcc?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ralf Corsepius <rc040203@xxxxxxxxxx> writes:

>>         test "x$enable_cflags_setting" = xyes && CFLAGS="$CFLAGS -q64"
>
>> This way, if the user sets CFLAGS, his choice is respected (though it
>> might make the build crash - but that's his problem).
>
> Well, IMO this is your problem and qualifies as a bug in your configure
> script:  You are providing a default that probably is invalid for most
> compilers and is likely to cause building to fail or do something else
> than you expect.

No, this line of configure code is executed only on a system it will
work on.

>
>> If the user doesn't set CFLAGS, then I take the liberty of setting it
>> to what will work on his platform. (Otherwise he will just email me
>> and ask me how to set it, so this saves us all the trouble.)
> If you really want to do something like you do, you'd have to check the
> compilerm, if it accepts "-q64" and if "-q64" actually does what you
> expect it to do.
>
> In short: You have opened a can of worms, you'd better avoid.

I would like to do it the autoconf way, but we use cfortran.h, which
requires a different value in CPPFLAGS for each fortran compiler.

If I don't have my configure script provide that parameter, the build
breaks and the user emails me.

Yes, in theory the user should read the documentation and pick the
right parameters themselves.

Ed

-- 
Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx



_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux