avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] Approaching #49567: Use meta-info from --print-multi-


From: Georg-Johann Lay
Subject: Re: [avr-libc-dev] Approaching #49567: Use meta-info from --print-multi-lib
Date: Tue, 30 May 2017 12:21:51 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1

On 29.05.2017 15:40, Georg-Johann Lay wrote:
Hi.

This thread is about https://savannah.nongnu.org/bugs/?49567 and how
it can be solved.

The current implementation is agnostic of gcc's multilib layout and
uses much of hard-coded knowledge.

This makes it hard to extend avr-gcc and add new multilib variants
because avr-libc must always be adjusted in sync.

Information about multilib layout can be retrieved from the compiler
by --print-multi-lib.  This exposes the available multilib directories
together with the options needed to select that multilib variant.

Moreover, for each set of options, in particular -mmcu=<device>, the
compiler can report the respective multilib directory by means of
--print-multi-directory.

These are old features available "since ever" and nothing new.

The current problem with avr-libc is that it abuses autotools in
some weird way:  The "bootstrap" script generates a tree of .am
automake templates by using input templates with special <<fixme>>
entries, replaces the <<fixme>>s to get automake input, them runs
automake, then runs autoconf.

The major problem here is that "bootstrap" is completely agnostic
of the compiler in use, and hence no information can be retrieved
from the compiler.

The following approach is more conservative and builds on the present
bootstrap scheme:

"bootstrap" gets the compiler from the command line so it can be
used in the poor man's configure-like queries for avr-gcc features
and multilib layout by devtools.

The specified compiler, "avr-gcc" per default, is written to a file,
and configure picks it up and will use it as CC.

That way, "configure" and "bootstrap" are basing on the same avr-gcc
and features.  Specifying CC on the configure command line is
explicitly forbidden.

The patch below shows how it would look like.  The devtools and
how multilib tree is build has not been changed, it's still all
about how to teach "bootstrap" about the compiler and keeping
consistency between "bootstrap" and "configure".


Johann

The first question is: Would work on #49567 be welcome?



Attachment: x.diff
Description: Text Data


reply via email to

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