This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] AIX visibility


On Tue, Nov 8, 2016 at 10:23 AM, Christophe Lyon
<christophe.lyon@linaro.org> wrote:
> Hi David,
>
> On 2 November 2016 at 16:41, David Edelsohn <dje.gcc@gmail.com> wrote:
>> This revised patch makes two changes:
>>
>> 1) Fix typo in configure.ac
>> 2) Add AIX visibility support for ASM_WEAKEN_DECL, which does touch
>> the same code as Linux.
>>
>> The AIX "weak" support fixes a large number of C++ visibility testcases.
>>
>> Bootstrapped on powerpc-ibm-aix7.2.0.0.
>>
>> * configure.ac (.hidden): Change to conftest_s string. Provide string
>> for AIX assembler.
>> (gcc_cv_ld_hidden): Yes for AIX.
>> * configure: Regenerate.
>>
>> * dwarf2asm.c (USE_LINKONCE_INDIRECT): Don't set for AIX (XCOFF).
>>
>> * config/rs6000/rs6000-protos.h (rs6000_asm_weaken_decl): Declare
>> (rs6000_xcoff_asm_output_aligned_decl_common): Declare.
>> * config/rs6000/xcoff.h (TARGET_ASM_GLOBALIZE_DECL_NAME): Define.
>> (ASM_OUTPUT_ALIGNED_DECL_COMMON): Define.
>> (ASM_OUTPUT_ALIGNED_COMMON): Delete.
>> * config/rs6000/rs6000.c (rs6000_init_builtins): Change clog rename
>> from #if to if.
>> (rs6000_xcoff_visibility): New.
>> (rs6000_xcoff_declare_function_name): Add visibility support.
>> (rs6000_xcoff_asm_globalize_decl_name): New.
>> (rs6000_xcoff_asm_output_aligned_decl_common): New.
>> (rs6000_asm_weaken_decl): New.
>> (rs6000_code_end): Disable HIDDEN_LINKONCE on XCOFF.
>> config/rs6000/rs6000.h (ASM_WEAKEN_DECL): Change definition to
>> reference function.
>>
>> dwarf2asm.c okay?
>>
>> Any comments on ASM_WEAKEN_DECL change?
>>
>> Thanks, David
>
> It seems this commit (r241930) is causing a regression on aarch64:
> FAIL: g++.dg/torture/pr60750.C   -O2 -flto -fno-use-linker-plugin
> -flto-partition=none  execution test

Hi, Christophe

Ah, I see.

Can you try the appended patch.

Thanks, David

Index: dwarf2asm.c
===================================================================
--- dwarf2asm.c (revision 241972)
+++ dwarf2asm.c (working copy)
@@ -824,7 +824,7 @@

 static GTY(()) int dw2_const_labelno;

-#if defined(HAVE_GAS_HIDDEN) && !defined(XCOFF_DEBUGGING_INFO)
+#if defined(HAVE_GAS_HIDDEN) && !XCOFF_DEBUGGING_INFO
 # define USE_LINKONCE_INDIRECT (SUPPORTS_ONE_ONLY)
 #else
 # define USE_LINKONCE_INDIRECT 0

Thanks, David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]