projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39c5bd8
)
Use -fno-stack-protector with GCC versions that support it, to fix a
author
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 26 Jan 2008 16:43:15 +0000
(16:43 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 26 Jan 2008 16:43:15 +0000
(16:43 +0000)
linker error on platform on which -fstack-protector is default, such
as recent versions of Ubuntu.
src/Make.config
patch
|
blob
|
history
diff --git
a/src/Make.config
b/src/Make.config
index 16db6d5271a25cc4dcb11373ae088be2653e722f..841e9104bbce9f3f881271ee0d643b75282d205b 100644
(file)
--- a/
src/Make.config
+++ b/
src/Make.config
@@
-39,6
+39,11
@@
ASFLAGS = -Wa,--gstabs
LDFLAGS =
DEPS = -MMD -MF $(@:.o=.d)
+# Turn off -fstack-protector, which we don't support.
+ifeq ($(strip $(shell echo | $(CC) -fno-stack-protector -E - > /dev/null 2>&1; echo $$?)),0)
+CFLAGS += -fno-stack-protector
+endif
+
%.o: %.c
$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS) $(WARNINGS) $(DEFINES) $(DEPS)