Message ID | 20200114180730.21802-1-bauerman@linux.ibm.com |
---|---|
State | Superseded |
Headers | show |
Series | Makefile: Search for distro-provided cross-compiler | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch master (d75e82dbfbb9443efeb3f9a5921ac23605aab469) |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot | success | Test snowpatch/job/snowpatch-skiboot on branch master |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco | success | Signed-off-by present |
On 15/1/20 5:07 am, Thiago Jung Bauermann wrote: > Search for powerpc64-linux-gcc in PATH and if not found, also search for > powerpc64-linux-gnu-gcc. The latter can be installed from official distro > packages by at least Debian, Fedora and Ubuntu. > > Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com> Tested-by: Andrew Donnellan <ajd@linux.ibm.com>
Andrew Donnellan <ajd@linux.ibm.com> writes: > On 15/1/20 5:07 am, Thiago Jung Bauermann wrote: >> Search for powerpc64-linux-gcc in PATH and if not found, also search for >> powerpc64-linux-gnu-gcc. The latter can be installed from official distro >> packages by at least Debian, Fedora and Ubuntu. >> >> Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> > Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com> > Tested-by: Andrew Donnellan <ajd@linux.ibm.com> Thanks!
Thiago Jung Bauermann's on January 15, 2020 4:07 am: > Search for powerpc64-linux-gcc in PATH and if not found, also search for > powerpc64-linux-gnu-gcc. The latter can be installed from official distro > packages by at least Debian, Fedora and Ubuntu. > > Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> > --- > Makefile | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Makefile b/Makefile > index f938a062..3b1f36a0 100644 > --- a/Makefile > +++ b/Makefile > @@ -16,8 +16,13 @@ ifdef CROSS_COMPILE > endif > ifneq ("$(ARCH)", "ppc64") > ifneq ("$(ARCH)", "ppc64le") > +ifneq ($(shell which powerpc64-linux-gcc 2> /dev/null),) > CROSS ?= powerpc64-linux- > endif > +ifneq ($(shell which powerpc64-linux-gnu-gcc 2> /dev/null),) > + CROSS ?= powerpc64-linux-gnu- > +endif > +endif > endif What's the chances you could also test powerpc64le-linux- ? LE compilers can nowadays build BE skiboot (and Linux), so I tend not to install the BE cross compiler. Thanks, Nick
Hello Nick, Nicholas Piggin <npiggin@gmail.com> writes: > Thiago Jung Bauermann's on January 15, 2020 4:07 am: >> Search for powerpc64-linux-gcc in PATH and if not found, also search for >> powerpc64-linux-gnu-gcc. The latter can be installed from official distro >> packages by at least Debian, Fedora and Ubuntu. >> >> Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> >> --- >> Makefile | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/Makefile b/Makefile >> index f938a062..3b1f36a0 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -16,8 +16,13 @@ ifdef CROSS_COMPILE >> endif >> ifneq ("$(ARCH)", "ppc64") >> ifneq ("$(ARCH)", "ppc64le") >> +ifneq ($(shell which powerpc64-linux-gcc 2> /dev/null),) >> CROSS ?= powerpc64-linux- >> endif >> +ifneq ($(shell which powerpc64-linux-gnu-gcc 2> /dev/null),) >> + CROSS ?= powerpc64-linux-gnu- >> +endif >> +endif >> endif > > What's the chances you could also test powerpc64le-linux- ? It's 100% > LE compilers can nowadays build BE skiboot (and Linux), so I tend not > to install the BE cross compiler. Good point. I just sent a v2 with that change.
diff --git a/Makefile b/Makefile index f938a062..3b1f36a0 100644 --- a/Makefile +++ b/Makefile @@ -16,8 +16,13 @@ ifdef CROSS_COMPILE endif ifneq ("$(ARCH)", "ppc64") ifneq ("$(ARCH)", "ppc64le") +ifneq ($(shell which powerpc64-linux-gcc 2> /dev/null),) CROSS ?= powerpc64-linux- endif +ifneq ($(shell which powerpc64-linux-gnu-gcc 2> /dev/null),) + CROSS ?= powerpc64-linux-gnu- +endif +endif endif #
Search for powerpc64-linux-gcc in PATH and if not found, also search for powerpc64-linux-gnu-gcc. The latter can be installed from official distro packages by at least Debian, Fedora and Ubuntu. Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> --- Makefile | 5 +++++ 1 file changed, 5 insertions(+)