Joachim Durchholz
2008-Mar-24 19:16 UTC
[LLVMdev] Potential breakage in llvm-gcc's ./configure
Am Montag, den 24.03.2008, 12:06 -0700 schrieb Tanya M. Lattner:> > This is close to a showstopper for integrating an llvm-gcc bootstrap > > into the nightly tester. The llvm-gcc ./configure needs to be called > > very differently from the llvm ./configure, and keeping two sets of > > options is Not Worth The Trouble, at least IMHO. > > So you didn't like the suggestion of having the configure for llvm-gcc set > via an environment variable? That avoids having to deal with this directly > in the script. Or am I missing something?No, that was written under the assumption that passing in CC and CXX via env variables wouldn't work. Things work now, so that assumption is obviously wrong. I still don't like environment variables. They tend to remain in effect long after I forgot that I set them, creating all sorts of hassle. In fact I suspect I already fell prey to this, getting llvm to compile and check one day and nearly despairing when trying to reproduce that success on the next day. But, well, you use what you need to use to get the job done, so there :-) Regards, Jo
Ralph Corderoy
2008-Mar-25 12:08 UTC
[LLVMdev] Potential breakage in llvm-gcc's ./configure
Hi Jo,> No, that was written under the assumption that passing in CC and CXX > via env variables wouldn't work. Things work now, so that assumption > is obviously wrong. > > I still don't like environment variables. They tend to remain in > effect long after I forgot that I set them, creating all sorts of > hassle. In fact I suspect I already fell prey to this, getting llvm to > compile and check one day and nearly despairing when trying to > reproduce that success on the next day. But, well, you use what you > need to use to get the job done, so there :-)Are you aware that FOO=bar ./configure makes the shell set an environment variable just for the running of ./configure, i.e. it isn't an envvar in your shell as FOO=bar; export FOO ./configure would do. But it still an envvar, unlike ./configure FOO=bar It may help. $ env | grep FOO $ FOO=bar env | grep FOO FOO=bar $ Cheers, Ralph.
Am Dienstag, den 25.03.2008, 12:08 +0000 schrieb Ralph Corderoy:> > No, that was written under the assumption that passing in CC and CXX > > via env variables wouldn't work. Things work now, so that assumption > > is obviously wrong. > > > > I still don't like environment variables. They tend to remain in > > effect long after I forgot that I set them, creating all sorts of > > hassle. In fact I suspect I already fell prey to this, getting llvm to > > compile and check one day and nearly despairing when trying to > > reproduce that success on the next day. But, well, you use what you > > need to use to get the job done, so there :-) > > Are you aware that > > FOO=bar ./configure > > makes the shell set an environment variable just for the running of > ./configure,I am. I'm not sure that FOO=bar BAZ=boo ./configure will work; at least I got some funny results (though that may have been due to other reasons). Well, you live and learn. I have now switched to opening a new shell window whenever I start an experiment, since gcc won't become environment-agnostic in my lifetime anyway. Though that's bad. If some overambitious sysadmin adds a CFLAGS variable to /etc/profile, people on that machine will get funny results. To make matters worse, there does not seem to be an exhaustive list of environment variables to check, at least not for gcc and autoconf (though there are plenty of non-exhaustive ones). I know I have to check CC, CXX, CCFLAGS, CPPFLAGS, CXXFLAGS, and LDFLAGS; does an ASFLAGS exist? A RANLIBFLAGS? ARFLAGS? (This is essentially the same problem as with global variables: lack of information hiding, making it very difficult to check all dependencies.) I'm pretty sure that I'm not the first to observe this kind of difficulty, and the GNU project probably won't change their conventions anyway, I'll stop my rant now :-) Regards, Jo
Maybe Matching Threads
- [LLVMdev] Potential breakage in llvm-gcc's ./configure
- [LLVMdev] Environment variables considered evil
- [LLVMdev] Potential breakage in llvm-gcc's ./configure
- [LLVMdev] Potential breakage in llvm-gcc's ./configure
- [LLVMdev] Potential breakage in llvm-gcc's ./configure