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

From: Jeffrey Walton <noloader_at_gmail.com>
Date: Tue, 17 Sep 2013 17:00:58 -0700

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 - 00:01:05 MDT

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