dietlibc/dietlibc-0.31-no-stack-protector.patch
2009-03-01 12:42:34 +00:00

34 lines
1.1 KiB
Diff

From 3bbcb9a3a908d1aceb9f69118c1ed17a8d6d1871 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 28 Feb 2009 13:32:45 +0100
Subject: [PATCH] build some files without stack-protector
---
Makefile | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 0cd0105..46ef360 100644
--- a/Makefile
+++ b/Makefile
@@ -128,6 +128,8 @@ LIBPTHREAD_OBJS=$(patsubst libpthread/%.c,$(OBJDIR)/%.o,$(shell ./threadsafe.sh)
LIBGMON_OBJS=$(OBJDIR)/__mcount.o $(OBJDIR)/monitor.o $(OBJDIR)/profil.o
+NO_STACK_PROTECTOR=stackgap.o __get_elf_aux_value.o
+
include $(ARCH)/Makefile.add
LIBMATHOBJ=$(patsubst %,$(OBJDIR)/%,$(LIBMATH))
@@ -177,6 +179,8 @@ $(OBJDIR)/stack_smash_handler2.o: XCFLAGS:=-fno-omit-frame-pointer
$(OBJDIR)/%.o: %.c
$(CROSS)$(CC) $(INC) $(CFLAGS) $(XCFLAGS) -c $< -o $@ -D__dietlibc__
$(COMMENT) -$(CROSS)strip -x -R .comment -R .note $@
+
+$(addprefix $(OBJDIR)/,$(NO_STACK_PROTECTOR)): XCFLAGS+=-fno-stack-protector
endif
ifeq ($(shell $(CC) -v 2>&1 | grep "gcc version"),gcc version 4.0.0)
--
1.6.0.6