Configure failure with gmp-5.0.4 due to ignored $LDFLAGS in compiler probe (gmp: message 1 of 3)

gmp.8eaf7cd8e5128d8191fe at gmp.8eaf7cd8e5128d8191fe at
Wed Apr 4 05:07:55 CEST 2012

On 04/02/12 02:18, Torbjorn Granlund - tg at wrote:
> We recommend using CFLAGS for this purpose,
> CFLAGS="... -Wl,your_ldflags_here".

The proposed workaround of duplicating the LDFLAGS options in CFLAGS 
does allow the compilation to complete.  However, the reason I reported 
this is that the only place which failed without the workaround was the 
configure script's probe for a functioning compiler.  If that test is 
satisfied, then the actual build runs fine without any patching. 
Further, it is traditional to put preprocessor options in CPPFLAGS, 
compiler options in CFLAGS, and linker options in LDFLAGS.  Users will 
not expect to need to repeat their linker options in the CFLAGS 
variable.  By making the changes I outlined previously, the configure 
script will more closely test the compiler that will be used by the 
build system.

More information about the gmp-bugs mailing list