From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.lauterbach.com (smtp1.lauterbach.com [62.154.241.196]) by sourceware.org (Postfix) with ESMTPS id 0384E3858C56 for ; Tue, 21 Jun 2022 12:26:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0384E3858C56 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lauterbach.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lauterbach.com Received: (qmail 32052 invoked by uid 484); 21 Jun 2022 12:26:22 -0000 X-Qmail-Scanner-Diagnostics: from frapc4.intern.lauterbach.com by smtp1.lauterbach.com (envelope-from , uid 484) with qmail-scanner-2.11 (mhr: 1.0. clamdscan: 0.99/21437. spamassassin: 3.4.0. Clear:RC:1(10.2.11.10):. Processed in 0.064063 secs); 21 Jun 2022 12:26:22 -0000 Received: from frapc4.intern.lauterbach.com (HELO [10.2.11.10]) (Authenticated_SSL:fsirl@[10.2.11.10]) (envelope-sender ) by smtp1.lauterbach.com (qmail-ldap-1.03) with TLS_AES_256_GCM_SHA384 encrypted SMTP for ; 21 Jun 2022 12:26:21 -0000 Message-ID: Date: Tue, 21 Jun 2022 14:26:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] libgo: Recognize off64_t / loff_t type definition of musl libc Content-Language: en-US To: =?UTF-8?Q?S=c3=b6ren_Tempel?= , Eric Botcazou Cc: gcc-patches@gcc.gnu.org, Andreas Schwab , Ian Lance Taylor , gofrontend-dev@googlegroups.com References: <20220424101745.13252-1-soeren@soeren-tempel.net> <875ykyq7xh.fsf@igel.home> <5577991.DvuYhMxLoT@fomalhaut> <1Y4K1GOUAVC2G.3E6YRCDTXCC02@8pit.net> From: Franz Sirl In-Reply-To: <1Y4K1GOUAVC2G.3E6YRCDTXCC02@8pit.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2022 12:26:30 -0000 Am 2022-06-21 um 09:34 schrieb Sören Tempel via Gcc-patches: > Hi, > > The problem is: glibc defines loff_t in sys/types.h, not fcntl.h (where musl > defines it). I falsely assumed that the newly committed AC_CHECK_TYPES > invocation would include fcntl.h *in addition to* AC_INCLUDES_DEFAULT. > However, as it turns out specifying includes for AC_CHECK_TYPES overwrites the > default instead of appending to it. > > The patch below should fix this by appending to AC_INCLUDES_DEFAULT explicitly. > Alternatively, we could try to add fcntl.h to AC_INCLUDES_DEFAULT, though my > autotools knowledge is severely limited and hence I am not sure how this would > be achieved. > > diff --git a/libgo/configure b/libgo/configure > index b7ff9b3..273af1d 100755 > --- a/libgo/configure > +++ b/libgo/configure > @@ -15549,8 +15549,10 @@ fi > > CFLAGS_hold="$CFLAGS" > CFLAGS="$OSCFLAGS $CFLAGS" > -ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "#include > -" > +ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" " > +$ac_includes_default > +#include > + " > if test "x$ac_cv_type_loff_t" = xyes; then : > > cat >>confdefs.h <<_ACEOF > diff --git a/libgo/configure.ac b/libgo/configure.ac > index bac58b0..b237392 100644 > --- a/libgo/configure.ac > +++ b/libgo/configure.ac > @@ -604,7 +604,9 @@ AC_TYPE_OFF_T > > CFLAGS_hold="$CFLAGS" > CFLAGS="$OSCFLAGS $CFLAGS" > -AC_CHECK_TYPES([loff_t], [], [], [[#include ]]) > +AC_CHECK_TYPES([loff_t], [], [], [ > +AC_INCLUDES_DEFAULT > +#include ]) > CFLAGS="$CFLAGS_hold" > > LIBS_hold="$LIBS" > Hi, the patch restores bootstrap for me on x86_64-suse-linux. Franz.