Re: Thoughts about introducing OPTIMIZATION_CFLAG

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

 



On Fri, Jan 8, 2016 at 12:31 PM, Michal Marek <mmarek@xxxxxxx> wrote:
> On 2016-01-08 11:03, Sedat Dilek wrote:
>> On Mon, Jan 4, 2016 at 11:37 PM, Michal Marek <mmarek@xxxxxxx> wrote:
>>> Dne 4.1.2016 v 12:47 Sedat Dilek napsal(a):
>>>> But I think you did not get my problem - to have two different
>>>> optimization-levels for a compiler in *one* make-line makes no sense
>>>> to me.
>>>
>>> That we sometimes have -O2 ... -Os on the command line is not a problem,
>>> since any same unix tool parses its options so that the last one of
>>> mutually exclusive options wins.
>>
>> That is new to me and I haven't tested this by dropping arguments in
>> my make-line(s).
>>
>> From where do have this information - sort of "business-life-experience" :-)?
>> Is that documented somewhere in the Linux-sources?
>
> You override a previously set option by appending one with different value:
>
> $ yes | head -n 10 -n 999 -n 2
> y
> y
> $
>
> This pattern is used all over in Makefiles.
>
>
>> Do you agree that it is confusing to have two optlevel arguments in
>> one make-line?
>
> It probably is, but fixing this problem would make the Makefiles unreadable.
>
>
>> Linus suggested me to use a wrapper-script in case of using two
>> different compiler and passing arguments...
>>
>> [  /usr/bin/mycompiler ]
>> #!/bin/bash
>>
>> gcc-4.9 "$@"
>> - EOF -
>>
>> According to your statement passing an optlevel here in this script
>> will never-ever be recognized - as it is at the begin-of-(make)-line.
>
> Pass it as the last argument.
>

How do I do that?

- Sedat -

>
>> So how should someone change the Linux-sources to test a different
>> optlevel than -O2?
>
> make KCFLAGS=-O3
>
> However, per-directory and per-file cflags set in Makefiles will take
> precedence. If you want to override these as well, use the wrapper.
>
> Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux