Skip to content

Commit

Permalink
Merge pull request #666 from LudwigOrtmann/native_valgrind_config
Browse files Browse the repository at this point in the history
Native valgrind config
  • Loading branch information
Christian Mehlis committed Feb 12, 2014
2 parents 07c5ae3 + b175dbe commit d794900
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 52 deletions.
3 changes: 2 additions & 1 deletion boards/native/Makefile.include
Expand Up @@ -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)
Expand Down
8 changes: 0 additions & 8 deletions cpu/native/README
Expand Up @@ -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
===============
Expand Down
10 changes: 3 additions & 7 deletions dist/Makefile
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/ccn-lite-client/HOWTO
Expand Up @@ -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/"
Expand Down
10 changes: 3 additions & 7 deletions examples/ccn-lite-client/Makefile
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions examples/ccn-lite-relay/Makefile
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions examples/default/Makefile
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions examples/rpl_udp/Makefile
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions 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
#
Expand All @@ -19,7 +16,3 @@ else
USEMODULE += auto_init
USEMODULE += hwtimer
USEMODULE += posix

include $(RIOTBASE)/Makefile.include
valgrind: all
endif

0 comments on commit d794900

Please sign in to comment.