From: Hironori Ito (hito@rcf.rhic.bnl.gov)
Date: Thu Jul 24 2003 - 10:29:34 EDT
Hello. I knew CXXFLAGS option can be used, but this will replace any default option in brat. On the other hand, I just want to _*append*_ my option (not replacing it). For example, I can easily add my option in ROOT by editing config/Makefile.linux. Are there any easy ways for BRAT/BRAG? Hiro Christian Holm Christensen wrote: >Hi Hiro, > >Hironori Ito <hito@rcf.rhic.bnl.gov> wrote concerning > quation about automake with additional optimization [Wed, 23 Jul 2003 14:18:14 -0400] >---------------------------------------------------------------------- > > >>Hello. I have a very simple question to autotool experts. How do I use >>additional optimization flags when I build brat? I want to pass >>"-march=pentium4 -msse2". >> >> > >Setting specific compiler flags is quite simple. All you have to do, >is to set the appropriate environment variable when running >`./configure' - for example: > > ./configure CXXFLAGS="-march=pentium4 -msse2" > >The full list of possible variables, that I know of off-hand, is > > CPP The C preprocessor to use > CPPFLAGS C preprocessor flags > CC The C compiler to use > CFLAGS C compiler flags > CXX The C++ compiler to use > CXXFLAGS C++ compiler flags > LD The linker to use (caution: Libtool does a better job > than you do, unless you know exactly what you're > doing). > LDFLAGS The flags to pass to the linker (caution: same as above) > LATEX LaTeX command to use > LATEX2HTML LaTeX to HTML command to use > DVIPS Dvi to PS translator > MAKEINDEX Index generator > FIG2DEV Fig translation program > >For the Fortran code packages, the variables are > > CPP The C preprocessor to use > CPPFLAGS C preprocessor flags > CC The C compiler to use > CFLAGS C compiler flags > F77 Fortran77 compiler to use > FFLAGS Flags for the Fortran77 compiler > LD The linker to use (caution: same as above) > LDFLAGS The flags to pass to the linker (caution: same as above) > >Newer version of Autoconf make `./configure --help' report the >possible variables. > >Also, if you'd rather use another compiler than GCC, say the Intel >C/C++/Fortran77 compilers, or the system compiler on non-GNU systems, >like CC on Solaris, cxx on Digitial/Compaq/HP Unix, and so on, you can >specify that too: > > ./configure CC=ecc CXX=ecc > >[Notice how I assume that you're on an Itanium machine, just for the >heck of it :-)] > >In general, `./configure' will use the appropriate linker and >preprocessor based on your compiler choice. > >This is all pretty well documented in the `INSTALL' file, as well as >in the manual of `Autoconf': > > info "(autoconf)Invoking configure" "Compilers and Options" > >Please do read the manual for more on these and other issues. The >manuals of the Autotools tools (he!) are rather good. Also, in the >BRAT guide, there's a reference to the online `Autobook' book (another >one!), which is even more pedagogical. > >Actually, I said something not entirely correct above. With older >versions of Autotools (the ones shipped with Red Hat pre-8), you have >to put the variable assignment _before_ the `./configure' invocation: > > CXXFLAGS="-march=pentium4 -msse2" ./configure > >That's a pain in the behind, but nothing to do about that. Newer >versions of Autotools _prefer_ putting the variable assignment after >the `./configure' invocation, but does accept the old-style assignment >too. > >Oh, and another thing I forgot to tell you in my recent rants, is the >possibility of building out-side of the source tree, which is really >cool. An example session could be: > > ~> cvs -d /afs/rhic/brahms/BRAHMS_CVS co brat > ~> cd brat > ~/brat> aclocal && automake -a && autoconf > ~/brat> mkdir i386_linux24 > ~/brat> cd i386_linux24 > ~/brat/i386_linux24> ../configure --prefix=/usr > ~/brat/i386_linux24> make > ~/brat/i386_linux24> make install > >That will put all the build stuff into a sub-directory of `~/brat' >rather then directly in the source tree, which is nice for large (>200 >components) packages. In fact, the GCC build-system will not allow >you to build directly in the source tree. > >A long answer to a simple question, but I guess you're used to that by >now. > >Hope that helps you. > >Yours, > > ___ | Christian Holm Christensen > |_| | ------------------------------------------------------------- > | | Address: Sankt Hansgade 23, 1. th. Phone: (+45) 35 35 96 91 > _| DK-2200 Copenhagen N Cell: (+45) 24 61 85 91 > _| Denmark Office: (+45) 353 25 305 > ____| Email: cholm@nbi.dk Web: www.nbi.dk/~cholm > | | > >
This archive was generated by hypermail 2.1.5 : Thu Jul 24 2003 - 10:30:58 EDT