bug-gnulib
[Top][All Lists]
Advanced

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

Re: Possible bug in configure script


From: Paul Eggert
Subject: Re: Possible bug in configure script
Date: Mon, 25 Jan 2021 22:05:06 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

On 1/25/21 7:55 PM, Jeffrey Walton wrote:

Jeffrey Walton wrote:
Placing flags in CC breaks other scripts. For example, this no longer works:

     if [[ ! $(command -v "${CC}") ]]; then
         echo "The compiler is not valid. Please install a compiler."
         exit 1
     fi

You can easily work around this problem by creating whatever compiler you like as a script. For example, create an executable file mycc in your PATH with this contents:

#!/bin/sh
exec gcc -m32 "$@"

and then use './configure CC=mycc'.

Some flags, like '-m32' or '-m64', MUST be
put in $CC. [1]

I place them where they belong - in CFLAGS and CXXFLAGS.

Where they belong is a matter of opinion. In practice, I prefer the method that Bruno suggested, as it follows the usual practice for cross-compiling. Flags like -m32 are significant enough that they are more like using a cross-compiler and so "belong" in CC more than in CFLAGS.



reply via email to

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