All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fio: add debug compile flag to avoid compiler warning
@ 2016-12-05 17:41 Dave Jiang
  2016-12-15 20:27 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Jiang @ 2016-12-05 17:41 UTC (permalink / raw)
  To: fio

When compile with debug, without the proper -O flag the compiler complains:
/usr/include/features.h:331:4: warning: #warning _FORTIFY_SOURCE requires
compiling with optimization (-O) [-Wcpp]
#  warning _FORTIFY_SOURCE requires compiling with optimization (-O)

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 Makefile |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index b3a12dd..4e7a0b4 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,8 @@ SCRIPTS = $(addprefix $(SRCDIR)/,tools/fio_generate_plots tools/plot/fio2gnuplot
 
 ifndef CONFIG_FIO_NO_OPT
   CFLAGS += -O3
+else
+  CFLAGS += -O
 endif
 
 ifdef CONFIG_GFIO


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fio: add debug compile flag to avoid compiler warning
  2016-12-05 17:41 [PATCH] fio: add debug compile flag to avoid compiler warning Dave Jiang
@ 2016-12-15 20:27 ` Jens Axboe
  2016-12-15 20:37   ` Dave Jiang
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2016-12-15 20:27 UTC (permalink / raw)
  To: Dave Jiang; +Cc: fio

On Mon, Dec 05 2016, Dave Jiang wrote:
> When compile with debug, without the proper -O flag the compiler complains:
> /usr/include/features.h:331:4: warning: #warning _FORTIFY_SOURCE requires
> compiling with optimization (-O) [-Wcpp]
> #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)

Wouldn't it be better to only add the FORTIFY parts if optimization is
enabled?

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fio: add debug compile flag to avoid compiler warning
  2016-12-15 20:27 ` Jens Axboe
@ 2016-12-15 20:37   ` Dave Jiang
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Jiang @ 2016-12-15 20:37 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio



On 12/15/2016 01:27 PM, Jens Axboe wrote:
> On Mon, Dec 05 2016, Dave Jiang wrote:
>> When compile with debug, without the proper -O flag the compiler complains:
>> /usr/include/features.h:331:4: warning: #warning _FORTIFY_SOURCE requires
>> compiling with optimization (-O) [-Wcpp]
>> #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
> 
> Wouldn't it be better to only add the FORTIFY parts if optimization is
> enabled?
> 

I didn't know what the intention of that compile flag was. I was just
trying to turn on debugging and hit that. But I will get that moved.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-15 20:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-05 17:41 [PATCH] fio: add debug compile flag to avoid compiler warning Dave Jiang
2016-12-15 20:27 ` Jens Axboe
2016-12-15 20:37   ` Dave Jiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.