From nobody Tue Mar 07 23:11:30 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 4PWWR651QGz3wmbp; Tue, 7 Mar 2023 23:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PWWR64XmXz47Xx; Tue, 7 Mar 2023 23:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678230690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I6mBKvApaZ5UPiubsv9cJPerO0ufDRMSoNtSc5VdZ14=; b=YuUjQkh0vh2R+kidPjgHVf16rST3N2rILRBGQUZr8W55CAx9FeBfgk4SC3okGu52Ea3Jca Dctt51s/foylLius7YRGQbPzs69WHYPhGu/Rx4Mz3tU38xjn0GTWSXZdZTfU2vZ22xMiUn iqcbB+TzOrugMJvBjJ0dgaft2V4XTSV8H4jggp0yBVgi87yVvwCH4vLxTQdnvPyiYmx2Oj 8fqEwcKMu00LzemxWjgysKJG1FDR2QFQuuagS8a6uZmEmMxk6+BaeT5NVoxZ6CuuijPHKJ EvqpEKcZKzcS4nziwta/hMfw4/SaegkCSyR9VmuBoYFCBcfg38jVFS4uCuDIAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678230690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I6mBKvApaZ5UPiubsv9cJPerO0ufDRMSoNtSc5VdZ14=; b=XOyYW2wWjOxGdr66xllN0aqM1d4FVT3W48u8LrpWoeZsDRnVjOYWSzmSv6SQNaWITxGMXO bUkpXGOxbQuYOiidP6bY+izy1pwLIM2DLCOcfsfsbapYQWc9wYECpSSEBHXnn/zfl4RJW3 9/kt8UVFe7142Y9YNauIH8lVrecFrmixR5kvU7beKmLyuiIbbebFhos9H4CEMFUB7yl0hz WZSEBx8sAU7vPDo47xXQOfq/5kxvXLBwsYnw52GnkYXNc3b8TmAZdFzN3ZnZQnT9D6Qg7w h8gvcYYfKxTjcpSfO4N3vExC7Ez23IQCfZHnPeH8qK31Nos5ghdBfzu6nJVGQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678230690; a=rsa-sha256; cv=none; b=JzmHJTDOQJ6LmxGVV5F7WCLpQHfszwzRR3H9RVTSKMFNY+/muOW7rteWL/HIA6JzEpSmi9 9xQJ3QPyYiF+HRRx8SVfzTq/bsbIAiJalMen+x7pKiofRhs4t8Idb8AnpRN38A2uUDijgs FcKD0LdWF9TEBKIfxQRfH3yNBL8MYoNrpiVucIl60OMe8o8rs6h/Kg4b0inDG1A3vPtIRi wc3Q7rh/JOnDZck8D2B4fKRVWYxmjEVb4j1gL4VdeuRF+3dT399tMvifTfjhG/dmmHBRYx 3c9fV65ZWuE8MPO+su7xCj0zgyRFzNc6JFp+EEPhPwpEXUc8ETuWzjTxlL49TQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PWWR63dtnz12Q2; Tue, 7 Mar 2023 23:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 327NBUk2043071; Tue, 7 Mar 2023 23:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 327NBUfu043070; Tue, 7 Mar 2023 23:11:30 GMT (envelope-from git) Date: Tue, 7 Mar 2023 23:11:30 GMT Message-Id: <202303072311.327NBUfu043070@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 320e7e0003db - main - Revert "Fix cross-build support for Ubuntu 16.04" 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 320e7e0003dbc14ed3fc01b95532924cd3fbda7b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=320e7e0003dbc14ed3fc01b95532924cd3fbda7b 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 Revert "Fix cross-build support for Ubuntu 16.04" This reverts commit d6327ae8c11b73765f100981baca49166b558b70. 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. 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. 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(-) 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