This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ct-ng + uclibc config problem


Enrico,

On Thursday 03 January 2008 21:50:22 Enrico Weigelt wrote:
> It took me several builds to find out that uclibc was not 
> configured properly and so took arm per default. My mistake 
> was to create an empty uclibc config file ;-O
> Maybe we should add a few more checks and make sure the uclibc
> config is always set to the ct-ng's target.

Effectively, an empty uClibc config file is just an explicit suggestion
to be beaten hard on the head with a stick! ;-)

More seriously, there _could_ be a way to generate the uClibc configuration
file with different options:

 1) generate default config file, just set appropriate values for target
 2) have ct-ng call uClibc's menuconfig, override appropriate values for target
 3) do as today, expect a fully-configured (save for paths) config file
 3bis) find a _simple_ and _easy_ way to check the config file validity
 4) incorporate the uClibc config in crostool-NG's

(1) is just a makeshift for the problem of the uClibc config. Part of that
solution is already implemented: we already override the values needed to set
the architecture and the paths. But most of the uClibc config options make
sense to check for for the person building the toolchain. After all, uClibc
means 'some kind' of embedded target, thus the ratio size vs. features is
omportant. Setting arbitrary values makes no sense.

I don't like (2) because that means the build is not reproducible with the
same set of crosstool-NG options: the user could set different uClibc options
for two different builds with the same options of crosstool-NG.

(3) is the only thing I coded because it makes semse. It is reasonnable.

(3bis) is not easy to achieve:
 - check the file is empty?
    -> Avoids using touch to create the file.
      => user will use: echo "" >uclibc.config
 - check a minimal size
    -> could work, but if (when) uClibc uses the mini-config feature, then
       this solutions is borked.
 - check for at least a number of options:
    -> presence of at least TARGET_${CT_KERNEL_ARCH}
    -> presence of the paths options: KERNEL_HEADERS, SHARED_LIB_LOADER_PREFIX
       RUNTIME_PREFIX and DEVEL_PREFIX
    -> presence of the other settings being munged
      => is the list exhaustive?
      => is the list valid for all architectures? for all possible crosstool-NG
         configurations (eg. NPTL vs. linuxthreads)?
      => etc...

(4) is impossible for at least four reasons:
 - we shouldn't duplicate the config for uClibc, although we could be duped
   into thinking about it. But...
 - there are different versions of uClibc, thus we don't want to duplicate
   the config of all supported uClibc versions. Plus...
 - local patches (patches one has localy, and not coming with crosstool-NG)
   may change the config (add/remove) options, so we definetely can't duplicate
   the uClibc config options.
 - should we stupidly decided to duplicate those options, we'd need some kind
   of namespace separation to differentiate uClibc options from crosstool-NG's
   (*)

Again, not correctly pre-configuring uClibc is asking for troubles.

Regards,
Yann E. MORIN.

(*) Having a namespace facility in the Kconfig language would be awsome!
Unfortunately, my suggestion on the mailing list didn't find any positive
echo...
http://sourceforge.net/mailarchive/message.php?msg_name=200705242305.04930.yann.morin.1998%40anciens.enib.fr

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< °_° >==-- °------------.-------:  X  AGAINST      |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL    |  """  conspiracy.  |
°------------------------------°-------°------------------°--------------------°


--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]