avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] New avr-gcc device specific specs are breaking the to


From: Senthil Kumar Selvaraj
Subject: Re: [avr-gcc-list] New avr-gcc device specific specs are breaking the toolchain
Date: Fri, 17 Oct 2014 16:10:56 +0530
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Oct 14, 2014 at 11:35:00AM +0200, Georg-Johann Lay wrote:
> Buildling / installing current avr-gcc from trunk, same for avr-libc, yields
> for any program:
> 
> INSTALL/lib/gcc/avr/5.0.0/../../../../avr/bin/ld: cannot find
> dev/atmega128/crt1.o: No such file or directory
> INSTALL/lib/gcc/avr/5.0.0/../../../../avr/bin/ld: cannot find
> dev/atmega128/libdev.a: No such file or directory
> collect2: error: ld returned 1 exit status
> 
> This is due to vendor specific changes to avr backend that use specs which
> make wrong assumptions on directory layout as supplied by avr-libc.
> 
> As it appears, GCC configury has no switch to factor this out (e.g. by
> making avr-gcc assume the classical layout) and avr-libc has not yet been
> adjusted to the new layout...
> 
> avr-libc has been configured against the new compiler , i.e.
> 
> GNU C (GCC) version 5.0.0 20141013 (experimental) (avr)
> 
> avr-libc is 2014-10-14 SVN r2452.
> 
> When can we expect the tools to be synchronized so that they can be use again?
> Or am I missing something?

No - you're right. The avr-libc changes will get in in a few weeks time
max.

Meanwhile, you can use the below (lightly tested) patch to temporarily
get going again. It adjusts the spec file generation logic to generate
the same linker args as before.

Regards
Senthil


diff --git gcc/config/avr/gen-avr-mmcu-specs.c 
gcc/config/avr/gen-avr-mmcu-specs.c
index 73bacf4..9667e70 100644
--- gcc/config/avr/gen-avr-mmcu-specs.c
+++ gcc/config/avr/gen-avr-mmcu-specs.c
@@ -106,9 +106,10 @@ print_mcu (const avr_mcu_t *mcu)
       && strncmp (mcu->name, "mmcu=attiny15", strlen ("mmcu=attiny15")) != 0
       && strncmp (mcu->name, "mmcu=attiny28", strlen ("mmcu=attiny28")) != 0)
     {
-      fprintf (f, "-lc");
-      if (mcu->macro)
-       fprintf (f, " dev/%s/libdev.a%%s", mcu->name);
+      fprintf (f, "-lm");
+      fprintf (f, " -lc");
+     // if (mcu->macro)
+       //fprintf (f, " dev/%s/libdev.a%%s", mcu->name);
     }
   fprintf (f, "\n\n");
 
@@ -121,7 +122,7 @@ print_mcu (const avr_mcu_t *mcu)
     fprintf (f, "-lgcc");
   fprintf (f, "\n\n");
 
-  fprintf (f, "*startfile:\ndev/%s/crt1.o%%s\n\n", mcu->name);
+  fprintf (f, "*startfile:\ncrt%s.o%%s\n\n", mcu->library_name);
 }
 
 int main (void)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]