Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8488335c authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

Revert "perf tools: Improve setting of gcc debug option"

This reverts commit e8b7ea43.

Martin created a gcc PR:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68836



Reported-by: default avatarJiri Olsa <jolsa@redhat.com>
Acked-by: default avatarIngo Molnar <mingo@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Martin Liska <mliska@suse.cz>
Cc: Namhyung Kim <namhyung@kernel.org>,
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20151202164827.GA21124@krava.brq.redhat.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 61fa0e94
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -135,8 +135,6 @@ endif

ifeq ($(DEBUG),0)
  CFLAGS += -O6
else
  CFLAGS += $(call cc-option,-Og,-O0)
endif

ifdef PARSER_DEBUG
+0 −19
Original line number Diff line number Diff line
@@ -177,22 +177,3 @@ $(if $($(1)),$(call _ge_attempt,$($(1)),$(1)),$(call _ge_attempt,$(2)))
endef
_ge_attempt = $(if $(get-executable),$(get-executable),$(call _gea_err,$(2)))
_gea_err  = $(if $(1),$(error Please set '$(1)' appropriately))

# try-run
# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
# Exit code chooses option. "$$TMP" is can be used as temporary file and
# is automatically cleaned up.
try-run = $(shell set -e;		\
	TMP="$(TMPOUT).$$$$.tmp";	\
	TMPO="$(TMPOUT).$$$$.o";	\
	if ($(1)) >/dev/null 2>&1;	\
	then echo "$(2)";		\
	else echo "$(3)";		\
	fi;				\
	rm -f "$$TMP" "$$TMPO")

# cc-option
# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)

cc-option = $(call try-run,\
	$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2))