projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use -fno-stack-protector with GCC versions that support it, to fix a
[pintos-anon]
/
src
/
Make.config
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)
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)
%.o: %.c
$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS) $(WARNINGS) $(DEFINES) $(DEPS)