cURL / Mailing Lists / curl-library / Single Mail


./configure --enable-optimize

From: Дилян Палаузов <>
Date: Sun, 25 May 2014 18:32:15 +0200


Autoconf provides sufficient mechanisms to pass (optimizing) options to
the compiler. One such option is via /usr/local/etc/, which
on my system contains:

export CFLAGS='-pipe -O2 -Wl,-S -Wl,--hash-style=gnu -Wl,-O1
-Wl,-z,relro -Wall -Wextra'

and these options are passed to all auto./configured software. Another
possibility is to call

CFLAGS='-pipe -O2 -Wl,-S -Wl,--hash-style=gnu -Wl,-O1 -Wl,-z,relro -Wall
-Wextra' ./configure && make

for each package. In all cases, the person running ./configure has
enough possibilities to influence how the compiler is called, provided
he knows what options he want to pass to the compiler and is confident
with autoconf. If this conditions are not met, it is unlikely that
curl/m4/curl-compilers.m4 will guess the right options for the compiler,
and it is unlikely that the person compiling curl will notice, that cURL
is not optimized by the compiler.

That said, I recommend complete removal of the --enable-optimize
./configure option and all compiler specific tweaks. The idea behind
GNU Autoconf is to not put any compiler specific stuff in the Autoconf
files, autoconf provides enough facilities for the called to tweak at
./configure time what he wants.

Със здраве

List admin:
Received on 2014-05-25