X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=ryKVkA+QkE9/suYHfI/nhFDuHCE98QgY0zaMGv38yK8=; b=kOhysAgyN5St4cX/O8MKssp2B9lqqauVnQ6T1KczMPjDumGJCNzCQ8sQ3uvk9mtcU7 H46vn+HPgLPrpM/tvH2SVSDCZ8FYPTLDh2fqE3c4fNLNdVP9OOCORxmjrsDjC8OMQhsf iHOEEFTKuHbhAHWVkvR9AgFBDOkfKWp/+qzVX8plmoPc4LY+oXBkSYkvCJVbG/VKrjRa C7KPnMzsWGN5j+74C2XfV9VfWzXCpwM1zuetOfP0V0SgAgjnlWod6yma2sVmYwx26GYx dpQRzdzIrMSdkRTnKaPGWuxqO44V5HmiFNHsF4BgqMJ/X950ge629kZsVxtm+FnkpTW9 ACgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ryKVkA+QkE9/suYHfI/nhFDuHCE98QgY0zaMGv38yK8=; b=Jc1PZ3hqbhBsl0p9tnojLjXWEy+UkBz2kvi26YWFfpb3EXIWe1ctMZkTIU+PtDOHwq V7tIiY8Lw2Nq1qnH81X4YTxCJ6VUr988rVltwHghJHGteAQpFlDNH99yVhr2oLRExv0P P4+mFPN//Fm4QP1/f09ldP69yOH5NiS2Rhy3Q1Wg2r89UjzQzHdZ2OwDHT11OA82R9h0 O9cjo72Xhyy9DZNneDC85kQtgIhkBcm+VNmZte50Fg49Xzsu1CSvurde4d0viIAJWKAZ Ah0kT/4+QIQCyaYboS3ve9+9ZKPK5cCXjruqEwC1afRD1hipU4W+ETvTpBIB08YBKYHI dnpw== X-Gm-Message-State: AOAM5320ePDPJMQDZucxk2+JlgRy2P/aS0vQQlLCknLRGRFbezgdeZOz Hk9UY9u1ECLMMv+O6piFZ9X6teEqbWc= X-Google-Smtp-Source: ABdhPJwiugK9MUG+tlV1lzmo/FnsxaDwlb/vdrRFMC4MF6dMUN9L5a+f7fjRpU7DvMvunpFHtAvfmQ== X-Received: by 2002:a19:4941:: with SMTP id l1mr3174190lfj.136.1607626519664; Thu, 10 Dec 2020 10:55:19 -0800 (PST) Subject: Re: Difficulties compiling libc from repository using gcc 10.N.0 To: djgpp AT delorie DOT com References: <5FD1FEA1 DOT 7010304 AT gmx DOT de> <8816d501-9f33-4d68-4235-1935a83580f6 AT gmail DOT com> <111383e4-b3db-f346-b71c-749dee17dc9e AT gmail DOT com> <831rfx4ixg DOT fsf AT gnu DOT org> From: "J.W. Jagersma (jwjagersma AT gmail DOT com) [via djgpp AT delorie DOT com]" Message-ID: <6371c322-a0ad-b85a-1ccc-1bdfff4a8d87@gmail.com> Date: Thu, 10 Dec 2020 19:55:11 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <831rfx4ixg.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 2020-12-10 19:25, Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com] wrote: >> From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" >> Date: Thu, 10 Dec 2020 20:44:01 +0300 >> >> --- src/debug/fsdb/makefile 27 Sep 1998 17:04:26 -0000 1.3 >> +++ src/debug/fsdb/makefile 10 Dec 2020 17:39:43 -0000 >> @@ -12,6 +12,9 @@ EOBJS += unassmbl.o >> >> include $(TOP)/../makefile.inc >> >> +#see screen.h as to why this is needed >> +CFLAGS += -fcommon >> + > > This part looks OK. > >> --- src/libc/ansi/stdlib/exit.c 2 May 2015 07:32:10 -0000 1.9 >> +++ src/libc/ansi/stdlib/exit.c 10 Dec 2020 17:39:43 -0000 >> @@ -15,7 +15,7 @@ >> >> struct __atexit *__atexit_ptr = 0; >> >> -void (*__stdio_cleanup_hook)(void); >> +extern void (*__stdio_cleanup_hook)(void); /* stdio/stdiohk.c */ > > This part I don't understand: are you saying that it is no longer the > default that a function not explicitly declared 'static' has the > external linkage? Why do we need an explicit 'extern' qualifier? > > Thanks. This only applies to global variables (and __stdio_cleanup_hook here is a function *pointer*), functions themselves still have implicit external linkage. I'm not a C language lawyer but this page suggests that it was always an error to omit 'extern' on global variable declarations. It just wasn't reported as such, until now: https://gcc.gnu.org/gcc-10/porting_to.html