From patchwork Thu Oct 4 15:38:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Small PATCH to rs6000.c to fix cross-compiler build without gas Date: Thu, 04 Oct 2012 05:38:41 -0000 From: Jason Merrill X-Patchwork-Id: 189196 Message-Id: <506DAD81.4040506@redhat.com> To: David Edelsohn Cc: gcc-patches List If configure doesn't think that the assembler supports weak symbols, rs6000.c fails to compile because ASM_WEAKEN_DECL isn't defined. So let's not use it in that case. OK for trunk? commit 5f0878b79d1a42795aca2fabc8d70eefa2e29fa6 Author: Jason Merrill Date: Wed Oct 3 15:55:48 2012 -0400 * config/rs6000/rs6000.c (rs6000_code_end): Protect the use of ASM_WEAKEN_DECL with #if RS6000_WEAK. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 3e3d553..f4e4dec 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -28295,6 +28295,7 @@ rs6000_code_end (void) TREE_PUBLIC (decl) = 1; TREE_STATIC (decl) = 1; +#if RS6000_WEAK if (USE_HIDDEN_LINKONCE) { DECL_COMDAT_GROUP (decl) = DECL_ASSEMBLER_NAME (decl); @@ -28307,6 +28308,7 @@ rs6000_code_end (void) ASM_DECLARE_FUNCTION_NAME (asm_out_file, name, decl); } else +#endif { switch_to_section (text_section); ASM_OUTPUT_LABEL (asm_out_file, name);