diff options
author | Glenn Washburn <development@efficientek.com> | 2022-03-18 01:43:46 -0500 |
---|---|---|
committer | Daniel Kiper <daniel.kiper@oracle.com> | 2022-04-04 19:32:44 +0200 |
commit | 50ab32578b01a16b4f394cccbffdca6cc54e75dd (patch) | |
tree | 92eb4007815d5122ab99b651e81f72fc21caafa9 | |
parent | 2aa6717d57683d39158fef02872f254573cb8ccc (diff) | |
download | grub-50ab32578b01a16b4f394cccbffdca6cc54e75dd.tar.gz |
INSTALL: Add information on using --build when cross-compiling
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>
-rw-r--r-- | INSTALL | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -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. |