GMP 6.1.2: 32-bit ARM build failure on 64-bit hardware with CFLAGS=-g

Hans Åberg haberg-1 at telia.com
Wed Jan 24 21:19:11 UTC 2018



> On 24 Jan 2018, at 18:09, Torbjörn Granlund <tg at gmplib.org> wrote:
> 
> If you override flags for choosing the architecture level and/or ABI,
> you cannot expect things to work.
> 
>  If so, is there another easy with debug info, without knowing in
>  advance what compiler flags configure would have autodetected?
> 
> Cut and paste?

Automake adds the CXXFLAGS after the AM_CXXFLAGS. So if one in the Makefile.am sets
  AM_CXXFLAGS = -std=c++14
then
  ../<distribution>/configure CXXFLAGS=-std=c++17
gives "-std=c++14 -std=c++17" to the compiler. Then GCC chooses the last one in the sequence, so in this case, it is "-std=c++17" that is used, and the compile is for C++17.

This way, one can make different builds in parallel directories. It depends though on the compiler, and what is does for each setting.




More information about the gmp-bugs mailing list