I'm forwrading a bugrepport from "Klaus S. Madsen" <[EMAIL PROTECTED]>
reported to the debiag bugtracking system. I've verified that the problem is
still in version 3.4.3:

When using avr-gcc to compile for TinyOS (a operating-system for
embedded devices), the nesc-compiler (used to compile TinyOS source code
with) needs an assember that allows the use of $ in identifiers. Normaly
nesc does this by calling avr-gcc with -B, specifying a path in which an
alternative "as" can be found. 

However, starting with avr-gcc-3.4.0, the -B option no longer causes
avr-gcc choose the alternative assembler.

Environment:
System: Linux mob 2.4.26 #2 Tue May 4 22:11:04 CEST 2004 i686 Mobile Intel(R) 
Pentium(R) 4 - M CPU 1.70GHz GenuineIntel GNU/Linux
Architecture: i686

        
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: avr-unknown-none
configured with: ./configure -v --enable-languages=c,c++ --prefix=/usr 
--infodir=/usr/share/info --mandir=/usr/share/man --enable-shared 
--with-as=/usr/avr/bin/as --with-gnu-as --with-ld=/usr/avr/bin/ld --with-gnu-ld 
--with-system-zlib --enable-long-long --enable-nls --without-included-gettext 
--disable-checking --build=i386-linux --host=i386-linux --target=avr

How-To-Repeat:
I took the command-line nesc uses to execute gcc with, and added -v to
it:

$ avr-gcc -B/home/ksm/bin/nesc//lib/ncc -mmcu=atmega128 -Os -Wall -Wshadow
-v -finline-limit=100000 -o /tmp/ccTQTkEq.o -c -fdollars-in-identifiers
build/btnode2_2/app.c
Reading specs from /usr/lib/gcc/avr/3.4.1/specs
Configured with: ./configure -v --enable-languages=c,c++ --prefix=/usr
--infodir=/usr/share/info --mandir=/usr/share/man --enable-shared
--with-as=/usr/avr/bin/as --with-gnu-as --with-ld=/usr/avr/bin/ld
--with-gnu-ld --with-system-zlib --enable-long-long --enable-nls
--without-included-gettext --disable-checking --build=i386-linux
--host=i386-linux --target=avr
Thread model: single
gcc version 3.4.1
 /usr/libexec/gcc/avr/3.4.1/cc1 -quiet -v -isystem
/home/ksm/bin/nesc//lib/ncc/include build/btnode2_2/app.c -quiet -dumpbase
app.c -mmcu=atmega128 -auxbase-strip /tmp/ccTQTkEq.o -Os -Wall -Wshadow
-version -finline-limit=100000 -fdollars-in-identifiers -o /tmp/ccPKLSnd.s
ignoring nonexistent directory "/home/ksm/bin/nesc//lib/ncc/include"
ignoring nonexistent directory
"/usr/lib/gcc/avr/3.4.1/../../../../avr/sys-include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/avr/3.4.1/include
 /usr/lib/gcc/avr/3.4.1/../../../../avr/include
End of search list.
GNU C version 3.4.1 (avr)
        compiled by GNU C version 3.3.4 (Debian 1:3.3.4-3).
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=32004
/usr/avr/bin/as -mmcu=atmega128 -o /tmp/ccTQTkEq.o /tmp/ccPKLSnd.s
(error messages snipped)
$ ls /home/ksm/bin/nesc/lib/ncc/avr/3.4.1/
as

However if I rename the "as" in /usr/avr/bin, gcc will use the as in
/home/ksm/bin/nesc/lib/ncc/avr/3.4.1, and everything works fine.

-- 
           Summary: Wrong path search order for avr-gcc when -B is given
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hakan at ardoe dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-pc-linux-gnu
  GCC host triplet: i386-pc-linux-gnu
GCC target triplet: avr-unknown-none


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19157

Reply via email to