From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: [PATCH 2/5] gnu: Add avr-gcc. Date: Mon, 15 Aug 2016 13:59:36 +0200 Message-ID: <20160815135936.1d9ef779@scratchpost.org> References: <1460639824-9976-1-git-send-email-dthompson2@worcester.edu> <1460639824-9976-3-git-send-email-dthompson2@worcester.edu> <87y48gje6d.fsf@gnu.org> <87vb1sehb6.fsf@gnu.org> <20160809212257.404b88d9@scratchpost.org> <87a8glemzq.fsf@elephly.net> <20160810091511.22120e53@scratchpost.org> <874m6tdpsk.fsf@mdc-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZGYT-0005K7-PU for guix-devel@gnu.org; Mon, 15 Aug 2016 07:59:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZGYQ-0003Ei-MU for guix-devel@gnu.org; Mon, 15 Aug 2016 07:59:45 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:44252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZGYQ-0003Ed-Fi for guix-devel@gnu.org; Mon, 15 Aug 2016 07:59:42 -0400 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: "Thompson, David" Cc: guix-devel Hi, when I apply my patch and then modify my Makefile to also say: CPPFLAGS += -I${HOME}/.guix-profile/avr/include -L${HOME}/.guix-profile/avr/lib/avr5 -L${HOME}/.guix-profile/avr/lib -B${HOME}/.guix-profile/avr/lib CPPFLAGS += -I.. then for Arduino (after applying my patch) I still get: PluggableUSB.cpp:(.text._Z12PluggableUSBv+0xc): undefined reference to `__cxa_guard_acquire' PluggableUSB.cpp:(.text._Z12PluggableUSBv+0x2c): undefined reference to `__cxa_guard_release' This is because it uses (see ): PluggableUSB_& PluggableUSB() { static PluggableUSB_ obj; /* editor's note: uh oh!! */ return obj; } It works just fine (it also links fine; everything OK) when I change it to: static PluggableUSB_ obj; PluggableUSB_& PluggableUSB() { return obj; } Should that have worked as-is? Also, why is avr-gcc also setting native-search-paths (even though it's a cross compiler)? Doesn't seem to make a difference and is also rather strange... What does the search-paths form do? Does it set environment variables in the profile as well?