You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Basin Ilya <ba...@gmail.com> on 2017/02/27 14:59:29 UTC
Where do ./build/rules.mk come from in apr-util?
Hi.
I download https://www.apache.org/dist/apr/apr-util-1.5.4.tar.bz2
unpack and configure:
export CFLAGS="-g -O0"
export CXXFLAGS=""
./configure --prefix=/usr --with-apr=/usr --with-ldap --with-crypto \
--with-gdbm=/usr --with-sqlite3=/usr --with-nss=/usr --with-odbc=/usr \
--with-berkeley-db=/usr --with-pgsql=/usr --with-mysql=/usr
--with-oracle=/usr \
--with-openssl=/usr
after configure out of the blue the file ./build/rules.mk appears and it
contains:
# compilation and linking flags that are supposed to be set only by
the user.
# configure adds to them for tests, but we restore them at the end.
#
CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe
-fstack-protector-strong --param=ssp-buffer-size=4
CPPFLAGS=-D_FORTIFY_SOURCE=2
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro
I grepped the source tree for the phrase "compilation and linking
flags", but it wasn't there. I also checked my "/usr/lib/pkgconfig" and
"/usr/lib/httpd/build".
I also tried to find the word "ssp-buffer-size" and couldn't find it.
So where does this file come from? How to build apr-util without
"_FORTIFY_SOURCE"? My last resort is to edit rules.mk after configure
using sed, but I'm still curious.
Re: Where do ./build/rules.mk come from in apr-util?
Posted by William A Rowe Jr <wr...@rowe-clan.net>.
The origin of that file is the apr-1.5.2... this is how you or your distributor
had built the underlying apr library, and the flags must (mostly) match.
In your case, you may be safe to simply change that to "CPPFLAGS="
if all other settings are correct. Note this is a debugging build with no
optimizations whatsoever.
On Mon, Feb 27, 2017 at 8:59 AM, Basin Ilya <ba...@gmail.com> wrote:
> Hi.
> I download https://www.apache.org/dist/apr/apr-util-1.5.4.tar.bz2
> unpack and configure:
>
> export CFLAGS="-g -O0"
> export CXXFLAGS=""
> ./configure --prefix=/usr --with-apr=/usr --with-ldap --with-crypto \
> --with-gdbm=/usr --with-sqlite3=/usr --with-nss=/usr --with-odbc=/usr \
> --with-berkeley-db=/usr --with-pgsql=/usr --with-mysql=/usr
> --with-oracle=/usr \
> --with-openssl=/usr
>
> after configure out of the blue the file ./build/rules.mk appears and it
> contains:
>
> # compilation and linking flags that are supposed to be set only by
> the user.
> # configure adds to them for tests, but we restore them at the end.
> #
> CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe
> -fstack-protector-strong --param=ssp-buffer-size=4
> CPPFLAGS=-D_FORTIFY_SOURCE=2
> LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro
>
> I grepped the source tree for the phrase "compilation and linking
> flags", but it wasn't there. I also checked my "/usr/lib/pkgconfig" and
> "/usr/lib/httpd/build".
>
> I also tried to find the word "ssp-buffer-size" and couldn't find it.
>
> So where does this file come from? How to build apr-util without
> "_FORTIFY_SOURCE"? My last resort is to edit rules.mk after configure
> using sed, but I'm still curious.