Message ID | 871u5zqfi9.fsf@Cadeux.fritz.box |
---|---|
State | New |
Headers | show |
2013/8/12 Nick Clifton <nickc@redhat.com>: > Hi Dennis, Hi Anatoly, Hi Eric, > > I have run into a small problem building GCC for an AVR Linux target - > glibc-c.o is not being built. It turns out that the section handling > "avr-*-*" in the config.gcc file is redefining tmake_file without > allowing for the fact that t-glibc has already been added to it. > > The patch below is the obvious fix for this problem, but I have not > committed it because it occurred to me that there might be some AVR > specific reason for not including t-glibc. I can't remember such reasons. > So - is the patch OK, or > is there some other way of fixing the problem ? > > Cheers > Nick > > gcc/ChangeLog > 2013-08-12 Nick Clifton <nickc@redhat.com> > > * config.gcc (avr-*-*): Allow for tmake_file not being empty. > > Index: gcc/config.gcc Please Apply. Denis.
On Mon, 12 Aug 2013, Nick Clifton wrote: > Hi Dennis, Hi Anatoly, Hi Eric, > > I have run into a small problem building GCC for an AVR Linux target - > glibc-c.o is not being built. It turns out that the section handling > "avr-*-*" in the config.gcc file is redefining tmake_file without > allowing for the fact that t-glibc has already been added to it. Your patch itself makes sense on general principles, but the concept of an AVR Linux target doesn't - this is an 8-bit processor.... Really, the bug you've found is that there's an avr-*-* case that is too general, matching nonsensical targets such as AVR Linux rather than just avr-*-none / avr-*-elf.
> -----Original Message----- > From: Joseph Myers [mailto:joseph@codesourcery.com] > Sent: Thursday, August 22, 2013 10:37 AM > To: Nick Clifton > Cc: chertykov@gmail.com; aesok@post.ru; Weddington, Eric; gcc- > patches@gcc.gnu.org > Subject: Re: RFA: AVR: Support building AVR Linux targets > > On Mon, 12 Aug 2013, Nick Clifton wrote: > > > Hi Dennis, Hi Anatoly, Hi Eric, > > > > I have run into a small problem building GCC for an AVR Linux > target - > > glibc-c.o is not being built. It turns out that the section > handling > > "avr-*-*" in the config.gcc file is redefining tmake_file without > > allowing for the fact that t-glibc has already been added to it. > > Your patch itself makes sense on general principles, but the concept of > an > AVR Linux target doesn't - this is an 8-bit processor.... Really, the > bug > you've found is that there's an avr-*-* case that is too general, > matching > nonsensical targets such as AVR Linux rather than just avr-*-none / > avr-*-elf. Thanks for pointing that out Joseph. Strangely, someone actually has run Linux on an AVR: http://dmitry.gr/index.php?r=05.Projects&proj=07.%20Linux%20on%208bit But only by running it on an ARM emulator running on the AVR. Eric
Hi Joseph, > Your patch itself makes sense on general principles, but the concept of an > AVR Linux target doesn't - this is an 8-bit processor.... Really, the bug > you've found is that there's an avr-*-* case that is too general, matching > nonsensical targets such as AVR Linux rather than just avr-*-none / > avr-*-elf. Fair enough. Would you like me to A. Apply the patch anyway. On the general principle that target specific sections in config.gcc add to tmake_file rather than override it. B. Do nothing. On the general principle that if it ain't broke don't fix it. C. Draw up another patch that restricts the AVR patterns in config.gcc to -none and -elf. Cheers Nick
On Fri, 23 Aug 2013, nick clifton wrote: > Hi Joseph, > > Your patch itself makes sense on general principles, but the concept of an > > AVR Linux target doesn't - this is an 8-bit processor.... Really, the bug > > you've found is that there's an avr-*-* case that is too general, matching > > nonsensical targets such as AVR Linux rather than just avr-*-none / > > avr-*-elf. > > Fair enough. Would you like me to > > A. Apply the patch anyway. On the general principle that target specific > sections in config.gcc add to tmake_file rather than override it. > > B. Do nothing. On the general principle that if it ain't broke don't fix > it. > > C. Draw up another patch that restricts the AVR patterns in config.gcc to > -none and -elf. A and C - I think both changes should be applied.
Index: gcc/config.gcc =================================================================== --- gcc/config.gcc (revision 201658) +++ gcc/config.gcc (working copy) @@ -1001,7 +1001,7 @@ tm_file="${tm_file} ${cpu_type}/avrlibc.h" tm_defines="${tm_defines} WITH_AVRLIBC" fi - tmake_file="avr/t-avr avr/t-multilib" + tmake_file="${tmake_file} avr/t-avr avr/t-multilib" use_gcc_stdint=wrap extra_gcc_objs="driver-avr.o avr-devices.o" extra_objs="avr-devices.o avr-log.o"