From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nV6LP-0007uh-Hs for mharc-grub-devel@gnu.org; Fri, 18 Mar 2022 02:44:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nV6LM-0007se-QS for grub-devel@gnu.org; Fri, 18 Mar 2022 02:44:13 -0400 Received: from [2607:f8b0:4864:20::f36] (port=41864 helo=mail-qv1-xf36.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nV6LL-0004wh-4j for grub-devel@gnu.org; Fri, 18 Mar 2022 02:44:12 -0400 Received: by mail-qv1-xf36.google.com with SMTP id gh15so1275278qvb.8 for ; Thu, 17 Mar 2022 23:44:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VoBtQWzz/zWpxaaMosdFNSFBAty59fPW6HHI8HkNYMw=; b=0lg926LE6jK7JkMVLmt3H6yPcEKmMP7sF2UeEOLFZz3Kss34hHtNs5HwjdKeIi3TQb Naf/XcJVoaXqocM0jao7y3J6wzBQFBZi07QMZoa88c4dqlSKn/raV0F0YRSczqLWsbst plfrgfjI4459lcnsh89c0OE3OOGzvr7cEd0TBqa2sKE0z7yU32Ibcx7t3Z3L720cnrjU m4SX9jLnePy9rM/yByQyAhf8jnjhbBxck/27a7Iv9J01f31oxEPzjbo3yZkBJeIHPUGq YbqcE5rthPx4X/Wg7hGRTGqGsZqZqRdoGfdVFg4eZ4Ky5OgRyaf3g/ufQprfnJi+fh+V 5dMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VoBtQWzz/zWpxaaMosdFNSFBAty59fPW6HHI8HkNYMw=; b=ZRO3b02Zfo/6EUTusUajHvCqOMyTF2ft+7yBTugcFeUax2y1/cjsHuDl3IhEU+1L+C nmLTiBUInfM+AzTLNAuZkFyeUdYs9tbS2TyS1ExdQSXDbw8LdgXgK9Gy11GfXsBlaTKU y7tanZYaPpqT6BdMxh3RzuW51F0bjV8GrSEzu8mezX9x1D5qDsMvKsuya7SS3HFYWkWF c1r0QII8ITDv/iYbGlHmdxBF1MzHsu9nKQla8ugwuAwN0BloOe++GaJAmQ7P5N5Ru+Qn OonHUdbgkkRvSUa2kQe80BRVfdzly9wcxszpiVCOeNnqcTozqCjrnDi0WDytT44pnC6u a88A== X-Gm-Message-State: AOAM5316mZ/vZZN4uyo1fyHpRim247MCR6i2gn3hKEJg4/byb/z+4+/K JUDIsBgyHnRhAZyKo6euOyR1DFiC7k77OA== X-Google-Smtp-Source: ABdhPJy4nIunk1LSpQNOeS3TsPXaoLjpmvUjRWkUnFiMEiAsXzoRRYlub9hfU8yhpfOCfY0/kk4f1w== X-Received: by 2002:a05:6214:d4d:b0:440:fc87:468d with SMTP id 13-20020a0562140d4d00b00440fc87468dmr1437086qvr.100.1647585849934; Thu, 17 Mar 2022 23:44:09 -0700 (PDT) Received: from localhost.localdomain (51-15-0-88.rev.poneytelecom.eu. [51.15.0.88]) by smtp.gmail.com with ESMTPSA id bp9-20020a05622a1b8900b002e0e86b8ac6sm5132302qtb.67.2022.03.17.23.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 23:44:09 -0700 (PDT) From: Glenn Washburn To: Daniel Kiper , grub-devel@gnu.org Cc: Glenn Washburn Subject: [PATCH] docs: Add information on using --build when cross-compiling Date: Fri, 18 Mar 2022 01:43:46 -0500 Message-Id: <20220318064346.3525422-1-development@efficientek.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::f36 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::f36; envelope-from=development@efficientek.com; helo=mail-qv1-xf36.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2022 06:44:13 -0000 The autoconf 2.65 manual[1] strongly recommends specifying the --build option when the --host is used. Add this to the example and add a note that this is recommended. [1] https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Hosts-and-Cross_002dCompilation.html Signed-off-by: Glenn Washburn --- INSTALL | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/INSTALL b/INSTALL index 418c4c2231..4481737868 100644 --- a/INSTALL +++ b/INSTALL @@ -189,8 +189,9 @@ For this example the configure line might look like (more details below) (some options are optional and included here for completeness but some rarely used options are omitted): - ./configure --host=x86_64-linux-gnu --target=arm-linux-gnueabihf \ - --with-platform=efi BUILD_CC=gcc BUILD_PKG_CONFIG=pkg-config \ + ./configure --build=sparc64-freebsd --host=x86_64-linux-gnu \ + --target=arm-linux-gnueabihf --with-platform=efi \ + BUILD_CC=gcc BUILD_PKG_CONFIG=pkg-config \ HOST_CC=x86_64-linux-gnu-gcc HOST_CFLAGS='-g -O2' \ PKG_CONFIG=x86_64-linux-gnu-pkg-config TARGET_CC=arm-linux-gnueabihf-gcc \ TARGET_CFLAGS='-Os -march=armv8.3-a' TARGET_CCASFLAGS='-march=armv8.3-a' \ @@ -198,6 +199,10 @@ used options are omitted): TARGET_STRIP=arm-linux-gnueabihf-strip TARGET_NM=arm-linux-gnueabihf-nm \ TARGET_RANLIB=arm-linux-gnueabihf-ranlib LEX=flex +Note, that the autoconf 2.65 manual states that when using the --host argument +to configure, the --build argument should be specified as well. Not sending +--build, enters a compatibility mode that will be removed in the future. + Normally, for building a GRUB on amd64 with tools to run on amd64 to generate images to run on ARM, using your Linux distribution's packaged cross compiler, the following would suffice: @@ -209,13 +214,14 @@ version look at prerequisites. All tools not mentioned in this section under corresponding platform are not needed for the platform in question. - For build - 1. BUILD_CC= to gcc able to compile for build. This is used, for + 1. --build= to autoconf name of build. + 2. BUILD_CC= to gcc able to compile for build. This is used, for example, to compile build-gentrigtables which is then run to generate sin and cos tables. - 2. BUILD_CFLAGS= for C options for build. - 3. BUILD_CPPFLAGS= for C preprocessor options for build. - 4. BUILD_LDFLAGS= for linker options for build. - 5. BUILD_PKG_CONFIG= for pkg-config for build (optional). + 3. BUILD_CFLAGS= for C options for build. + 4. BUILD_CPPFLAGS= for C preprocessor options for build. + 5. BUILD_LDFLAGS= for linker options for build. + 6. BUILD_PKG_CONFIG= for pkg-config for build (optional). - For host 1. --host= to autoconf name of host. -- 2.27.0