1 |
commit: 8f36aaf184fd8aeb5387d51f22246179b6dd349c |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jun 18 13:43:45 2017 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 11 15:25:25 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f36aaf1 |
7 |
|
8 |
apache-2.eclass: don't enable maintainer-mode with USE=debug. |
9 |
|
10 |
The --enable-maintainer-mode flag serves two purposes: first, it |
11 |
enables compile-time warnings; and second, it forces all compiled |
12 |
modules to be loaded at runtime. To achieve the first goal, the build |
13 |
system checks for the "-std=c89" compiler flag and appends it to |
14 |
CFLAGS if found. This can cause a problem later, because the CFLAGS |
15 |
used to build apache are used by apxs to build extension modules. |
16 |
|
17 |
In particular, if you have an extension that relies on C99 or some |
18 |
later standard, and if apache was built with --enable-maintainer-mode, |
19 |
then apxs will attempt to build that extension according to C89 and |
20 |
fail. This failure can be observed in in bugs 621686, 621756, and |
21 |
621794 when apache is built with USE=debug, because USE=debug sets |
22 |
the --enable-maintainer-mode flag. |
23 |
|
24 |
Since there is not much reason for an end user to enable maintainer- |
25 |
mode, the simplest fix for this is the wholesale removal of the |
26 |
--enable-maintainer-mode flag from USE=debug. This prevents us from |
27 |
having to append CFLAGS to each extension package that uses a later |
28 |
standard, or from having to add a USE dependency forbidding USE=debug |
29 |
in apache (which would create conflicts with e.g. mod_backtrace). |
30 |
|
31 |
Gentoo-Bug: 621686 |
32 |
Gentoo-Bug: 621756 |
33 |
Gentoo-Bug: 621794 |
34 |
|
35 |
eclass/apache-2.eclass | 4 ++-- |
36 |
1 file changed, 2 insertions(+), 2 deletions(-) |
37 |
|
38 |
diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass |
39 |
index 78a7c5ce474..dbd55abe8c9 100644 |
40 |
--- a/eclass/apache-2.eclass |
41 |
+++ b/eclass/apache-2.eclass |
42 |
@@ -1,4 +1,4 @@ |
43 |
-# Copyright 1999-2015 Gentoo Foundation |
44 |
+# Copyright 1999-2017 Gentoo Foundation |
45 |
# Distributed under the terms of the GNU General Public License v2 |
46 |
|
47 |
# @ECLASS: apache-2.eclass |
48 |
@@ -402,7 +402,7 @@ apache-2_pkg_setup() { |
49 |
setup_modules |
50 |
|
51 |
if use debug; then |
52 |
- MY_CONF+=( --enable-maintainer-mode --enable-exception-hook ) |
53 |
+ MY_CONF+=( --enable-exception-hook ) |
54 |
fi |
55 |
|
56 |
elog "Please note that you need SysV IPC support in your kernel." |