* [Jethro] Can't compile gcc-cross when gcc-6 is the host compiler
@ 2016-08-11 12:40 Jérémy Rosen
2016-08-11 19:38 ` Burton, Ross
2016-08-11 19:49 ` Khem Raj
0 siblings, 2 replies; 6+ messages in thread
From: Jérémy Rosen @ 2016-08-11 12:40 UTC (permalink / raw)
To: openembeded-devel
Hello everybody
I am working on a jethro-based project on my Debian/testing machine, and
debian just migrated it's default gcc from gcc-5 to gcc-6
As expected, this caused all sort of errors in my build, starting by
pkgconfig-native not being compilable anymore (new gcc warnings coupled
with -Werror)
That's OK. I don't expect jethro to support future compilers out of the
box so I installed gcc-5 in parallel to gcc-6 while keeping gcc-6 as the
default compiler.
I then set the following variables in local.conf
#gcc-5
export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc-5 ${BUILD_CC_ARCH}"
export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++-5 ${BUILD_CC_ARCH}"
export BUILD_FC = "${CCACHE}${BUILD_PREFIX}gfortran-5 ${BUILD_CC_ARCH}"
export BUILD_CPP = "${BUILD_PREFIX}gcc-5 ${BUILD_CC_ARCH} -E"
export BUILD_LD = "${BUILD_PREFIX}ld ${BUILD_LD_ARCH}"
export BUILD_CCLD = "${BUILD_PREFIX}gcc-5 ${BUILD_CC_ARCH}"
export BUILD_AR = "${BUILD_PREFIX}gcc-ar-5"
export BUILD_AS = "${BUILD_PREFIX}as ${BUILD_AS_ARCH}"
export BUILD_RANLIB = "${BUILD_PREFIX}gcc-ranlib-5"
export BUILD_STRIP = "${BUILD_PREFIX}strip"
export BUILD_NM = "${BUILD_PREFIX}gcc-nm-5"
This helped, and allowed me to go much further in my build, but the
recipe gcc-cross-arm still failed. To be able to compile my build I had
to add the following to my local.conf
CC_pn-gcc-cross-arm= "${BUILD_CC}"
CXX_pn-gcc-cross-arm= "${BUILD_CXX}"
CC_pn-gcc-crosssdk-x86_64= "${BUILD_CC}"
CXX_pn-gcc-crosssdk-x86_64= "${BUILD_CXX}"
So apparently, gcc still has some reference to $CC and $CXX hardcoded
somewhere (I think it's in do_configure)
It seems to set $CC in the do_compile correctly, but not in
do_configure. And it never sets $CXX
I tried to understand what the GCC recipe was doing wrong, but I
couldn't find out on first look and it's a really complicated recipe
I hope this is enough clues to allow someone more knowledgeable to
create a proper fix...
Regards
Jeremy Rosen
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Jethro] Can't compile gcc-cross when gcc-6 is the host compiler
2016-08-11 12:40 [Jethro] Can't compile gcc-cross when gcc-6 is the host compiler Jérémy Rosen
@ 2016-08-11 19:38 ` Burton, Ross
2016-08-12 13:38 ` Jérémy Rosen
2016-08-11 19:49 ` Khem Raj
1 sibling, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2016-08-11 19:38 UTC (permalink / raw)
To: OpenEmbedded Devel List
On 11 August 2016 at 13:40, Jérémy Rosen <jeremy.rosen@smile.fr> wrote:
> This helped, and allowed me to go much further in my build, but the recipe
> gcc-cross-arm still failed. To be able to compile my build I had to add the
> following to my local.conf
>
> CC_pn-gcc-cross-arm= "${BUILD_CC}"
> CXX_pn-gcc-cross-arm= "${BUILD_CXX}"
> CC_pn-gcc-crosssdk-x86_64= "${BUILD_CC}"
> CXX_pn-gcc-crosssdk-x86_64= "${BUILD_CXX}"
>
>
> So apparently, gcc still has some reference to $CC and $CXX hardcoded
> somewhere (I think it's in do_configure)
>
> It seems to set $CC in the do_compile correctly, but not in do_configure.
> And it never sets $CXX
>
> I tried to understand what the GCC recipe was doing wrong, but I couldn't
> find out on first look and it's a really complicated recipe
>
Could you try adding a do_configure_prepend to gcc-cross.inc that sets
exports those (and extend the do_compile exports) to see if that solves it?
Ross
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Jethro] Can't compile gcc-cross when gcc-6 is the host compiler
2016-08-11 12:40 [Jethro] Can't compile gcc-cross when gcc-6 is the host compiler Jérémy Rosen
2016-08-11 19:38 ` Burton, Ross
@ 2016-08-11 19:49 ` Khem Raj
1 sibling, 0 replies; 6+ messages in thread
From: Khem Raj @ 2016-08-11 19:49 UTC (permalink / raw)
To: OpenEmbedded Devel List
[-- Attachment #1: Type: text/plain, Size: 2253 bytes --]
> On Aug 11, 2016, at 5:40 AM, Jérémy Rosen <jeremy.rosen@smile.fr> wrote:
>
> Hello everybody
>
> I am working on a jethro-based project on my Debian/testing machine, and debian just migrated it's default gcc from gcc-5 to gcc-6
>
> As expected, this caused all sort of errors in my build, starting by pkgconfig-native not being compilable anymore (new gcc warnings coupled with -Werror)
>
>
> That's OK. I don't expect jethro to support future compilers out of the box so I installed gcc-5 in parallel to gcc-6 while keeping gcc-6 as the default compiler.
>
> I then set the following variables in local.conf
>
> #gcc-5
> export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc-5 ${BUILD_CC_ARCH}"
> export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++-5 ${BUILD_CC_ARCH}"
> export BUILD_FC = "${CCACHE}${BUILD_PREFIX}gfortran-5 ${BUILD_CC_ARCH}"
> export BUILD_CPP = "${BUILD_PREFIX}gcc-5 ${BUILD_CC_ARCH} -E"
> export BUILD_LD = "${BUILD_PREFIX}ld ${BUILD_LD_ARCH}"
> export BUILD_CCLD = "${BUILD_PREFIX}gcc-5 ${BUILD_CC_ARCH}"
> export BUILD_AR = "${BUILD_PREFIX}gcc-ar-5"
> export BUILD_AS = "${BUILD_PREFIX}as ${BUILD_AS_ARCH}"
> export BUILD_RANLIB = "${BUILD_PREFIX}gcc-ranlib-5"
> export BUILD_STRIP = "${BUILD_PREFIX}strip"
> export BUILD_NM = "${BUILD_PREFIX}gcc-nm-5"
>
> This helped, and allowed me to go much further in my build, but the recipe gcc-cross-arm still failed. To be able to compile my build I had to add the following to my local.conf
>
> CC_pn-gcc-cross-arm= "${BUILD_CC}"
> CXX_pn-gcc-cross-arm= "${BUILD_CXX}"
> CC_pn-gcc-crosssdk-x86_64= "${BUILD_CC}"
> CXX_pn-gcc-crosssdk-x86_64= "${BUILD_CXX}"
>
>
> So apparently, gcc still has some reference to $CC and $CXX hardcoded somewhere (I think it's in do_configure)
>
> It seems to set $CC in the do_compile correctly, but not in do_configure. And it never sets $CXX
>
> I tried to understand what the GCC recipe was doing wrong, but I couldn't find out on first look and it's a really complicated recipe
>
>
> I hope this is enough clues to allow someone more knowledgeable to create a proper fix…
Just change the default gcc to gcc5 on your host. The host packages do not isolate compiler as well as target packages.
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Jethro] Can't compile gcc-cross when gcc-6 is the host compiler
2016-08-11 19:38 ` Burton, Ross
@ 2016-08-12 13:38 ` Jérémy Rosen
2016-08-12 16:37 ` Burton, Ross
2016-08-13 3:13 ` Khem Raj
0 siblings, 2 replies; 6+ messages in thread
From: Jérémy Rosen @ 2016-08-12 13:38 UTC (permalink / raw)
To: openembedded-devel
On 11/08/2016 21:38, Burton, Ross wrote:
> On 11 August 2016 at 13:40, Jérémy Rosen <jeremy.rosen@smile.fr> wrote:
>
>> This helped, and allowed me to go much further in my build, but the recipe
>> gcc-cross-arm still failed. To be able to compile my build I had to add the
>> following to my local.conf
>>
>> CC_pn-gcc-cross-arm= "${BUILD_CC}"
>> CXX_pn-gcc-cross-arm= "${BUILD_CXX}"
>> CC_pn-gcc-crosssdk-x86_64= "${BUILD_CC}"
>> CXX_pn-gcc-crosssdk-x86_64= "${BUILD_CXX}"
>>
>>
>> So apparently, gcc still has some reference to $CC and $CXX hardcoded
>> somewhere (I think it's in do_configure)
>>
>> It seems to set $CC in the do_compile correctly, but not in do_configure.
>> And it never sets $CXX
>>
>> I tried to understand what the GCC recipe was doing wrong, but I couldn't
>> find out on first look and it's a really complicated recipe
>>
> Could you try adding a do_configure_prepend to gcc-cross.inc that sets
> exports those (and extend the do_compile exports) to see if that solves it?
I did the following
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc
b/meta/recipes-devtools/gcc/gcc-cross.inc
index aa10633..9a2e06f 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -36,8 +36,14 @@ EXTRA_OECONF_PATHS = "\
ARCH_FLAGS_FOR_TARGET +=
"-isystem${STAGING_DIR_TARGET}${target_includedir}"
+do_configure_prepend () {
+ export CC="${BUILD_CC}"
+ export CXX="${BUILD_CXX}"
+}
+
do_compile () {
export CC="${BUILD_CC}"
+ export CXX="${BUILD_CXX}"
export AR_FOR_TARGET="${TARGET_SYS}-ar"
export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
export LD_FOR_TARGET="${TARGET_SYS}-ld"
(which I think is what you meant) and it did indeed solve the problem.
> Ross
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Jethro] Can't compile gcc-cross when gcc-6 is the host compiler
2016-08-12 13:38 ` Jérémy Rosen
@ 2016-08-12 16:37 ` Burton, Ross
2016-08-13 3:13 ` Khem Raj
1 sibling, 0 replies; 6+ messages in thread
From: Burton, Ross @ 2016-08-12 16:37 UTC (permalink / raw)
To: OpenEmbedded Devel List
On 12 August 2016 at 14:38, Jérémy Rosen <jeremy.rosen@smile.fr> wrote:
> (which I think is what you meant) and it did indeed solve the problem.
>
Cool. If you can rebase this to master and submit it as a proper patch then
that would be much appreciated.
Ross
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Jethro] Can't compile gcc-cross when gcc-6 is the host compiler
2016-08-12 13:38 ` Jérémy Rosen
2016-08-12 16:37 ` Burton, Ross
@ 2016-08-13 3:13 ` Khem Raj
1 sibling, 0 replies; 6+ messages in thread
From: Khem Raj @ 2016-08-13 3:13 UTC (permalink / raw)
To: openembedded-devel
On 16-08-12 15:38:52, Jérémy Rosen wrote:
>
>
> On 11/08/2016 21:38, Burton, Ross wrote:
> >On 11 August 2016 at 13:40, Jérémy Rosen <jeremy.rosen@smile.fr> wrote:
> >
> >>This helped, and allowed me to go much further in my build, but the recipe
> >>gcc-cross-arm still failed. To be able to compile my build I had to add the
> >>following to my local.conf
> >>
> >>CC_pn-gcc-cross-arm= "${BUILD_CC}"
> >>CXX_pn-gcc-cross-arm= "${BUILD_CXX}"
> >>CC_pn-gcc-crosssdk-x86_64= "${BUILD_CC}"
> >>CXX_pn-gcc-crosssdk-x86_64= "${BUILD_CXX}"
> >>
> >>
> >>So apparently, gcc still has some reference to $CC and $CXX hardcoded
> >>somewhere (I think it's in do_configure)
> >>
> >>It seems to set $CC in the do_compile correctly, but not in do_configure.
> >>And it never sets $CXX
> >>
> >>I tried to understand what the GCC recipe was doing wrong, but I couldn't
> >>find out on first look and it's a really complicated recipe
> >>
> >Could you try adding a do_configure_prepend to gcc-cross.inc that sets
> >exports those (and extend the do_compile exports) to see if that solves it?
>
> I did the following
>
> diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc
> b/meta/recipes-devtools/gcc/gcc-cross.inc
> index aa10633..9a2e06f 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross.inc
> @@ -36,8 +36,14 @@ EXTRA_OECONF_PATHS = "\
>
> ARCH_FLAGS_FOR_TARGET +=
> "-isystem${STAGING_DIR_TARGET}${target_includedir}"
>
> +do_configure_prepend () {
> + export CC="${BUILD_CC}"
> + export CXX="${BUILD_CXX}"
> +}
> +
> do_compile () {
> export CC="${BUILD_CC}"
> + export CXX="${BUILD_CXX}"
> export AR_FOR_TARGET="${TARGET_SYS}-ar"
> export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
> export LD_FOR_TARGET="${TARGET_SYS}-ld"
>
>
> (which I think is what you meant) and it did indeed solve the problem.
this looks ok.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-08-13 3:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-11 12:40 [Jethro] Can't compile gcc-cross when gcc-6 is the host compiler Jérémy Rosen
2016-08-11 19:38 ` Burton, Ross
2016-08-12 13:38 ` Jérémy Rosen
2016-08-12 16:37 ` Burton, Ross
2016-08-13 3:13 ` Khem Raj
2016-08-11 19:49 ` Khem Raj
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.