bug-autoconf
[Top][All Lists]
Advanced

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

RE: size 0 should be rejected?


From: Jay K
Subject: RE: size 0 should be rejected?
Date: Sun, 7 Nov 2010 10:17:06 +0000

Ralf, on the 0 thing, it is building gcc. I forget where, but somewhere it was 
like:

#if SIZEOF_INT * CHAR_BIT == 32
...
#elif SIZEOF_LONG * CHAR_BIT == 64
...
#else
#error
#endif

It didn't fail until that point.
This was on a Solaris 2.9 sparc machine.
I don't think it is particularly relevant.

One of my points though -- not my code -- should already be using AC_PROG_CXX.

I understand that shouldn't check "if programs work", but it could check for 
"0"?
 Splitting hairs, perhaps, but that is, it wouldn't compile and run another 
program, just
  check the result that it computes.


I'll try to send a log later for CXX=CC and CC not set => CC given gcc flags.


Thanks,
 - Jay


----------------------------------------
> Date: Sun, 7 Nov 2010 10:35:43 +0100
> From: address@hidden
> To: address@hidden
> CC: address@hidden
> Subject: Re: size 0 should be rejected?
>
> Hello Jay,
>
> * Jay K wrote on Sat, Nov 06, 2010 at 06:02:54PM CET:
> > address@hidden :~ > echo "int main(){}" > 1.c
> > address@hidden :~ > /opt/csw/gcc4/bin/g++ 1.c
> > address@hidden :~ > ./a.out
> > ld.so.1: a.out: fatal: libstdc++.so.6: open failed: No such file or 
> > directory
> > Killed
> >
> >
> > now, this is some local problem.
> > My complaint to autoconf though, is that in this situation, autoconf 
> > blithely produced:
> >
> > config.h:
> > #define SIZEOF_INT 0
> > #define SIZEOF_LONG 0
> >
> > I think it should notice that and error out loudly/early.
>
> You can (and probably should) have a test before these tests that
> ensures that the C++ compiler actually works. It might be a bug
> that AC_PROG_CXX doesn't always ensures this, but fact is that it
> is that way with the current Autoconf version.
> (In fact, it is sometimes necessary in the GCC build tree that
> AC_PROG_CXX accepts a compiler that doesn't yet fully work, that
> is part of bootstrapping).
>
> The AC_CHECK_SIZEOF tests (and other tests) should not each re-check
> whether the compiler works. That would slow lost of them down for
> little gain.
>
> > If autoconf were really clever, I'd like it to recognize this situation and
> > fallback to /usr/bin/CC, which works.
> > But ok either way. I'm setting CXX to it now.
>
> That's another thing that would maybe apply to AC_PROG_CXX, but in
> order to judge that we'd need to see a full example and why it
> isn't working that way.
>
> > Also, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46334 is maybe an 
> > autoconf bug.
> > If set CXX=/usr/bin/CC and I don't set CC, then CC gets gcc flags and warns 
> > like crazy.
> > Or it might be stuff specific in gcc's Makefile...
>
> Please report independent issues in independent emails, thanks.
> Please, when you report bugs, provide enough information to
> actually reproduce the issue, like the system you're building
> on, the config.log for the subtree you're building, etc.
>
> Thanks,
> Ralf
                                          


reply via email to

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