From: Romain Naour Date: Sat, 1 Sep 2018 21:20:36 +0200 Subject: [Buildroot] [for-next: 1/2] package/make: add host variant In-Reply-To: <20180901145103.63ea583b@windsurf> References: <20180830203054.7373-1-romain.naour@gmail.com> <20180901145103.63ea583b@windsurf> Message-ID: <0bf99c93-5726-9b67-cce0-d4f02549f83e@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hi Thomas, Le 01/09/2018 ? 14:51, Thomas Petazzoni a ?crit?: > Hello Romain, > > Thanks for your work on this topic! > > On Thu, 30 Aug 2018 22:30:53 +0200, Romain Naour wrote: > >> We have to ceate gnumake and gmake symlinks to make generated by >> Buildroot for the host. Otherwise the one provided by the host >> system can be used instead. >> >> The glibc build system is looking for gnumake and gmake before >> make. > > But the PATH environment variable that we use has $(HOST_DIR)/bin > before the system /usr/bin, and therefore our make in > $(HOST_DIR)/bin/make should be found/used by the glibc build system > instead of the system /usr/bin/make. > > Why isn't this working ? It is but glibc is looking at gnumake and gmake at first: From [1]: AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, [GNU Make[^0-9]*\([0-9][0-9.]*\)], [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") On your host (Fedora) you have a symlink to make named gmake (gmake -> make) You can verify that glibc is using gmake instead of make by looking at config.log. configure:4672: checking for gnumake configure:4702: result: no configure:4672: checking for gmake configure:4688: found /usr/bin/gmake configure:4699: result: gmake configure:4714: checking version of gmake configure:4724: result: 4.2.1, ok We can verify that glibc build-system is really using gmake: ac_cv_prog_MAKE=gmake So if we want glibc build system to use the make binary provided by Buildroot we must create gnumake and gmake symlink in $(HOST_DIR)/bin when installing host-make. Best regards, Romain [1] https://sourceware.org/git/?p=glibc.git;a=blob;f=configure.ac;h=014e09a5d58d102d208ddfaa192d844b1792d94f;hb=refs/heads/release/2.28/master#l952 > > Thanks, > > Thomas >