[squid-users] Re: compiler-flags.m4 and modifying options

From: Jeffrey Walton <noloader_at_gmail.com>
Date: Tue, 17 Sep 2013 18:28:57 -0700

To answer my own question: NO.

libtool: compile: gcc -DHAVE_CONFIG_H -I../.. -I../../include
-I../../lib -I../../src -I../../include -I/opt/local/include
-I/opt/local/include -I/opt/local/include -I../../libltdl -I../../lib
-I/opt/local/include -I/opt/local/include -Wall -Wpointer-arith
-Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wcomments
-Werror -pipe -D_REENTRANT -Wall -g -O2 -MT smblib.lo -MD -MP -MF
.deps/smblib.Tpo -c smblib.c -o smblib.o >/dev/null 2>&1

The odd thing is, it does not even honor incumbent settinings. For
example, squid_cv_cc_option_optimize="-O3".

Jeff

On Tue, Sep 17, 2013 at 5:00 PM, Jeffrey Walton <noloader_at_gmail.com> wrote:
> Forgive my ignorance here because I still write my makefiles by hand.
>
> If I wanted to delete an option used by the project, is it as simple
> as removing the option from the switch statement around line 155:
>
> AC_DEFUN([SQUID_CC_GUESS_OPTIONS], [
> AC_REQUIRE([SQUID_CC_GUESS_VARIANT])
> AC_MSG_CHECKING([for compiler variant])
> case "$squid_cv_compiler" in
> gcc)
> squid_cv_cc_option_werror="-Werror"
> squid_cv_cxx_option_werror="-Werror"
> squid_cv_cc_option_wall="-Wall"
> squid_cv_cc_option_optimize="-O3"
> squid_cv_cc_arg_pipe="-pipe"
> ;;
> sunstudio)
> ...
>
> So I would delete squid_cv_cc_option_werror="-Werror" and
> squid_cv_cxx_option_werror="-Werror" to remove the option (from all
> compilers under the switch).
>
> How about adding options? Can I define a new option on the fly? For example:
>
> squid_cv_cc_option_nx_stack="-Wl,z,noexecstack"
> squid_cv_cc_option_nx_heap="-Wl,z,noexecheap"
>
> No-exec heaps are only available on PaX enabled kernels (such as
> Gentoo), so can I expect the autotools to do the right thing and only
> add it if available?
>
> Thanks in advance.
Received on Wed Sep 18 2013 - 01:29:05 MDT

This archive was generated by hypermail 2.2.0 : Wed Sep 18 2013 - 12:00:05 MDT