Hi Ryu,
Thank you.
You are right. We add -D_FORTIFY_SOURCE=2 in CFLAGS and CXXFLAGS in our project Makefile.
If we remove it, the warnings go away.
I tried your suggestion but I got the following warning:
[346/369] compiling obj/MEGAnalyzer3.o
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
However, if I add
'-U_FORTIFY_SOURCE' instead the warning above disappears.
Do you think it is OK for all?
Regards,
Yusuke
> Hi Yusuke
>
> NOOPT is added for potentially large source files to reduce the compile time and memory usage.
>
> I guess -D_FORTIFY_SOURCE option is added in your project Makefile or in your environment variable, instead of by
> ROME.
> However, we could modify ROME to explicitly disable it by adding -D_FORTIFY_SOURCE=0 to NOOPT.
> That can be done by modifying builder/src/ROMEBuildMakeFile.cpp line 1348.
>
> Could you try to do it ?
>
> Ryu
>
>
> > Dear all,
> >
> > Under the environment with GCC4.8.5 and ROOT6.08.04,
> > we get the following warning messages when compiling XXXAnalyzer3, XXXAnalyzer4,
> > XXXConfig, XXXConfig2,3,4, XXXDBAccess, and XXXConfigToForm.
> >
> >
> > In file included from /usr/include/stdlib.h:24:0,
> > from /meg/data1/shared/mc/benchmark_test/rome3-root6.08.04-
> > gcc485/include/ROMEAnalyzer.h:10,
> > from include/generated/MEGPrecompile.h:23,
> > from <command-line>:0:
> > /usr/include/features.h:330:4: warning: #warning _FORTIFY_SOURCE requires compiling
> > with optimization (-O) [-Wcpp]
> > # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
> > ^
> > [345/369] compiling obj/MEGAnalyzer4.o
> > In file included from /usr/include/stdlib.h:24:0,
> > from /meg/data1/shared/mc/benchmark_test/rome3-root6.08.04-
> > gcc485/include/ROMEAnalyzer.h:10,
> > from include/generated/MEGPrecompile.h:23,
> > from <command-line>:0:
> > /usr/include/features.h:330:4: warning: #warning _FORTIFY_SOURCE requires compiling
> > with optimization (-O) [-Wcpp]
> > # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
> > ^
> >
> > It seems due to 'NOOPT' flag added to those objects in the Makefile.
> > Is the 'NOOPT' flag necessary? If not, how can we remove it?
> >
> > Regards,
> > Yusuke |