automake
[Top][All Lists]
Advanced

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

Re: How are env variables passed to the compilation process


From: Gavin Smith
Subject: Re: How are env variables passed to the compilation process
Date: Thu, 12 Mar 2015 15:08:47 +0000

On 10 March 2015 at 22:04, Andy Falanga (afalanga) <address@hidden> wrote:
> I'm trying to figure out how things like CXXFLAGS and CFLAGS get passed to 
> ultimate point of compilation.  I thought I had it down but something that 
> just happened recently has me wondering.  I've gotten my project building now 
> using automake/autoconf/etc. (what I understand to be the autotools).  Now, 
> the first target system I'm building on builds the code just fine but the 
> library caused a segmentation violation.  I'd like to debug.
>
> I go through the list of output made by the build process and discover that 
> the build process didn't do what seems to be the "standard" options, "-O2 
> -g".   Neither of these were used.  So, I thought I'd add them.  I did this:
>
> make clean
> ./configure CFLAGS="-ggdb -O0" CXXFLAGS="-ggdb -O2"
> make
>
> Much to my surprise, the "-ggdb -O0" didn't appear then either.  Did I miss 
> something?  Isn't this how they are set?
>
To get a hint of where it has gone wrong, have a look in the
"Makefile" file that is produced by the configure script. It should
have a lines like

CFLAGS = -ggdb -O0

in it. If it does, there is something wrong in the rest of the
Makefile, so the problem is with the "Makefile.am" file. If it says
something else, the value of CFLAGS is not being set properly by the
configure script, so the problem is with the "configure.ac" file.



reply via email to

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