From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by sourceware.org (Postfix) with ESMTPS id A12493858427 for ; Mon, 27 Jun 2022 17:01:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A12493858427 Received: by mail-pj1-x1033.google.com with SMTP id w24so9902189pjg.5 for ; Mon, 27 Jun 2022 10:01:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=YAfsuJnFT1nZAx3v1328/LdVtmLYnDYGOFH+EvV9L3Q=; b=MB7CNi/zJegve/1X9gklHy52a4RxsX+FB/LEIbJCwb+Nr74TTBACpI+n7VB0Z02NU4 4FhFsgd4618JTYPeZtD01Ve/k70j79yLLnEIbB4tFKWMAXZZQ1SZzXsYQXEvfd6ow+Hm Wpu68YZcIjqmTCZ4/C/8O6Dax//2UiNGzVDF5nnlEBsp01zEwwDnlMuGuhOskzP2acQ+ MKz/UelXcDIfQN3q1Hsz6YUNwdo4CyLE3YiWCOrFWbFOHqh95FT1FZFggI/W07Ws3OjV vHxdar3uUiz1eowJoyshsXmvoqFQ9zMb0mFjQdaU1EzNclc5Da2WLMbo6sGnzc1oZHLc q2YA== X-Gm-Message-State: AJIora+fRsnqzSG2lLvL8spIIuhLowZBMxIsW71+qklyPkdbbJ2f0NoO SoYv6phjNgvIrONhgrySJMFJa9wfr3dnmo+2OK+kDQ== X-Google-Smtp-Source: AGRyM1t6qakFr45ej2gZ7FAV68EtSfHv9JPw2wule8/xVewHG7evrS73P4E5jHdsfucUVNW4vSQCwx733orAW4ifEq0= X-Received: by 2002:a17:902:f650:b0:15f:3a10:a020 with SMTP id m16-20020a170902f65000b0015f3a10a020mr15439376plg.61.1656349297308; Mon, 27 Jun 2022 10:01:37 -0700 (PDT) MIME-Version: 1.0 References: <20220627164415.8510-1-soeren@soeren-tempel.net> In-Reply-To: <20220627164415.8510-1-soeren@soeren-tempel.net> From: Ian Lance Taylor Date: Mon, 27 Jun 2022 10:01:26 -0700 Message-ID: Subject: Re: [PATCH] mksysinfo: add support for musl libc To: soeren@soeren-tempel.net Cc: gofrontend-dev@googlegroups.com, gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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: Mon, 27 Jun 2022 17:01:40 -0000 On Mon, Jun 27, 2022 at 9:47 AM wrote: > > From: S=C3=B6ren Tempel > > This patch addresses two minor compatibility issues with musl libc: > > * On some architecture (e.g. PowerPC), musl has more than one field > prefixed with st_{a,m,c}tim in struct stat. This causes the sed(1) > invocation to not work correctly (since it will only replace the first > occurrence) [1]. This can be fixed by passing the 'g' flag to replace > all occurrences. > * Since version 1.2.3, musl defines SYS_SECCOMP in signal.h [2]. This > conflicts with mksysinfo extraction of syscall numbers [3]. By > restricting the grep expression to only match lower case characters we > can avoid a redefinition of SYS_SECCOMP. This is GCC PR 105225. > > This patch combines two Alpine Linux patches which have been written by > Ariadne Conill and Natanael Copa. I haven't tested this with glibc but I > strongly suspect that both changes should not introduce any issue with > glibc. Given that pretty much every one of these musl patches has led to problems on some glibc systems, it would be very nice if you could do some testing with glibc. Thanks. Can you expand on the st_atim issue? What does the musl type look like in gen-sysinfo.go? What is the value of SYS_SECCOMP in musl? Is it a system call number? What does it look like in gen-sysinfo.go? Thanks. Ian