From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: [PATCH] Disable stack protector in test suite Date: Thu, 17 May 2007 11:26:01 -0500 Message-ID: <464C8219.80100@us.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030001090905020108070802" To: kvm-devel Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. --------------030001090905020108070802 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit The cc-option is originally from Linux. Regards, Anthony Liguori --------------030001090905020108070802 Content-Type: text/x-patch; name="stack-protector.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="stack-protector.diff" Subject: [PATCH] Disable stack protector in test suite Some distros (like Ubuntu) enable GCC's stack protector by default. The stack protector requires symbols in libgcc so since we're not linking against libgcc, we need to disable the stack protector. Signed-off-by: Anthony Liguori Index: userspace-1/user/Makefile =================================================================== --- userspace-1.orig/user/Makefile 2007-05-17 11:11:21.848860976 -0500 +++ userspace-1/user/Makefile 2007-05-17 11:14:12.295949080 -0500 @@ -1,8 +1,17 @@ include config.mak +# cc-option +# Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0) + +cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \ + > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) + CFLAGS = -I $(KERNELDIR)/include $(autodepend-flags) -g -fomit-frame-pointer \ -Wall -m$(bits) +CFLAGS += $(call cc-option, -fno-stack-protector, "") +CFLAGS += $(call cc-option, -fno-stack-protector-all, "") + CXXFLAGS = $(autodepend-flags) autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d --------------030001090905020108070802 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ --------------030001090905020108070802 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --------------030001090905020108070802--