From nobody Tue Mar 7 23:13:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PWWTR1FWPz3wm41 for ; Tue, 7 Mar 2023 23:13:31 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PWWTQ6jWXz47pp for ; Tue, 7 Mar 2023 23:13:30 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f48.google.com with SMTP id j2so13707215wrh.9 for ; Tue, 07 Mar 2023 15:13:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678230809; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1RW8vTIZEPPSe8sGWgdQbEzV0EtDjjYCcU269IktRMc=; b=Qu6abq6zXA3c6Rj9SafvUccWvtX5ae7oS8xbyLdRvzFkCqZfX/czZ3YWA5xf3VKYWM sdjSrDqIpE72g+Je/s0S9utqEE0Zi1oN0T/ZveWGJLvby7Ub3SOftgE0FXZm47zAF/NG bS9UseLOgpcK14n6Zmven6yTqj5Gh9/T2JTQkkAlE3LR42wCkmUBVIbG4eMlmRC5/y/r t3M3ZvhSjdwCiRsHhWRgFU6LhKGmC0/bDKdsktDrD129Yp15R7oPJJj0YNqv4d/HmS+4 xnkAc9JA/2a0tlMKGf78LmS6ylAS+UtjyLIi0E5Do62ruzZKx7aPpxQ8u0VeMUjEpQ+M yMcg== X-Gm-Message-State: AO0yUKU0NKQo6McGiX9E1YoJVGi8M0rqv+QnKFochAO7kG1vwuINXRzR hc6WZVOm+/yFfRo6EEkTEQ4vRoitMja2wYC/kNu8PA== X-Google-Smtp-Source: AK7set+fqRkKJlijj/0g5Yk1sZ31DDsu2vUGpVJnWrVOWr+KIqJkt6QZNP68kW4iZpOYruh2ThCqrw== X-Received: by 2002:a5d:5447:0:b0:2c7:a55:bef2 with SMTP id w7-20020a5d5447000000b002c70a55bef2mr8960585wrv.46.1678230809439; Tue, 07 Mar 2023 15:13:29 -0800 (PST) Received: from smtpclient.apple (global-5-144.n-2.net.cam.ac.uk. [131.111.5.144]) by smtp.gmail.com with ESMTPSA id b8-20020a5d4d88000000b002c70e60eb40sm13685980wru.11.2023.03.07.15.13.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Mar 2023 15:13:29 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 320e7e0003db - main - Revert "Fix cross-build support for Ubuntu 16.04" From: Jessica Clarke In-Reply-To: <202303072311.327NBUfu043070@gitrepo.freebsd.org> Date: Tue, 7 Mar 2023 23:13:28 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202303072311.327NBUfu043070@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4PWWTQ6jWXz47pp X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 7 Mar 2023, at 23:11, Warner Losh wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D320e7e0003dbc14ed3fc01b95532924c= d3fbda7b >=20 > commit 320e7e0003dbc14ed3fc01b95532924cd3fbda7b > Author: Jose Luis Duran > AuthorDate: 2023-03-02 15:31:31 +0000 > Commit: Warner Losh > CommitDate: 2023-03-07 23:11:11 +0000 >=20 > Revert "Fix cross-build support for Ubuntu 16.04" >=20 > This reverts commit d6327ae8c11b73765f100981baca49166b558b70. >=20 > Before version 2.25, glibc's unistd.h would define the POSIX subset = of > getopt.h by defining __need_getopt, including getopt.h (which would > disable the header guard) and then undefining it so later including > getopt.h explicitly would define the extensions. However, we wrap > getopt, and so the wrapper's #pragma once breaks that. Thus = getopt.h was > included before the real unistd.h to ensure we get all the = extensions. >=20 > However, with clang 12 that causes problems where we get a function > mismatch (since getopt can throw exceptions). If we include it = after > unistd.h, it will get the full definitions since glibc no longer = does > the subsetting thing. This will result in matching definitions and = fix > clang 12. This is the bit I still don=E2=80=99t understand and hoped the author = would explain=E2=80=A6 Jess > Reviewed by: imp, jrtc27 (OK'd on irc) > Pull Request: https://github.com/freebsd/freebsd-src/pull/668 > --- > tools/build/cross-build/include/linux/unistd.h | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) >=20 > diff --git a/tools/build/cross-build/include/linux/unistd.h = b/tools/build/cross-build/include/linux/unistd.h > index f518df2ac9ae..cd0b28ba39ed 100644 > --- a/tools/build/cross-build/include/linux/unistd.h > +++ b/tools/build/cross-build/include/linux/unistd.h > @@ -41,17 +41,9 @@ > /* Ensure that unistd.h pulls in getopt */ > #define __USE_POSIX2 > #endif > -/* > - * Before version 2.25, glibc's unistd.h would define the POSIX = subset of > - * getopt.h by defining __need_getopt, including getopt.h (which = would > - * disable the header guard) and then undefining it so later = including > - * getopt.h explicitly would define the extensions. However, we wrap = getopt, > - * and so the wrapper's #pragma once breaks that. Thus getopt.h must = be > - * included before the real unistd.h to ensure we get all the = extensions. > - */ > -#include > #include_next > #include > +#include > #include > #include > #include