Opendigitalradio / ODR-DabMod

ODR-DabMod is a DAB (Digital Audio Broadcasting) modulator, part of the ODR-mmbTools.
https://www.opendigitalradio.org
Other
49 stars 32 forks source link

Fix INSTALL type error #23

Closed lars18th closed 6 years ago

lars18th commented 6 years ago

The description has a small bug. Fixed!

mpbraendli commented 6 years ago

Thanks for pointing this out, but I need to double check if this is correct. I'm not sure now that optimisations actually get disabled... Let me check first.

lars18th commented 6 years ago

Hi @mpbraendli ,

Thanks for pointing this out, but I need to double check if this is correct. I'm not sure now that optimisations actually get disabled... Let me check first.

Did you check it? I'm sure it's a handwriting mistake.

mpbraendli commented 6 years ago

Give me time, I didn't forget about this. I agree there is a mistake, but I need to check what the actual behaviour is.

mpbraendli commented 6 years ago

Observations: With --enable-debug, compiler flags include -g -O2, i.e. with debugging, with optimisations Without --enable-debug, compiler flags also include -g -O2 So the option is totally pointless. I'll remove it.

mpbraendli commented 6 years ago

There is one effect: the -DNDEBUG compile flag. Investigating...

lars18th commented 6 years ago

Hi @mpbraendli ,

So you're right and it's really something wrong.

As far as I know the DNDEBUG is required when --enable-debug is set. The "only" problem I see is that the compiler options aren't set right when debug is enabled.

mpbraendli commented 6 years ago

FYI, this is what NDEBUG means: http://en.cppreference.com/w/cpp/error/assert

lars18th commented 6 years ago

Please, review the environment of CFLAGS in your build machine.

I don't see any reference to -O2 in sources. So, I feel you see -g -O2 in the compile flags because the CFLAGS is set to -g -O2 prior to call to the configure tool.

mpbraendli commented 6 years ago

Performance difference with and without NDEBUG is small on my machine (less than 1%), and having the assertions enabled can help me discover issues.

mpbraendli commented 6 years ago

I don't have CFLAGS nor CXXFLAGS set on my machine and supposed -O2 -g are defaults. I don't know where they come from.

mpbraendli commented 6 years ago

I confirm it's the default. See https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/C_002b_002b-Compiler.html

lars18th commented 6 years ago

Then, perhaps the solution is instruct the autoconf tool to set the CFLAGS to the correct value when "debug" or "nodebug" are used.

mpbraendli commented 6 years ago

Usual consensus is to let the user override CFLAGS and CXXFLAGS if he wishes to. I've removed the --enable-debug flag and updated INSTALL to mention this.

lars18th commented 6 years ago

OK.