diff options
author | andreast <andreast@FreeBSD.org> | 2011-11-16 21:22:51 +0000 |
---|---|---|
committer | andreast <andreast@FreeBSD.org> | 2011-11-16 21:22:51 +0000 |
commit | 63ebeabf61e44c038e9846fe7aff65ac0e60eb2b (patch) | |
tree | 1f23a4c4ac976a87d8c1d7122b35927935f97af7 /contrib/gcc | |
parent | d6cb80ae7a3ec1ab78e0343333b2f35f0ed76577 (diff) | |
download | FreeBSD-src-63ebeabf61e44c038e9846fe7aff65ac0e60eb2b.zip FreeBSD-src-63ebeabf61e44c038e9846fe7aff65ac0e60eb2b.tar.gz |
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.
Diffstat (limited to 'contrib/gcc')
-rw-r--r-- | contrib/gcc/config/rs6000/freebsd.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/gcc/config/rs6000/freebsd.h b/contrib/gcc/config/rs6000/freebsd.h index 52b013e..3136a85 100644 --- a/contrib/gcc/config/rs6000/freebsd.h +++ b/contrib/gcc/config/rs6000/freebsd.h @@ -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) + |