Skip to contentSkip to conversation

RFC: SDK/external-toolchain fixes

DISCUSSION Denys Dmytriyenko 3 participants 12 messages Sep 11, 2008 – Sep 23, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

I've been playing with OE's SDK and external-toolchain features lately and stumbled upon couple of issues. Thanks to Philip Balister for commiting trivial fixes in, now I have 2 more, which require wider review. Please let me know of any problems or comments. Thanks.

#1 gcc-cross-sdk 4.3.1 missing include-fixed
http://bugs.openembedded.net/show_bug.cgi?id=4536

gcc 4.3.x has some GCC-provided headers in include-fixed (namely limits.h), which are missing in the gcc-cross-sdk version, rendering external toolchain unusable.

Provided patch copies them in the include directory as a temporary solution. A similar temporary solution is present in gcc-cross_4.3.1, see do_stage_append()

#2 external-toolchain misses providing runtime libgcc
http://bugs.openembedded.net/show_bug.cgi?id=4542

Since external-toolchain misses specifying libgcc as provided runtime library, dependency tree picks up either gcc-cross or even gcc-noemu...

Attached patch fixes the problem.

Signature · 1 line
Denys
#1 lore raw
Quoted 8 lines · Denys Dmytriyenko

Hi,

I've been playing with OE's SDK and external-toolchain features lately and stumbled upon couple of issues. Thanks to Philip Balister for commiting trivial fixes in, now I have 2 more, which require wider review. Please let me know of any problems or comments. Thanks.

Quoted 6 lines

#1 gcc-cross-sdk 4.3.1 missing include-fixed
http://bugs.openembedded.net/show_bug.cgi?id=4536

gcc 4.3.x has some GCC-provided headers in include-fixed (namely limits.h), which are missing in the gcc-cross-sdk version, rendering external toolchain unusable.

I do not like this fix. IMO Instead of copying them into include directory they should be let alone in include-fixed directory and packaged. You should add knowledge of this new directory to the failing package instead. What packages are broken because of this.

Quoted 11 lines

Provided patch copies them in the include directory as a temporary solution. A similar temporary solution is present in gcc-cross_4.3.1, see do_stage_append()

#2 external-toolchain misses providing runtime libgcc
http://bugs.openembedded.net/show_bug.cgi?id=4542

Since external-toolchain misses specifying libgcc as provided runtime library, dependency tree picks up either gcc-cross or even gcc-noemu...

This one seems ok to me.

Quoted 11 lines

Attached patch fixes the problem.

Signature · 6 lines
Denys

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
#2 lore raw

First of all, thanks for your review.

Quoted 5 lines · Khem Raj
Quoted 4 lines · Denys Dmytriyenko

#1 gcc-cross-sdk 4.3.1 missing include-fixed
http://bugs.openembedded.net/show_bug.cgi?id=4536

Quoted 8 lines
Quoted 3 lines

gcc 4.3.x has some GCC-provided headers in include-fixed (namely limits.h), which are missing in the gcc-cross-sdk version, rendering external toolchain unusable.

I do not like this fix. IMO Instead of copying them into include directory they should be let alone in include-fixed directory and packaged. You should add knowledge of this new directory to the failing package instead. What packages are broken because of this.

I agree that this is not a proper fix, but rather a hack. glibc has its own limits.h, which wants to include gcc's limits.h like this:

/* Get the compiler's limits.h, which defines almost all the ISO constants.
We put this #include_next outside the double inclusion check because it should be possible to include this file more than once and still get the definitions from gcc's header. */
#if defined __GNUC__ && !defined _GCC_LIMITS_H_
/* `_GCC_LIMITS_H_' is what GCC's file defines. */

# include_next <limits.h>
#endif

This issue was brought up before, but as far as I can tell, it wasn't fixed properly.
This is initial Koen's post about the issue:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005108.html
And here is your own reply with one of the possible solutions:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005111.html

Here is how it's "solved" (i.e. worked around) in gcc-cross_4.3.1.bb (4.3.2):

# Hack till we fix *libc properly

do_stage_append() {
        ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
}

I'd love to see it fixed properly, but for now I'm trying to bring gcc-cross-sdk on par with gcc-cross.

Quoted 5 lines
Quoted 5 lines

Provided patch copies them in the include directory as a temporary solution. A similar temporary solution is present in gcc-cross_4.3.1, see do_stage_append()

Quoted 7 lines
Quoted 5 lines

#2 external-toolchain misses providing runtime libgcc
http://bugs.openembedded.net/show_bug.cgi?id=4542

Since external-toolchain misses specifying libgcc as provided runtime library, dependency tree picks up either gcc-cross or even gcc-noemu...

This one seems ok to me.

Thanks! Whom should I ping to get it commited?

Signature · 1 line
Denys
#3 lore raw
Quoted 29 lines · Denys Dmytriyenko

First of all, thanks for your review.

Quoted 5 lines · Khem Raj
Quoted 4 lines · Denys Dmytriyenko

#1 gcc-cross-sdk 4.3.1 missing include-fixed
http://bugs.openembedded.net/show_bug.cgi?id=4536

Quoted 8 lines
Quoted 3 lines

gcc 4.3.x has some GCC-provided headers in include-fixed (namely limits.h), which are missing in the gcc-cross-sdk version, rendering external toolchain unusable.

I do not like this fix. IMO Instead of copying them into include directory they should be let alone in include-fixed directory and packaged. You should add knowledge of this new directory to the failing package instead. What packages are broken because of this.

I agree that this is not a proper fix, but rather a hack. glibc has its own limits.h, which wants to include gcc's limits.h like this:

/* Get the compiler's limits.h, which defines almost all the ISO constants.
We put this #include_next outside the double inclusion check because it should be possible to include this file more than once and still get the definitions from gcc's header. */
#if defined __GNUC__ && !defined _GCC_LIMITS_H_
/* `_GCC_LIMITS_H_' is what GCC's file defines. */

# include_next <limits.h>
#endif
Quoted 7 lines

This issue was brought up before, but as far as I can tell, it wasn't fixed properly.
This is initial Koen's post about the issue:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005108.html
And here is your own reply with one of the possible solutions:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005111.html

right. So can you try this patch and see if this fixes the problem ?

Quoted 18 lines

Here is how it's "solved" (i.e. worked around) in gcc-cross_4.3.1.bb (4.3.2):

# Hack till we fix *libc properly

do_stage_append() {
        ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
}

I'd love to see it fixed properly, but for now I'm trying to bring gcc-cross-sdk on par with gcc-cross.

Quoted 8 lines
Quoted 8 lines

Provided patch copies them in the include directory as a temporary solution. A similar temporary solution is present in gcc-cross_4.3.1, see do_stage_append()

#2 external-toolchain misses providing runtime libgcc
http://bugs.openembedded.net/show_bug.cgi?id=4542

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Since external-toolchain misses specifying libgcc as provided runtime library, dependency tree picks up either gcc-cross or even gcc-noemu...

This one seems ok to me.

Thanks! Whom should I ping to get it commited?

I can do it.

Quoted 8 lines
Signature · 7 lines
-- 
Denys

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
#4 lore raw
Quoted 15 lines · Khem Raj
Quoted 15 lines
Quoted 11 lines
Quoted 6 lines

#1 gcc-cross-sdk 4.3.1 missing include-fixed
http://bugs.openembedded.net/show_bug.cgi?id=4536

gcc 4.3.x has some GCC-provided headers in include-fixed (namely limits.h), which are missing in the gcc-cross-sdk version, rendering external toolchain unusable.

I do not like this fix. IMO Instead of copying them into include directory they should be let alone in include-fixed directory and packaged. You should add knowledge of this new directory to the failing package instead. What packages are broken because of this.

I agree that this is not a proper fix, but rather a hack. glibc has its own limits.h, which wants to include gcc's limits.h like this:

Quoted 8 lines
Quoted 6 lines

This issue was brought up before, but as far as I can tell, it wasn't fixed properly.
This is initial Koen's post about the issue:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005108.html
And here is your own reply with one of the possible solutions:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005111.html

right. So can you try this patch and see if this fixes the problem ?

Let me try it. The thing is it's for glibc only, I guess.

Quoted 11 lines
Quoted 9 lines
Quoted 7 lines
Quoted 5 lines

#2 external-toolchain misses providing runtime libgcc
http://bugs.openembedded.net/show_bug.cgi?id=4542

Since external-toolchain misses specifying libgcc as provided runtime library, dependency tree picks up either gcc-cross or even gcc-noemu...

This one seems ok to me.

Thanks! Whom should I ping to get it commited?

I can do it.

That would be great. Thanks.

Signature · 1 line
Denys
#5 lore raw
In reply to Khem Raj
Quoted 55 lines · Khem Raj
Quoted 26 lines · Denys Dmytriyenko

First of all, thanks for your review.

Quoted 11 lines · Khem Raj
Quoted 6 lines · Denys Dmytriyenko

#1 gcc-cross-sdk 4.3.1 missing include-fixed
http://bugs.openembedded.net/show_bug.cgi?id=4536

gcc 4.3.x has some GCC-provided headers in include-fixed (namely limits.h), which are missing in the gcc-cross-sdk version, rendering external toolchain unusable.

I do not like this fix. IMO Instead of copying them into include directory they should be let alone in include-fixed directory and packaged. You should add knowledge of this new directory to the failing package instead. What packages are broken because of this.

I agree that this is not a proper fix, but rather a hack. glibc has its own limits.h, which wants to include gcc's limits.h like this:

/* Get the compiler's limits.h, which defines almost all the ISO constants.
We put this #include_next outside the double inclusion check because it should be possible to include this file more than once and still get the definitions from gcc's header. */
#if defined __GNUC__&& !defined _GCC_LIMITS_H_
/* `_GCC_LIMITS_H_' is what GCC's file defines. */
# include_next<limits.h>
#endif

Quoted 7 lines

This issue was brought up before, but as far as I can tell, it wasn't fixed properly.
This is initial Koen's post about the issue:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005108.html
And here is your own reply with one of the possible solutions:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005111.html

right. So can you try this patch and see if this fixes the problem ?

Quoted 18 lines

Here is how it's "solved" (i.e. worked around) in gcc-cross_4.3.1.bb (4.3.2):

# Hack till we fix *libc properly

do_stage_append() {
         ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
}

I'd love to see it fixed properly, but for now I'm trying to bring gcc-cross-sdk on par with gcc-cross.

Quoted 8 lines
Quoted 8 lines

Provided patch copies them in the include directory as a temporary solution. A similar temporary solution is present in gcc-cross_4.3.1, see do_stage_append()

#2 external-toolchain misses providing runtime libgcc
http://bugs.openembedded.net/show_bug.cgi?id=4542

Quoted 6 lines
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines

Since external-toolchain misses specifying libgcc as provided runtime library, dependency tree picks up either gcc-cross or even gcc-noemu...

This one seems ok to me.

Thanks! Whom should I ping to get it commited?

I can do it.

gcc_4.3.x.bb also needs a fix since I get all kinds of limits.h related errors when trying to do native compilation on the beagle.

regards,

Koen

#6 lore raw
Quoted 58 lines · Koen Kooi
Quoted 57 lines · Khem Raj
Quoted 26 lines · Denys Dmytriyenko

First of all, thanks for your review.

Quoted 11 lines · Khem Raj
Quoted 6 lines · Denys Dmytriyenko

#1 gcc-cross-sdk 4.3.1 missing include-fixed
http://bugs.openembedded.net/show_bug.cgi?id=4536

gcc 4.3.x has some GCC-provided headers in include-fixed (namely limits.h), which are missing in the gcc-cross-sdk version, rendering external toolchain unusable.

I do not like this fix. IMO Instead of copying them into include directory they should be let alone in include-fixed directory and packaged. You should add knowledge of this new directory to the failing package instead. What packages are broken because of this.

I agree that this is not a proper fix, but rather a hack. glibc has its own limits.h, which wants to include gcc's limits.h like this:

/* Get the compiler's limits.h, which defines almost all the ISO constants.
We put this #include_next outside the double inclusion check because it should be possible to include this file more than once and still get the definitions from gcc's header. */
#if defined __GNUC__&& !defined _GCC_LIMITS_H_
/* `_GCC_LIMITS_H_' is what GCC's file defines. */
# include_next<limits.h>
#endif

Quoted 7 lines

This issue was brought up before, but as far as I can tell, it wasn't fixed properly.
This is initial Koen's post about the issue:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005108.html
And here is your own reply with one of the possible solutions:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005111.html

right. So can you try this patch and see if this fixes the problem ?

Quoted 20 lines

Here is how it's "solved" (i.e. worked around) in gcc-cross_4.3.1.bb (4.3.2):

# Hack till we fix *libc properly

do_stage_append() {
         ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
}

I'd love to see it fixed properly, but for now I'm trying to bring gcc-cross-sdk on par with gcc-cross.

Quoted 10 lines
Quoted 10 lines

Provided patch copies them in the include directory as a temporary solution. A similar temporary solution is present in gcc-cross_4.3.1, see do_stage_append()

#2 external-toolchain misses providing runtime libgcc
http://bugs.openembedded.net/show_bug.cgi?id=4542

Since external-toolchain misses specifying libgcc as provided runtime library, dependency tree picks up either gcc-cross or even gcc-noemu...

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Quoted 1 line

This one seems ok to me.

Thanks! Whom should I ping to get it commited?

I can do it.

gcc_4.3.x.bb also needs a fix since I get all kinds of limits.h related , errors when trying to do native compilation on the beagle.

I only did cross build/testing no target gcc stuff so I did not see this problem thus far.
I thought gcc driver should have added include-fixed to default search paths for includes unless you disable it to do so like glibc does in such a case the application should add it to include search paths manually.

If you can give more details about this failure on native build. I could try to dig more.

Thanks
-Khem

Quoted 10 lines

regards,

Koen

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#7 lore raw
Quoted 9 lines · Khem Raj
Quoted 2 lines · Koen Kooi

gcc_4.3.x.bb also needs a fix since I get all kinds of limits.h related , errors when trying to do native compilation on the beagle.

I only did cross build/testing no target gcc stuff so I did not see this problem thus far.
I thought gcc driver should have added include-fixed to default search paths for includes unless you disable it to do so like glibc does in such a case the application should add it to include search paths manually.

If you can give more details about this failure on native build. I could try to dig more.

I'll post some logs when IBC is over.

regards,

Koen

#8 lore raw
In reply to Khem Raj
Quoted 18 lines · Khem Raj
Quoted 18 lines
Quoted 18 lines
Quoted 17 lines
Quoted 7 lines
Quoted 3 lines

gcc 4.3.x has some GCC-provided headers in include-fixed (namely limits.h), which are missing in the gcc-cross-sdk version, rendering external toolchain unusable.

I do not like this fix. IMO Instead of copying them into include directory they should be let alone in include-fixed directory and packaged. You should add knowledge of this new directory to the failing package instead. What packages are broken because of this.

I agree that this is not a proper fix, but rather a hack. glibc has its own limits.h, which wants to include gcc's limits.h like this:

This issue was brought up before, but as far as I can tell, it wasn't fixed properly.
This is initial Koen's post about the issue:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005108.html
And here is your own reply with one of the possible solutions:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005111.html

Quoted 6 lines
Quoted 1 line
Quoted 1 line

right. So can you try this patch and see if this fixes the problem ?

I only did cross build/testing no target gcc stuff so I did not see this problem thus far.
I thought gcc driver should have added include-fixed to default search paths for includes unless you disable it to do so like glibc does in such a case the application should add it to include search paths manually.

If you can give more details about this failure on native build. I could try to dig more.

The proper fix seems to work fine. Thanks for applying the patch.

Signature · 1 line
Denys
#9 lore raw

Khem,

Quoted 11 lines · Denys Dmytriyenko
Quoted 10 lines · Khem Raj
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines

I agree that this is not a proper fix, but rather a hack. glibc has its own limits.h, which wants to include gcc's limits.h like this:

This issue was brought up before, but as far as I can tell, it wasn't fixed properly.
This is initial Koen's post about the issue:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005108.html
And here is your own reply with one of the possible solutions:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005111.html

Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

right. So can you try this patch and see if this fixes the problem ?

The proper fix seems to work fine. Thanks for applying the patch.

I see most of gcc-cross* recipes been cleaned removing the hack mentioned above, but there are few more, mostly CodeSourcery ones. The patch for those is in the ticket #4560:

http://bugs.openembedded.net/show_bug.cgi?id=4560

Signature · 1 line
Denys
#10 lore raw
Quoted 16 lines · Denys Dmytriyenko

Khem,

Quoted 13 lines · Denys Dmytriyenko
Quoted 11 lines · Khem Raj
Quoted 11 lines
Quoted 11 lines
Quoted 9 lines

I agree that this is not a proper fix, but rather a hack. glibc has its own limits.h, which wants to include gcc's limits.h like this:

This issue was brought up before, but as far as I can tell, it wasn't fixed properly.
This is initial Koen's post about the issue:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005108.html
And here is your own reply with one of the possible solutions:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005111.html

right. So can you try this patch and see if this fixes the problem ?

Quoted 7 lines
Quoted 1 line

The proper fix seems to work fine. Thanks for applying the patch.

I see most of gcc-cross* recipes been cleaned removing the hack mentioned above, but there are few more, mostly CodeSourcery ones. The patch for those is in the ticket #4560:

http://bugs.openembedded.net/show_bug.cgi?id=4560

Any updates for this item? Please let me know if the patch needs more work. Thanks.

Signature · 1 line
Denys
#11 lore raw

I have no problems with this patch.

-Khem

Quoted 36 lines · Denys Dmytriyenko
Quoted 16 lines · Denys Dmytriyenko

Khem,

Quoted 13 lines · Denys Dmytriyenko
Quoted 11 lines · Khem Raj
Quoted 11 lines
Quoted 11 lines
Quoted 9 lines

I agree that this is not a proper fix, but rather a hack. glibc has its own limits.h, which wants to include gcc's limits.h like this:

This issue was brought up before, but as far as I can tell, it wasn't fixed properly.
This is initial Koen's post about the issue:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005108.html
And here is your own reply with one of the possible solutions:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2008-April/005111.html

right. So can you try this patch and see if this fixes the problem ?

Quoted 7 lines
Quoted 1 line

The proper fix seems to work fine. Thanks for applying the patch.

I see most of gcc-cross* recipes been cleaned removing the hack mentioned above, but there are few more, mostly CodeSourcery ones. The patch for those is in the ticket #4560:

http://bugs.openembedded.net/show_bug.cgi?id=4560

Any updates for this item? Please let me know if the patch needs more work. Thanks.

--
Denys

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel