From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thompson, David" Subject: bug#24416: avr-gcc@5 is broken Date: Mon, 12 Sep 2016 11:29:11 -0400 Message-ID: References: <20160912084936.25713732@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjTBP-0002J3-Pv for bug-guix@gnu.org; Mon, 12 Sep 2016 11:30:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjTBL-0007Jg-12 for bug-guix@gnu.org; Mon, 12 Sep 2016 11:30:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjTBK-0007JY-T5 for bug-guix@gnu.org; Mon, 12 Sep 2016 11:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bjTBK-0004p4-JY for bug-guix@gnu.org; Mon, 12 Sep 2016 11:30:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20160912084936.25713732@scratchpost.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Danny Milosavljevic Cc: 24416@debbugs.gnu.org On Mon, Sep 12, 2016 at 2:49 AM, Danny Milosavljevic wrote: > As a workaround, > > CPPFLAGS +=3D -I${HOME}/.guix-profile/avr/include > LDFLAGS +=3D -L${HOME}/.guix-profile/avr/lib/avr5 -L${HOME}/.guix-profile= /avr/lib -B${HOME}/.guix-profile/avr/lib > > works with avr-gcc 5.3.0. Unfortunately I don't know enough about avr-gcc= to be able to permanently fix it. > > I fixed part of it (I made it so that atmega32u4 exists in the first plac= e) in master - but no idea what to do with the search path. > > I'm pretty sure that if it uses CROSS_CPATH it's incorrect because cross-= base has been changed from CROSS_CPATH to CROSS_C_INCLUDE_PATH, CROSS_CPLUS= _INCLUDE_PATH etc in order to suppress warnings. If CROSS_C_INCLUDE_PATH ov= errides CROSS_CPATH (does it?) then setting CROSS_CPATH like avr.scm does d= oes no good. > > I propose to change it to the following: > > diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm > index 9873477..1e5fd73 100644 > --- a/gnu/packages/avr.scm > +++ b/gnu/packages/avr.scm > @@ -59,9 +59,18 @@ > #t)))) > ((#:configure-flags flags) > `(delete "--disable-multilib" ,flags)))) > - (native-search-paths > + (native-search-paths > (list (search-path-specification > - (variable "CROSS_CPATH") > + (variable "CROSS_C_INCLUDE_PATH") > + (files '("avr/include"))) > + (search-path-specification > + (variable "CROSS_CPLUS_INCLUDE_PATH") > + (files '("avr/include"))) > + (search-path-specification > + (variable "CROSS_OBJC_INCLUDE_PATH") > + (files '("avr/include"))) > + (search-path-specification > + (variable "CROSS_OBJCPLUS_INCLUDE_PATH") > (files '("avr/include"))) > (search-path-specification > (variable "CROSS_LIBRARY_PATH") I don't know if this will have the intended effect and I cannot experiment with it right now. Could you test? The LDFLAGS above include the path to the device-specific object files (/avr5), but avr-gcc is supposed to be able to figure that out on its own using a "normal" library path, so I'm skeptical that simply changing the search paths for the package is enough. Thanks, - Dave