This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Disable building with i386-*, -march=i386 or -mcpu=i386.


On Wed, Apr 17, 2013 at 1:01 PM, Andreas Jaeger <aj@suse.com> wrote:
>>>> What do you prefer?
>>>>
>>>> CFLAGS='-O2 -march=i686' ./configure ...
>>>>
>>>> or
>>>>
>>>> ./configure ... CFLAGS='-O2 -march=i686'
>>>
>>>
>>> Definitely not "./configure", let's not build in the source directory.

Sorry, that was a typo, it should have been /path/to/src/configure.

e.g.
http://sourceware.org/glibc/wiki/Testing/Builds

>>> My preference is the first one,

That's the same as setting an environment variable and what Roland
wanted to avoid.

>>
>> But the latter works better.

The latter is passing options to configure.

> Could you enlighten me why? If it indeed works better, I'll change my preference ;)

Exactly, I also wanted to be enlightened.

Roland said that in the past, when you changed the configure file, and
re-ran make, that the re-configuration which runs via config.status
might not run in the same shell and thus might not run with the same
set of env vars specified, and thus you would change your compilation
settings by accident (correct me if I'm wrong Roland).

In modern autoconf this is not the case. The config.status encodes CC,
CFLAGS, CPPFLAGS, CXX, CXXFLAGS as options to re-configuation.

e.g.
ac_cs_config="'--with-headers=/home/carlos/install-linux/include'
'--prefix=/usr' '--enable-add-ons=nptl,ports' 'CC=gcc' 'CFLAGS=-g -O3'
'CPPFLAGS=-g -O3' 'CXX=g++' 'CXXFLAGS=-g -O3'"

When I use env vars, or configure parameters, the config.status is
identical and thus all future reconfigurations and builds are
consistently using the same options.

Therefore I do not think we need to avoid using env vars during
configure, however, it's probably best practice to pass options on the
command line to configure.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]