Skip to content
Browse files

[CS230] gcc link option added for glibc function call backtrace

Signed-off-by: Dongsoo Kim <dongsoo.kim@gmail.com>
  • Loading branch information...
1 parent 6cc9d4e commit 645587c5bb3d9a29b4f384247eb9d8cf4e533893 @kdsoo committed Apr 6, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 Makefile.flags
View
7 Makefile.flags
@@ -30,6 +30,9 @@ CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
# If you want to add more -Wsomething above, make sure that it is
# still possible to build bbox without warnings.
+# CS230 debug feature: backtrace stack
+CFLAGS += $(call cc-option,-rdynamic,)
+
ifeq ($(CONFIG_WERROR),y)
CFLAGS += $(call cc-option,-Werror,)
## TODO:
@@ -60,10 +63,10 @@ CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1
ifneq ($(CONFIG_DEBUG),y)
CFLAGS += $(call cc-option,-Os,$(call cc-option,-O2,))
else
-CFLAGS += $(call cc-option,-g,)
+CFLAGS += $(call cc-option,-g -rdynamic,)
#CFLAGS += "-D_FORTIFY_SOURCE=2"
ifeq ($(CONFIG_DEBUG_PESSIMIZE),y)
-CFLAGS += $(call cc-option,-O0,)
+CFLAGS += $(call cc-option,-O0 -rdynamic,)
else
CFLAGS += $(call cc-option,-Os,$(call cc-option,-O2,))
endif

0 comments on commit 645587c

Please sign in to comment.
Something went wrong with that request. Please try again.