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]

proposal for "CHAIN_ID" extension for crosstool


  i'm curious what others think about this fairly minor proposed
extension to crosstool.

  at the moment, based on the tooochain i'm building, this is the
directory structure that would be created for me under the "results"
directory:

  results/
    gcc-4.0.1-glibc-2.3.5/		TOOLCOMBO
      sh3-unknown-linux-gnu/		TARGET
        ... the actual results ...

that entire path is, in all.sh, encapsulated in the variable PREFIX:

  PREFIX=${PREFIX-$RESULT_TOP/$TOOLCOMBO/$TARGET}

which is fine, except for a couple of issues.  first, that directory
structure is kind of cumbersome and, in many cases, a bit of overkill
if one is only ever building a single toolchain, as i am.

  in addition, while the TOOLCOMBO directory name apparently is used
to distiguish between toolchains built with differing versions of gcc
and glibc, it can't distinguish between, say, different versions of
binutils.  or the linux kernel.  or the sanitized headers.  or perhaps
different configuration options.

  as an alternative, what about defining a "CHAIN_ID" variable to
arbitrarily name a new toolchain.  if i'm building an SH3-based
toolchain for my HP jornada 690, i could override the normal directory
structure by defining, say CHAIN_ID=jornada, and that would produce
the directory structure:

  results/
    jornada/
      ... the actual results ...

this not only simplifies the directory structure, but allows one to
distinguish between subtly-different builds that aren't currently
handled by TOOLCOMBO.  (if CHAIN_ID is not defined, the default would
be to do what it does now, so it's totally backwards compatible.)

  thoughts?

rday

p.s.  a couple additional thoughts.  first, it's not clear whether or
not the build process *needs* to have those intermediate directories
as they are.  according to yaghmour in "building embedded linux
systems," p. 115, he suggests that the GNU toolchain utilities really
want to see directory names containing $TARGET and $PREFIX but i'm not
sure what that means.  is there some hard requirement that those
directory names be there for the build process to actually work?

also, it would be useful if those directory names were used
consistently.  note the difference in naming conventions between the
build and results directories for a single build:

  results/${TOOLCOMBO}/${TARGET}
  build/${TARGET}/${TOOLCOMBO}






------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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