diff --git a/boards/native/Makefile.include b/boards/native/Makefile.include index 5fee14a7d90d5c6c48c2b797e09c393ebd3dc801..f8ddcdfa8e3a908ddfa48ed8bc07a6b1e63fd6a5 100644 --- a/boards/native/Makefile.include +++ b/boards/native/Makefile.include @@ -22,7 +22,8 @@ export LINKFLAGS += -m32 -gc -ldl export ASFLAGS = export DEBUGGER_FLAGS = $(ELF) export VALGRIND_FLAGS ?= --track-origins=yes -all-valgrind: export CFLAGS += -DHAVE_VALGRIND_VALGRIND_H -g +all-valgrind: export CFLAGS += -DHAVE_VALGRIND_H -g +all-valgrind: export INCLUDES += $(shell pkg-config valgrind --cflags) # backward compatability with glibc <= 2.17 for native ifeq ($(CPU),native) diff --git a/cpu/native/README b/cpu/native/README index 89ced7e029dbb4db2fecec26b20b74553a35b6e9..956a815f499adaefde159e9e86f00d9db2d49986 100644 --- a/cpu/native/README +++ b/cpu/native/README @@ -32,14 +32,6 @@ As root call: echo 0 > /proc/sys/kernel/yama/ptrace_scope -PS: -If the all-valgrind make target fails you might have to adjust the -headers path. Change the parameter in boards/native/Makefile.include -from HAVE_VALGRIND_VALGRIND_H to HAVE_VALGRIND_H to resolve the -situation locally and open an issue to get it resolved permanently. (I -have not yet encountered a platform that actually uses the other -header path.) - NETWORK SUPPORT =============== diff --git a/dist/Makefile b/dist/Makefile index 116869de8977287acaf3bdbe733c5c1b52dfad98..23d16d80d04cedd64226263615928762cb42e02c 100644 --- a/dist/Makefile +++ b/dist/Makefile @@ -23,13 +23,9 @@ export RIOTBASE ?= $(CURDIR)/../../RIOT # Uncomment this to enable scheduler statistics for ps: #CFLAGS += -DSCHEDSTATISTICS -# If you want to use valgrind, you should recompile native with either -# HAVE_VALGRIND_H or HAVE_VALGRIND_VALGRIND_H depending on the location -# of the valgrind header (i.e. <valgrind.h> or <valgrind/valgrind.h>) -# For more information about the valgrind support of RIOT read: -# RIOT/cpu/native/README -#CFLAGS += -DHAVE_VALGRIND_VALGRIND_H -#CFLAGS += -DHAVE_VALGRIND_H +# If you want to use native with valgrind, you should recompile native +# with the target all-valgrind instead of all: +# make -B clean all-valgrind # Uncomment this to enable code in RIOT that does safety checking # which is not needed in a production environment but helps in the diff --git a/examples/ccn-lite-client/HOWTO b/examples/ccn-lite-client/HOWTO index 5c8bd19f6899e126dcbdc041748d77068fc6ccd8..863187582e385105618330ff4f84c96b91b92324 100644 --- a/examples/ccn-lite-client/HOWTO +++ b/examples/ccn-lite-client/HOWTO @@ -2,7 +2,7 @@ simple appserver (all in one shell) ==================================================== 0. create tap devices: *./cpu/native/tapsetup.sh create 3* -1. build ccn-lite-client: *CFLAGS="-DHAVE_VALGRIND_VALGRIND_H" make -B clean all* +1. build ccn-lite-client: *make -B clean all-valgrind* 2. start: *./bin/native/ccn-lite-client.elf tap0* (valgrind support included) 3. start ccn thread: *ccn* [enter] (this starts the ccn relay network stack) 4. start appserver thread: *appserver* [enter] (this starts the userland appserver, which registers for "/riot/appserver/" diff --git a/examples/ccn-lite-client/Makefile b/examples/ccn-lite-client/Makefile index d850dbd18b03e48af721fe62d5ffa1f8109aa50a..28680a180d9802a64a08d915efe4f732545b8129 100644 --- a/examples/ccn-lite-client/Makefile +++ b/examples/ccn-lite-client/Makefile @@ -15,13 +15,9 @@ export RIOTBASE ?= $(CURDIR)/../.. # Uncomment this to enable scheduler statistics for ps: #CFLAGS += -DSCHEDSTATISTICS -# If you want to use valgrind, you should recompile native with either -# HAVE_VALGRIND_H or HAVE_VALGRIND_VALGRIND_H depending on the location -# of the valgrind header (i.e. <valgrind.h> or <valgrind/valgrind.h>) -# For more information about the valgrind support of RIOT read: -# RIOT/cpu/native/README -#CFLAGS += -DHAVE_VALGRIND_VALGRIND_H -#CFLAGS += -DHAVE_VALGRIND_H +# If you want to use native with valgrind, you should recompile native +# with the target all-valgrind instead of all: +# make -B clean all-valgrind # Uncomment this to enable code in RIOT that does safety checking # which is not needed in a production environment but helps in the diff --git a/examples/ccn-lite-relay/Makefile b/examples/ccn-lite-relay/Makefile index 230e536d0b699b3df07f6d55dbb1ade6db33d2c6..96cf6d919e251600b16edbcb2c39e3727e5dc229 100644 --- a/examples/ccn-lite-relay/Makefile +++ b/examples/ccn-lite-relay/Makefile @@ -15,13 +15,9 @@ export RIOTBASE ?= $(CURDIR)/../.. # Uncomment this to enable scheduler statistics for ps: #CFLAGS += -DSCHEDSTATISTICS -# If you want to use valgrind, you should recompile native with either -# HAVE_VALGRIND_H or HAVE_VALGRIND_VALGRIND_H depending on the location -# of the valgrind header (i.e. <valgrind.h> or <valgrind/valgrind.h>) -# For more information about the valgrind support of RIOT read: -# RIOT/cpu/native/README -#CFLAGS += -DHAVE_VALGRIND_VALGRIND_H -#CFLAGS += -DHAVE_VALGRIND_H +# If you want to use native with valgrind, you should recompile native +# with the target all-valgrind instead of all: +# make -B clean all-valgrind # Uncomment this to enable code in RIOT that does safety checking # which is not needed in a production environment but helps in the diff --git a/examples/default/Makefile b/examples/default/Makefile index f5d01c389d249edccbc9e3bbb008513aeb9c293d..1ac0c27c089f024da8d0f7fd5fc9f7ba749bc5cd 100644 --- a/examples/default/Makefile +++ b/examples/default/Makefile @@ -15,13 +15,9 @@ export RIOTBASE ?= $(CURDIR)/../.. # Uncomment this to enable scheduler statistics for ps: #CFLAGS += -DSCHEDSTATISTICS -# If you want to use valgrind, you should recompile native with either -# HAVE_VALGRIND_H or HAVE_VALGRIND_VALGRIND_H depending on the location -# of the valgrind header (i.e. <valgrind.h> or <valgrind/valgrind.h>) -# For more information about the valgrind support of RIOT read: -# RIOT/cpu/native/README -#CFLAGS += -DHAVE_VALGRIND_VALGRIND_H -#CFLAGS += -DHAVE_VALGRIND_H +# If you want to use native with valgrind, you should recompile native +# with the target all-valgrind instead of all: +# make -B clean all-valgrind # Uncomment this to enable code in RIOT that does safety checking # which is not needed in a production environment but helps in the diff --git a/examples/rpl_udp/Makefile b/examples/rpl_udp/Makefile index b0a1f14e3b3ae7326a71abe9faaedf1bf454de0e..aeaf0c41972f3909654f46c236f5d334783a2c91 100644 --- a/examples/rpl_udp/Makefile +++ b/examples/rpl_udp/Makefile @@ -15,13 +15,9 @@ export RIOTBASE ?= $(CURDIR)/../.. # Uncomment this to enable scheduler statistics for ps: #CFLAGS += -DSCHEDSTATISTICS -# If you want to use valgrind, you should recompile native with either -# HAVE_VALGRIND_H or HAVE_VALGRIND_VALGRIND_H depending on the location -# of the valgrind header (i.e. <valgrind.h> or <valgrind/valgrind.h>) -# For more information about the valgrind support of RIOT read: -# RIOT/cpu/native/README -#CFLAGS += -DHAVE_VALGRIND_VALGRIND_H -#CFLAGS += -DHAVE_VALGRIND_H +# If you want to use native with valgrind, you should recompile native +# with the target all-valgrind instead of all: +# make -B clean all-valgrind # Uncomment this to enable code in RIOT that does safety checking # which is not needed in a production environment but helps in the diff --git a/tests/test_irq/Makefile b/tests/test_irq/Makefile index 4fc604b6ff7fc822d2ae75fddcdc4bf411816f85..3a7ababb9b7083491bb64a2ab2cd8ac9a705d266 100644 --- a/tests/test_irq/Makefile +++ b/tests/test_irq/Makefile @@ -1,6 +1,3 @@ -valgrind: CFLAGS += -g -valgrind: CFLAGS += -DHAVE_VALGRIND_VALGRIND_H - # name of your project export PROJECT = test_irq # @@ -19,7 +16,3 @@ else USEMODULE += auto_init USEMODULE += hwtimer USEMODULE += posix - -include $(RIOTBASE)/Makefile.include -valgrind: all -endif