First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 99014
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Toolchain Maintainers <toolchain@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Ludek Stepan <ludek.stepan@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
toolchain.eclass.patch Patch for toolchain.eclass patch Ludek Stepan 2005-07-14 08:25 0000 563 bytes Details | Diff
crossdev-avr.patch crossdev improvements for g++ and version locking for AVR patch Gustavo Zacarias (RETIRED) 2005-07-14 11:41 0000 571 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 99014 depends on: Show dependency tree
Show dependency graph
Bug 99014 blocks: 99020
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-07-14 08:01 0000
/usr/portage/eclass/toolchain.eclass

GCC cannot cross-compile for language c++ with avr target because of bad .configure parameters gained prom toolchain.eclass. The bad parameter is --enable-threads=posix since avr-libc doesn't support threads.

Solution is to pass parameter --disable-threads to the .configure script for GCC in function gcc_do_configure (/usr/portage/eclass/toolchain.eclass). Then it compiles OK

Tested with gcc-3.4.4 and 4.0.1
Host platform is amd64

the PATCH for toolchain.eclass follows

--- backup/toolchain.eclass     2005-07-14 16:39:53.000000000 +0200
+++ /usr/portage/eclass/toolchain.eclass        2005-07-14 16:44:04.000000000 +0200
@@ -1088,6 +1088,8 @@
        # disable a bunch of features or gcc goes boom
        if is_crosscompile && [[ ${GCC_LANG} == "c" ]] ; then
                confgcc="${confgcc} --disable-shared --disable-threads --without-headers"
+       elif is_crosscompile && [[ ${CTARGET} == "avr" ]] ; then
+               confgcc="${confgcc} $(use_enable !static shared) --disable-threads"
        else
                confgcc="${confgcc} $(use_enable !static shared) --enable-threads=posix"
        fi

------- Comment #1 From Ludek Stepan 2005-07-14 08:25:13 0000 -------
Created an attachment (id=63400) [edit]
Patch for toolchain.eclass

------- Comment #2 From SpanKY 2005-07-14 08:57:50 0000 -------
can those who actually know something about avr review this :)

------- Comment #3 From Gustavo Zacarias (RETIRED) 2005-07-14 11:41:56 0000 -------
Created an attachment (id=63411) [edit]
crossdev improvements for g++ and version locking for AVR

The toolchain.eclass patch is sane and things build fine.
However we'll need to enable stage3 in crossdev for this to be useful, patch
attached.
I've also locked down versions of gcc to 3.4.4 (includes the extended device
support patches i added some time ago) and binutils 2.16.1 (known good).
gcc 4.0.0 had some issues with avr, dunno if 4.0.1 was fixed, i'll try this at
a later time.

------- Comment #4 From Ludek Stepan 2005-07-14 11:54:13 0000 -------
> However we'll need to enable stage3 in crossdev for this to be useful, patch
> attached.

yeah, see bug 99020

Thank You very much!
That's why I like gentoo so much :)

------- Comment #5 From Jeremy Huddleston 2005-07-14 12:05:46 0000 -------
Uhm... is the CTARGET really just 'avr'?  Should we do this for avr-*?

------- Comment #6 From Gustavo Zacarias (RETIRED) 2005-07-14 12:11:39 0000 -------
You can safely go avr-*, however you won't see linux or some other big
operating
system happening on one of these since they're 8-bit risc microcontrollers.

------- Comment #7 From Scott Price 2005-07-14 12:14:05 0000 -------
On the GCC site they specify that the target is just 'avr'.  The longer version
may or may not work.

Scott  =)

------- Comment #8 From Gustavo Zacarias (RETIRED) 2005-07-14 12:15:34 0000 -------
Hmmyeah, i meant avr* :)

------- Comment #9 From Ludek Stepan 2005-07-14 12:16:33 0000 -------
(In reply to comment #8)
> Hmmyeah, i meant avr* :)
> 

it should be just avr (see line 962)

------- Comment #10 From SpanKY 2005-07-14 15:58:16 0000 -------
yeah, 'normal' naming does not apply to avr targets ... i'll merge this patch
later tonight, thanks guys

------- Comment #11 From SpanKY 2005-07-14 20:09:17 0000 -------
added to toolchain.eclass, thanks all

------- Comment #12 From Ludek Stepan 2005-07-15 07:42:36 0000 -------
Thanks guy, it's nice to hear that gentoo has support for avr c++ compiler :)
Should I close the bug?

------- Comment #13 From SpanKY 2005-07-15 15:06:01 0000 -------
the bug is closed ...

First Last Prev Next    No search results available      Search page      Enter new bug