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

Passing LDFLAGS to Apache modules for hardened build flags



Hi,
I'm working on hardened build flags for Squeeze and I'm looking into
how to pass hardened build flags to Apache modules. 

According to the apxs2 manpage the following should work:

APACHE_CFLAGS = `dpkg-buildflags --get CFLAGS`
APACHE_CFLAGS += `dpkg-buildflags --get CPPFLAGS`
APACHE_LDFLAGS = `dpkg-buildflags --get LDFLAGS`

(..)

apxs2 -S CFLAGS="$(APACHE_CFLAGS)" -S LDFLAGS_SHLIB="$(APACHE_LDFLAGS)" (..)

The CFLAGS stuff is handled correctly. However for LDFLAGS, this
results in the following error:

apxs:Error: no config variable LDFLAGS_SHLIB
Usage: apxs -g [-S <var>=<val>] -n <modname>
       apxs -q [-S <var>=<val>] <query> ...
       apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]]
               [-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>]
               [-Wl,<flags>] [-p] <files> ...
       apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
       apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
make: *** [install] Fehler 1

Any idea, what might be wrong here?

Cheers,
        Moritz


Reply to: