From: "Thompson, David" <dthompson2@worcester.edu>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: avr-gcc
Date: Tue, 17 Nov 2015 22:53:31 -0500 [thread overview]
Message-ID: <CAJ=RwfYLkn7Oc3rVHp6Pf1HB8gK4cWA1NkShPttVQaZ_P59hKQ@mail.gmail.com> (raw)
In-Reply-To: <87twoks459.fsf@gnu.org>
On Tue, Nov 17, 2015 at 4:32 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> Microscheme 0.9.2, (C) Ryan Suchocki
>>>> Treeshaker: After 4 rounds: 87 globals purged! 22 bytes will be reserved.
>>>> 18 lines compiled OK
>>>> Assembling...
>> avr-ld: cannot find crtm328p.o: No such file or directory
>> avr-ld: cannot find -lm
>> avr-ld: cannot find -lc
>
> In GCC we modify the spec file so that the right -L/libc/dir/name is
> passed to ld; see (gnu packages gcc), ‘GNU_USER_TARGET_LIB_SPEC’.
>
> However, ‘gcc-cross-sans-libc-avr’ is a bare-bones compiler, so it
> doesn’t get the -L flag in question since there’s no libc to link to.
>
> To get a full-blow compiler that uses avr-libc, you could start from
> this:
>
>
>
> … and then address any glibc assumptions you encounter.
I tried to do this, but I don't really know what I'm doing. The first
problem I encountered was that I needed to add a case to the
'glibc-dynamic-linker' procedure in (gnu packages bootstrap). I
didn't know what ld was needed, if any, so I added this case:
((string=? system "avr-avrlibc") "no-ld.so")
Then, the issue was that avr-libc doesn't have a propagated input with
the label "linux-headers", as required by 'cross-gcc' in (gnu packages
cross-base). So, as a hack I tried something like this:
(if (string=? "avr-libc" (package-name libc))
`()
`(("xlinux-headers" ;the target headers
,@(assoc-ref (package-propagated-inputs libc)
"linux-headers"))))
Now I was able to get the build process to start, but it failed when
trying to compile binutils:
checking target system type... Invalid configuration
`avr-linux-avrlibc': system `avrlibc' not recognized
I'm totally lost. Any thoughts on where to go next?
BTW, I believe this native search path is needed in order for the AVR
header files to be found:
(search-path-specification
(variable "C_INCLUDE_PATH")
(files '("avr/include")))
Hopefully I'll be able to play with my Atmel microcontrollers again
real soon. :)
- Dave
next prev parent reply other threads:[~2015-11-18 3:53 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 15:25 avr-gcc Ricardo Wurmus
2015-11-17 15:59 ` avr-gcc Ricardo Wurmus
2015-11-17 21:32 ` avr-gcc Ludovic Courtès
2015-11-18 3:53 ` Thompson, David [this message]
2015-11-18 11:03 ` avr-gcc Ludovic Courtès
2015-11-19 1:54 ` avr-gcc Thompson, David
2015-11-20 14:20 ` avr-gcc Ludovic Courtès
2016-04-12 18:21 ` avr-gcc Thompson, David
2016-04-12 20:14 ` avr-gcc Thompson, David
2016-04-13 20:42 ` avr-gcc Ludovic Courtès
2016-04-14 5:47 ` avr-gcc Jan Nieuwenhuizen
2016-04-14 16:47 ` avr-gcc Ludovic Courtès
2016-04-15 8:09 ` avr-gcc Jan Nieuwenhuizen
2016-04-15 9:01 ` avr-gcc Andy Wingo
2016-04-15 12:44 ` avr-gcc Jan Nieuwenhuizen
2016-04-15 13:13 ` avr-gcc Andy Wingo
2016-04-15 21:06 ` avr-gcc Ludovic Courtès
2016-04-15 21:10 ` avr-gcc Ludovic Courtès
2016-04-16 19:55 ` avr-gcc Jan Nieuwenhuizen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ=RwfYLkn7Oc3rVHp6Pf1HB8gK4cWA1NkShPttVQaZ_P59hKQ@mail.gmail.com' \
--to=dthompson2@worcester.edu \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).