autoconf
[Top][All Lists]
Advanced

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

What is the correct way to disable -O2?


From: Peng Yu
Subject: What is the correct way to disable -O2?
Date: Wed, 23 Jan 2019 12:10:40 -0600

Hi,

I had to use the following command to disable -O2 in the default of
configure of bash.

http://git.savannah.gnu.org/cgit/bash.git/tree/configure

CFLAGS='' -g -O0" ./configure

But the following command does not disable -O2. I think that -O2
should be applicable to both C and C++ code, so it should have been
set to CPPFLAGS as  CPPFLAGS is for both C and C++ but CFLAGS is only
for C.

CPPFLAGS='' -g -O0" ./configure

Could anybody let me know what is the standard way to disable -O2? I'd
like a way that works for many autoconf-based packages besides just
bash.

Also, the configure file has this. Both -g and -O2 are compile-time
options. Why are they used for linking? Is this usage correct?

AUTO_LDFLAGS="-g ${GCC+-O2}"

-- 
Regards,
Peng



reply via email to

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