From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99917 invoked by alias); 22 Nov 2019 16:58:50 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 99903 invoked by uid 89); 22 Nov 2019 16:58:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=libc.so, UD:libc.so, libcso, duplicated X-HELO: mx0a-001b2d01.pphosted.com From: Tulio Magno Quites Machado Filho To: Joseph Myers , libc-alpha@sourceware.org, Andreas Schwab Cc: Subject: Re: powerpc build failure with GCC mainline -fno-common change In-Reply-To: References: User-Agent: Notmuch/0.27 (http://notmuchmail.org) Emacs/25.3.1 (x86_64-redhat-linux-gnu) Date: Fri, 22 Nov 2019 16:58:00 -0000 Message-ID: <875zjb3l1a.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-11/txt/msg00758.txt.bz2 Joseph Myers writes: > glibc for powerpc configurations is failing to build with GCC mainline > after the switch to -fno-common by default. The error is multiple > definitions of __cache_line_size linking sln, in dl-sysdep.c and > libc-start.c. > > https://sourceware.org/ml/libc-testresults/2019-q4/msg00237.html > > As I see it, there are two obvious possible fixes: either use > __attribute__ ((common)) on both definitions, or change one of them to an > extern declaration if SHARED is not defined. Any comments on what would > be the better fix? AFAICS, this variable is duplicated in the loader and in libc.so and I'm afraid these suggestions would hide the real issue. > Perhaps __cache_line_size should be part of _rtld_global? Having this variable in a single place is ideal, but does it really need to be in the loader? AFAICS, libc is the only place using __cache_line_size. I'm preparing a patch that leaves this variable only in libc (shared and static), but I'm open to suggestions if you think this could variable should have been available to the other libraries too. -- Tulio Magno