All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glenn Washburn <development@efficientek.com>
To: Daniel Kiper <dkiper@net-space.pl>, grub-devel@gnu.org
Cc: Glenn Washburn <development@efficientek.com>
Subject: [PATCH] docs: Add information on using --build when cross-compiling
Date: Fri, 18 Mar 2022 01:43:46 -0500	[thread overview]
Message-ID: <20220318064346.3525422-1-development@efficientek.com> (raw)

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 <development@efficientek.com>
---
 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



             reply	other threads:[~2022-03-18  6:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18  6:43 Glenn Washburn [this message]
2022-03-24 13:43 ` [PATCH] docs: Add information on using --build when cross-compiling Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220318064346.3525422-1-development@efficientek.com \
    --to=development@efficientek.com \
    --cc=dkiper@net-space.pl \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.