On 1/7/2022 4:03 pm, Sebastian Huber wrote:
> On 01.07.22 07:38, Chris Johns wrote:
>>>> If this enable is specific to GCC's gcov then maybe we should clearly 
>>>> label it
>>>> as that and avoid overloading the term and any possible confusion that 
>>>> might
>>>> bring. For example RTEMS_GCOV_CONVERGE?
>>> It is not per se specific to GCC. Maybe we should name it
>>> RTEMS_COVERAGE_INSTRUMENTATION.
>> What if another approach to instrumented coverage is developed?
>>
>> Why the reluctance to RTEMS_GCOV_COVERAGE? I like it because it is direct.
> 
> Ok, I rename it to RTEMS_GCOV_COVERAGE.

Thanks.

>>>>> The user can fine tune the build through the
>>>>> LIBRARY_OPTIMIZATION_FLAGS, TEST_OPTIMIZATION_FLAGS, and
>>>>> COVERAGE_COMPILER_FLAGS,
>>>>> COVERAGE_LINKER_FLAGS options.
>>>> How would the LTO fat options be added? Would the pattern for
>>>> COVERAGE_COMPILER_FLAGS flags be copied to add LTO_COMPILER_FLAGS?
>>> Do you have to specify the compiler flags also during linking if you use 
>>> LTO?
>> You add `-flto -ffat-lto-objects` to build the object files so they then 
>> contain
>> the data the lto pass in the linker needs to optimise across the object 
>> files.
> 
> The COVERAGE_LINKER_FLAGS are for the linking step. Are you required to pass 
> the
> compiler flags during linking if you use LTO?

Good question, I do not know. I think you can tall the linker to use LTO and to
not use LTO. I do not know what the default mode of the linker is when presented
with LTO enabled object files? The app I am building sets these flags in the
cflags and those are passed to the linker.

>> I am encouraged by some of the generated code I have reviewed. I like what it
>> does.
>>
>>>> I am a little lost with the difference between LIBRARY_OPTIMIZATION_FLAGS 
>>>> and
>>>> OPTIMIZATION_FLAGS? RTEMS is always a library so what is difference between
>>>> them? Are the OPTIMIZATION_FLAGS the "-O" ones and still something I can 
>>>> set
>>>> from an INI file?
>>> Currently the OPTIMIZATION_FLAGS are used for all code (code for libraries 
>>> and
>>> code for tests).  With this change you can build the libraries with -O0 and 
>>> the
>>> tests with -O2 for example.
>> Oh so if I understand this the LIBRARY_OPTIMIZATION_FLAGS are per library?
> 
> Not per library, the LIBRARY_OPTIMIZATION_FLAGS are used for all libraries in
> bsps and cpukit.

Is LIBRARY_OPTIMIZATION_FLAGS then a good choice? Would more direct naming like
BSP_OPTIMIZATION_FLAGS and CPUKIT_OPTIMIZATION_FLAGS be better? If this was in
the patch I would have understood exactly what they do.

Chris
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to