From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jLmDL-0000V1-64 for mharc-grub-devel@gnu.org; Tue, 07 Apr 2020 07:16:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50164) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLmDH-0000U6-Fg for grub-devel@gnu.org; Tue, 07 Apr 2020 07:16:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLmDF-0001Ee-GZ for grub-devel@gnu.org; Tue, 07 Apr 2020 07:16:15 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:36180) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLmDF-0001EB-4X for grub-devel@gnu.org; Tue, 07 Apr 2020 07:16:13 -0400 Received: by mail-wm1-x343.google.com with SMTP id d202so1404279wmd.1 for ; Tue, 07 Apr 2020 04:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gW97Q53IkbydsG17ZnFCiy4Bl2BsIEK4qkX/ZaeRsZ4=; b=vPLdVCobf5dABpS1WsUbHzBX/m+1w+KiWvpE3YSFfZPpAO2Ui8s6RHxWZSrtnzcTfy FVjw6BYHQ54xPL6HttoNntj++tNfIIajiHX3N8iiDXw65iulo4L1UEfXj3o44Tli2yoY 4lIgSnf4UXkUKN9zZeEve/Fte5s0zhrfZjdHawi+rwp4W2dN42J1DNvK0gQ5FBwSJpc6 DSoV4DEZpyj6cIXvAVk5N/wi3fAY5JRIRZqd7acx4inJHxUPjR6GLgQc17448MMM5HGd e1oh1g+vMDOAs+CWFWpfg25Y62L6HEdiH/S1f9dVEyBXXu1JUYVCHFyw7xPC7RtHRRGS Pe2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=gW97Q53IkbydsG17ZnFCiy4Bl2BsIEK4qkX/ZaeRsZ4=; b=fDyTRt1RrBhRDkfbcX0wS4jexoUQ2TFIWF5PlFlRXnCJCNqQDrziSO2NJbZZpup9Cu Da24ZZ9TbV6qdnxPCk5LFKGUuGdaMeCrMrDI0pLNA+aSIXQu/MOEadO77ZyvSVU5wlyd VDo0MpOcWWJAncZUUtEhSb32y2KyXigLTvrLbN9UUDIkvwUPHRmmc8OyG59aLa115TSm 62u+nGdhEObMuKN3rUUlItFlMEe65eJ/WsndAnY9uYoW+bJzNf4h1zV+ySnnsIaTV5J5 hM70UKOFyJ6KGArcKF2vZOhDrN1y6CukKNu91UJu9reipb0jqw6IGMf2tpFZJuvAE8Sx 9sBw== X-Gm-Message-State: AGi0PuYV974JlgFHNKHiton5eYd1knEBaHusdfWfBUO5mvpD0dzD1hpA puGxXazCXzEL+No0DKbfphr10w== X-Google-Smtp-Source: APiQypICsTya4IhjT2tAAPGSP6tquHns189xKhFXPBg5P27SVFHgIF4lovKdMc0mDSvVlI6F8iA04A== X-Received: by 2002:a1c:2002:: with SMTP id g2mr1815902wmg.109.1586258171679; Tue, 07 Apr 2020 04:16:11 -0700 (PDT) Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id f187sm2062631wme.9.2020.04.07.04.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 04:16:11 -0700 (PDT) Date: Tue, 7 Apr 2020 12:16:09 +0100 From: Leif Lindholm To: Daniel Kiper Cc: grub-devel@gnu.org, eschwartz@archlinux.org, floppym@gentoo.org, javierm@redhat.com, olaf@aepfle.de, phcoder@gmail.com, pjones@redhat.com Subject: Re: [PATCH v2 3/4] INSTALL/configure: Update install doc and configure comment Message-ID: <20200407111609.GM14075@vanye> References: <20200403124503.12779-1-daniel.kiper@oracle.com> <20200403124503.12779-4-daniel.kiper@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200403124503.12779-4-daniel.kiper@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 11:16:17 -0000 On Fri, Apr 03, 2020 at 14:45:02 +0200, Daniel Kiper wrote: > ..to reflect the GRUB build reality in them. > > Additionally, fix ./configure command example formatting in INSTALL file. > > Signed-off-by: Daniel Kiper > --- > INSTALL | 51 +++++++++++++++++++++++++++------------------------ > configure.ac | 10 ++++++---- > 2 files changed, 33 insertions(+), 28 deletions(-) > > diff --git a/INSTALL b/INSTALL > index 8acb40902..d1b3bb60e 100644 > --- a/INSTALL > +++ b/INSTALL > @@ -160,12 +160,12 @@ 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 BUILD_CC=gcc BUILD_PKG_CONFIG=pkg-config --host=amd64-linux-gnu > -CC=amd64-linux-gnu-gcc CFLAGS="-g -O2" PKG_CONFIG=amd64-linux-gnu-pkg-config > ---target=arm --with-platform=uboot TARGET_CC=arm-elf-gcc > -TARGET_CFLAGS="-Os -march=armv6" TARGET_CCASFLAGS="-march=armv6" > -TARGET_OBJCOPY="arm-elf-objcopy" TARGET_STRIP="arm-elf-strip" > -TARGET_NM=arm-elf-nm TARGET_RANLIB=arm-elf-ranlib LEX=gflex > +./configure BUILD_CC=gcc BUILD_PKG_CONFIG=pkg-config --host=amd64-linux-gnu \ > + CC=amd64-linux-gnu-gcc CFLAGS="-g -O2" PKG_CONFIG=amd64-linux-gnu-pkg-config \ > + --target=arm --with-platform=uboot TARGET_CC=arm-elf-gcc \ > + TARGET_CFLAGS="-Os -march=armv6" TARGET_CCASFLAGS="-march=armv6" \ > + TARGET_OBJCOPY="arm-elf-objcopy" TARGET_STRIP="arm-elf-strip" \ > + TARGET_NM=arm-elf-nm TARGET_RANLIB=arm-elf-ranlib LEX=gflex So ... probably should have looked more properly at this round 1. If we are updating this guidance, should we bring it up to date as well? Now we have uefi support in u-boot, the "uboot" platform is the exception rather than the norm. It'd be better to specify --with-platform=efi. Secondly, these appear to be flags used when building GRUB for Raspberry Pi 1; -march-armv6 is quite outdated and could be dropped. (Although I guess it becomes more relevant when seen in combination with TARGET_CCASFLAGS.) Could we add a sentence here going (if switching to efi for the platform): "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: ./configure --target=arm-linux-gnueabihf --with-platform=efi" > > You need to use following options to specify tools and platforms. For minimum > version look at prerequisites. All tools not mentioned in this section under > @@ -182,28 +182,31 @@ corresponding platform are not needed for the platform in question. > > - For host > 1. --host= to autoconf name of host. > - 2. CC= for gcc able to compile for host > - 3. HOST_CFLAGS= for C options for host. > - 4. HOST_CPPFLAGS= for C preprocessor options for host. > - 5. HOST_LDFLAGS= for linker options for host. > - 6. PKG_CONFIG= for pkg-config for host (optional). > - 7. Libdevmapper if any must be in standard linker folders (-ldevmapper) (optional). > - 8. Libfuse if any must be in standard linker folders (-lfuse) (optional). > - 9. Libzfs if any must be in standard linker folders (-lzfs) (optional). > - 10. Liblzma if any must be in standard linker folders (-llzma) (optional). > + 2. CC= for gcc able to compile for host and target. But this is incorrect? Apart from where HOST == TARGET? And goes against the example updated above. Am I missing something? > + 3. CFLAGS= for C options for host and target. > + 4. HOST_CFLAGS= for C options for host. > + 5. HOST_CPPFLAGS= for C preprocessor options for host. > + 6. HOST_LDFLAGS= for linker options for host. > + 7. PKG_CONFIG= for pkg-config for host (optional). > + 8. Libdevmapper if any must be in standard linker folders (-ldevmapper) (optional). > + 9. Libfuse if any must be in standard linker folders (-lfuse) (optional). > + 10. Libzfs if any must be in standard linker folders (-lzfs) (optional). > + 11. Liblzma if any must be in standard linker folders (-llzma) (optional). > > - For target > 1. --target= to autoconf cpu name of target. > 2. --with-platform to choose firmware. > - 3. TARGET_CC= for gcc able to compile for target > - 4. TARGET_CFLAGS= for C options for target. > - 5. TARGET_CPPFLAGS= for C preprocessor options for target. > - 6. TARGET_CCASFLAGS= for assembler options for target. > - 7. TARGET_LDFLAGS= for linker options for target. > - 8. TARGET_OBJCOPY= for objcopy for target. > - 9. TARGET_STRIP= for strip for target. > - 10. TARGET_NM= for nm for target. > - 11. TARGET_RANLIB= for ranlib for target. > + 3. CC= for gcc able to compile for host and target. Same again. > + 4. CFLAGS= for C options for host and target. > + 5. TARGET_CC= for gcc able to compile for target. > + 6. TARGET_CFLAGS= for C options for target. > + 7. TARGET_CPPFLAGS= for C preprocessor options for target. > + 8. TARGET_CCASFLAGS= for assembler options for target. > + 9. TARGET_LDFLAGS= for linker options for target. > + 10. TARGET_OBJCOPY= for objcopy for target. > + 11. TARGET_STRIP= for strip for target. > + 12. TARGET_NM= for nm for target. > + 13. TARGET_RANLIB= for ranlib for target. > > - Additionally for emu, for host and target. > 1. SDL is looked for in standard linker directories (-lSDL) (optional) > diff --git a/configure.ac b/configure.ac > index fc74ee800..06bc4fb0c 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -26,10 +26,12 @@ dnl This is necessary because the target type in autoconf does not > dnl describe such a system very well. > dnl > dnl The current strategy is to use variables with no prefix (such as > -dnl CC, CFLAGS, etc.) for the host type, variables with prefix "BUILD_" > -dnl (such as BUILD_CC, BUILD_CFLAGS, etc.) for the build type and variables > -dnl with the prefix "TARGET_" (such as TARGET_CC, TARGET_CFLAGS, etc.) are > -dnl used for the target type. See INSTALL for full list of variables. > +dnl CC, CFLAGS, etc.) for the host and target type, variables with Same again. / Leif > +dnl prefix "BUILD_" (such as BUILD_CC, BUILD_CFLAGS, etc.) for the > +dnl build type, variables with prefix "HOST_" (such as HOST_CC, > +dnl HOST_CFLAGS, etc.) for the host type and variables with the prefix > +dnl "TARGET_" (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for > +dnl the target type. See INSTALL for full list of variables. > > AC_INIT([GRUB],[2.05],[bug-grub@gnu.org]) > > -- > 2.11.0 >