From owner-svn-src-head@FreeBSD.ORG Wed Nov 16 21:22:51 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4ABB106566B; Wed, 16 Nov 2011 21:22:51 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AAC48FC08; Wed, 16 Nov 2011 21:22:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAGLMp4M067195; Wed, 16 Nov 2011 21:22:51 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAGLMpJD067193; Wed, 16 Nov 2011 21:22:51 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201111162122.pAGLMpJD067193@svn.freebsd.org> From: Andreas Tobler Date: Wed, 16 Nov 2011 21:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227586 - head/contrib/gcc/config/rs6000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2011 21:22:51 -0000 Author: andreast Date: Wed Nov 16 21:22:51 2011 New Revision: 227586 URL: http://svn.freebsd.org/changeset/base/227586 Log: Copy over the ASM_DECLARE_FUNCTION_SIZE macro from linux64.h. This macro declares the proper size of a function. Without this macro recent GNU as will complain about with: 'Error: .size expression for main does not evaluate to a constant.' Up to now we produce this: .L.main: .... .size main, .-main With the macro defined the output is this: .L.main: .... .size main,.-.L.main This affects only the 64-bit compiler. Tested with world and kernel on both, 32 and 64-bit powerpc. Modified: head/contrib/gcc/config/rs6000/freebsd.h Modified: head/contrib/gcc/config/rs6000/freebsd.h ============================================================================== --- head/contrib/gcc/config/rs6000/freebsd.h Wed Nov 16 20:18:25 2011 (r227585) +++ head/contrib/gcc/config/rs6000/freebsd.h Wed Nov 16 21:22:51 2011 (r227586) @@ -253,3 +253,22 @@ extern int dot_symbols; #undef NEED_INDICATE_EXEC_STACK #define NEED_INDICATE_EXEC_STACK 1 + +/* This is how to declare the size of a function. */ +#undef ASM_DECLARE_FUNCTION_SIZE +#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ + do \ + { \ + if (!flag_inhibit_size_directive) \ + { \ + fputs ("\t.size\t", (FILE)); \ + if (TARGET_64BIT && DOT_SYMBOLS) \ + putc ('.', (FILE)); \ + assemble_name ((FILE), (FNAME)); \ + fputs (",.-", (FILE)); \ + rs6000_output_function_entry (FILE, FNAME); \ + putc ('\n', (FILE)); \ + } \ + } \ + while (0) +