This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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: [patch] Matsushita AM33/2.0 port


On Jun 18, 2004, Roland McGrath <roland@redhat.com> wrote:

>> > I think we can replace that hard-coded stuff with a table of
>> > patterns in a file, and then have configure use the union of files
>> > from all add-ons.
>> 
>> How would this work for mips64*-linux, for example?

> The mapping of configuration tuple to $machine setting is straightforward
> enough. The other cruft there futzing with compiler options is not directly
> related.

Nope.  The ABI in effect is taken from the options passed to the
compiler, if not explicitly specified in the tuple.  I.e., you can
configure for:

mips64-linux-gnu-abi{32,n32,64}

and then it will just check that you haven't passed a conflicting flag
in $CC $CFLAGS $CPPFLAGS, but if you configure for mips64-linux (the
expected way to configure, since otherwise it will guess the compiler
name wrong), you have to set CFLAGS/CPPFLAGS such that the tools
generate code for the ABI you're building glibc for.

>> A configure-let script would address both this issue and that of
>> automatic add-ons.  We just need a convention on where these files
>> should be placed and how they should be named.

> Give me an example of what the add-on's configure fragment looks like
> and how that does automatic add-ons.

I was thinking of something like:

case "$machine" in
myport)
  base_machine=myport machine=myport/whatever
  implicit_add_ons=$implicit_add_ons,myport
  case ,$enable_add_ons$implicit_add_ons, in
  *,linuxthreads,*)
    implicit_add_ons=$implicit_add_ons,myport/linuxthreads
    ;;
  esac
  ;;
esac


Toplevel would then do something like:

implicit_add_ons=

for file in ports/*/auto-select.sh; do
  if test -f "$file"; then
    . "$file"
  fi
done

# Remove a trailing comma from implicit_add_ons if there isn't any
# explicit add-on.
case $enable_add_ons$implicit_add_ons in
,*) implicit_add_ons=`echo "$implicit_add_ons" | sed '1s:^,::'` ;;
esac

enable_add_ons=$enable_add_ons$implicit_add_ons


Hmm...  Maybe we need some means to specify ordering between implicit
and explicit add-ons, but this is the general idea.

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


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