From patchwork Thu Jun 9 15:00:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Mentovai X-Patchwork-Id: 1641328 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=eeNA3H13; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=moxienet.com header.i=@moxienet.com header.a=rsa-sha256 header.s=google header.b=Y/TB3+wC; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LJnS54m2Gz9s2R for ; Fri, 10 Jun 2022 01:04:21 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=a7/4J0gCcYYnj/P9UsxaRKD5KxkIX3OZaWdD8E0fAnc=; b=eeNA3H13YMgYPW jnq11ccRSZwzvN3nEVAOcmD6b8B41Z5yriSGt15UlJ53LBsbS5oBy/t+31kBo6EoHguzlKp6M9KYX WByVE3Lv3SgUwEo73y866ro+swM1xIsemcuSZIWNo/3qfiNUB8e278xNz9KNFs0KM7rpndV1m0qK1 b0YtlfGCH/MjM0dY5+ADaMFs0wPrEFC+oe+PH/WyRG4xiRk3vKa4v8NoGWEddkauch39ueeUrojcf BK+1mucFaZ9cwvpov3P/6BFlsCeroAcszktQRS1FrRHh425+utjY+522vnMLhThvyx6jnuDncIMkX RQxdhra7ty/nyEf83xCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzJf5-002cwn-U0; Thu, 09 Jun 2022 15:01:28 +0000 Received: from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzJf1-002cvi-TS for openwrt-devel@lists.openwrt.org; Thu, 09 Jun 2022 15:01:25 +0000 Received: by mail-qv1-xf2c.google.com with SMTP id h18so16688036qvj.11 for ; Thu, 09 Jun 2022 08:01:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=moxienet.com; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=dYjjqOhoFpOItcX56s4GpwjlA4NrLg/tvqvQ7h1uuVo=; b=Y/TB3+wCGqNgdCmmVpful3k0kj4AlB1zvTK4DR1+9+VH/YMwP2ctNL3SX7O9i9yMCh k70UpHHngPkoVuqzm1jpMR7l3P864U0rOCXjGEkulOovEmUR5dhycTxpC7hnV5Em5MRb cfX8JQAEslDWRGyOuE9lrRWX5NOa8ieMPt3zg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=dYjjqOhoFpOItcX56s4GpwjlA4NrLg/tvqvQ7h1uuVo=; b=Qm193C2sZjtSdmenNvoInlyamkP0zdeiKLFLX1TAsCbKfPrZeIRxdRX0jCfzF9AkLX 0ou52sau6hH5ZsOvRjFKQtKl45weFwCnbL/Jo7UgyL0mnpWpO0UAXdmpCoBT4J0Ogh3/ t1s3cZ4/nEQy2KPj3fNTUcZc0pk7FdtZfUD3NOBe/qdQCnV1XFz/rrrkq1qekKoWxjr5 cvJofl1+F1qEjXcCh4ch0z3Yfc0f5CPrQ2sR05WhGvI9poQhlXhX3tbf4P8WC4fnQUW3 JrRMnB2wv4x02flQssJwW9EyAe3oDLEUdEJo+ub+PiATYVdCmpY3ZccFJeOmrvFfg5VB FGUg== X-Gm-Message-State: AOAM531s5Djw/ZTjDJvlQdhuJF9NhTbAAbn/4TFujAs1VlXSMQfGvISe 0mq4Dvri+xz0BJW5PikPVWDj9Oq2weTP6zaR X-Google-Smtp-Source: ABdhPJx8/sEAlKeD99ycWr0lBASEU7euCevdOD2E18eniGnZ6lCrQrfiPX/lk/+EiKE+A7B3nm3SDA== X-Received: by 2002:a05:6214:2406:b0:464:41bb:3582 with SMTP id fv6-20020a056214240600b0046441bb3582mr29352012qvb.3.1654786880852; Thu, 09 Jun 2022 08:01:20 -0700 (PDT) Received: from redacted (pool-100-33-93-50.nycmny.fios.verizon.net. [100.33.93.50]) by smtp.gmail.com with ESMTPSA id cc17-20020a05622a411100b00304ef50af9fsm7909886qtb.2.2022.06.09.08.01.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jun 2022 08:01:18 -0700 (PDT) From: Mark Mentovai To: openwrt-devel@lists.openwrt.org Subject: [PATCH] include/prereq-build.mk: macOS cross build improvements Date: Thu, 9 Jun 2022 11:00:58 -0400 Message-Id: <20220609150058.36323-1-mark@moxienet.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220609_080124_263010_F4F3CEFA X-CRM114-Status: GOOD ( 11.65 ) X-Spam-Score: 0.1 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This updates prereq-build.mk to find a suitable realpath utility, and adds another place to look for a suitable getopt utility. realpath has been used most notably by scripts/ipkg-build since bb95be9265a9e (2021-02-04), and there are assorted other uses of it during a build. It is ordinarily provided by GNU coreutils. This add [...] Content analysis details: (0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:f2c listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This updates prereq-build.mk to find a suitable realpath utility, and adds another place to look for a suitable getopt utility. realpath has been used most notably by scripts/ipkg-build since bb95be9265a9e (2021-02-04), and there are assorted other uses of it during a build. It is ordinarily provided by GNU coreutils. This adds a SetupHostCommand to locate it either under its own name or under grealpath, the name that it will be available as under MacPorts or Homebrew, which use --program-prefix=g. Similarly, update the SetupHostCommand for getopt to be able to locate a util-linux getopt at the default path used by MacPorts, in the same fashion that cc16f5d73e770 (2020-11-14) did for Homebrew. As there is no standard alternative --program-prefix for util-linux utilities in the way that GNU packages often use a "g" prefix, this path-based approach is required in case a non-util-linux getopt (such as one provided by an OS) shadows the util-linux getopt in the PATH. Signed-off-by: Mark Mentovai --- include/prereq-build.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index e1918f002787..1b7088456c27 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -130,7 +130,12 @@ $(eval $(call SetupHostCommand,getopt, \ Please install an extended getopt version that supports --long, \ gnugetopt -o t --long test -- --test | grep '^ *--test *--', \ getopt -o t --long test -- --test | grep '^ *--test *--', \ - /usr/local/opt/gnu-getopt/bin/getopt -o t --long test -- --test | grep '^ *--test *--')) + /usr/local/opt/gnu-getopt/bin/getopt -o t --long test -- --test | grep '^ *--test *--', \ + /opt/local/bin/getopt -o t --long test -- --test | grep '^ *--test *--')) + +$(eval $(call SetupHostCommand,realpath,Please install a 'realpath' utility, \ + grealpath /, \ + realpath /)) $(eval $(call SetupHostCommand,stat,Cannot find a file stat utility, \ gnustat -c%s $(TOPDIR)/Makefile, \