This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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 to config.guess (2002-07-03) to detect 64bit HPUX compiler


> +     if [ ${HP_ARCH} = "hppa2.0w" ];
> +         then
> +         CC_FOR_BUILD=${CC-cc}

Don't you want to use "eval $set_cc_for_build" to set CC_FOR_BUILD?

> +         if echo "__LP64__" | $CC_FOR_BUILD $CCOPTS -E - | grep -q
> __LP64__; then

Looks like a mailer line wrap.  I suspect that you don't want $CCOPTS
on the command line.  It might get used with gcc when it shouldn't.
Also, given that you don't want the behavior of the package being
configured to change depending on the value of CCOPTS, I think it
best to force users to set the architecture in setting CC (e.g.,
CC="cc +DA2.0W").  This will cause a warning if a user tries to
respecify the architecture either on the command line or with CCOPTS:

-bash-2.05b$ cc +DA2.0W -c +DA1.1 main.c
cc: warning 441: Previous '+DA' or '+DD' option overridden by '+DA1.1' option.

This is particularly important for libtool which saves CC for later
use.  Thus, you need something like

  if echo "__LP64__" | (CCOPTS= $CC_FOR_BUILD -E -) | \
    grep -q __LP64__; then

You might also check CCOPTS for +DA2.0W and +DD64, and warn the user
that these need to be set using CC to allow config.guess to correctly
guess the build configuration and ensure that the specified compiler(s)
matches the selected configuration.  This isn't an issue with gcc since
there are two different compilers.  However, you still have to be
careful about the PATH for gcc since libtool doesn't save it as an
absolute pathname.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


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