* [PATCH] docs: Add information on using --build when cross-compiling
@ 2022-03-18 6:43 Glenn Washburn
2022-03-24 13:43 ` Daniel Kiper
0 siblings, 1 reply; 2+ messages in thread
From: Glenn Washburn @ 2022-03-18 6:43 UTC (permalink / raw)
To: Daniel Kiper, grub-devel; +Cc: Glenn Washburn
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] docs: Add information on using --build when cross-compiling
2022-03-18 6:43 [PATCH] docs: Add information on using --build when cross-compiling Glenn Washburn
@ 2022-03-24 13:43 ` Daniel Kiper
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Kiper @ 2022-03-24 13:43 UTC (permalink / raw)
To: Glenn Washburn; +Cc: grub-devel
On Fri, Mar 18, 2022 at 01:43:46AM -0500, Glenn Washburn wrote:
> 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>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Daniel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-24 13:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-18 6:43 [PATCH] docs: Add information on using --build when cross-compiling Glenn Washburn
2022-03-24 13:43 ` Daniel Kiper
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.