On Sun, Feb 11, 2018 at 4:40 PM, Niels Möller <ni...@lysator.liu.se> wrote:
> Jeffrey Walton <noloa...@gmail.com> writes:
>
>> But please see -m32 -march=native, which was provided to configure to
>> configure with.
>
> Setting CFLAGS simply specifies what flags to be passed to the C
> compiler, totally overriding configure's automatic selection of compiler
> flags. But CFLAGS is *not* interpreted by configure in any way.
>
> Please use the documented mechanism to get the configuration you want.

That's not true. In fact, Stallman specifically tells the project to
adds the flags it needs. Below is from Section 7.2.3 of
https://www.gnu.org/prep/standards/standards.html. This would fix the
ARM compile problem, too:

<BEGIN SNIP>

If there are C compiler options that must be used for proper
compilation of certain files, do not include them in CFLAGS. Users
expect to be able to specify CFLAGS freely themselves. Instead,
arrange to pass the necessary options to the C compiler independently
of CFLAGS, by writing them explicitly in the compilation commands or
by defining an implicit rule, like this:

CFLAGS = -g
ALL_CFLAGS = -I. $(CFLAGS)
.c.o:
        $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<

Do include the ‘-g’ option in CFLAGS, because that is not required for
proper compilation. You can consider it a default that is only
recommended. If the package is set up so that it is compiled with GCC
by default, then you might as well include ‘-O’ in the default value
of CFLAGS as well.

</END SNIP>

Jeff
_______________________________________________
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs

Reply via email to