source: branches/fc15-dev/server/common/patches/openafs-0003-Linux-allow-compile-flags-to-be-passed-to-AC_CHECK_L.patch @ 1910

Last change on this file since 1910 was 1835, checked in by achernya, 13 years ago
OpenAFS builds on F15 Get OpenAFS to build on F15, using the cherry-picked patches.
File size: 2.6 KB
RevLine 
[1835]1From 644c2853a171a3853bdb2d084287ff2e02dbca4f Mon Sep 17 00:00:00 2001
2From: Marc Dionne <marc.c.dionne@gmail.com>
3Date: Fri, 28 Jan 2011 19:03:39 -0500
4Subject: [PATCH 3/8] Linux: allow compile flags to be passed to AC_CHECK_LINUX_BUILD
5
6Some linux autoconf tests require particular compile flags such as
7-Werror.  Add a parameter to the AC_CHECK_LINUX_BUILD macro that
8lets the caller pass in any needed special flags.
9
10Reviewed-on: http://gerrit.openafs.org/3769
11Tested-by: BuildBot <buildbot@rampaginggeek.com>
12Reviewed-by: Derrick Brashear <shadow@dementia.org>
13(cherry picked from commit ca38c9546e323b59189670b80740510fb9ec5269)
14
15Change-Id: If4daa7b1202e30046d22bda5eca6b191130945ea
16[andersk@mit.edu: Remove modifications of existing tests]
17Signed-off-by: Anders Kaseorg <andersk@mit.edu>
18Reviewed-on: http://gerrit.openafs.org/3996
19Tested-by: BuildBot <buildbot@rampaginggeek.com>
20Reviewed-by: Russ Allbery <rra@stanford.edu>
21Reviewed-on: http://gerrit.openafs.org/4039
22Reviewed-by: Derrick Brashear <shadow@dementia.org>
23Tested-by: Derrick Brashear <shadow@dementia.org>
24---
25 src/cf/linux-test1.m4 |    7 +++++--
26 src/cf/linux-test4.m4 |    3 ++-
27 2 files changed, 7 insertions(+), 3 deletions(-)
28
29diff --git a/src/cf/linux-test1.m4 b/src/cf/linux-test1.m4
30index 3115cdb..97a520f 100644
31--- a/src/cf/linux-test1.m4
32+++ b/src/cf/linux-test1.m4
33@@ -85,13 +85,16 @@ AC_DEFUN([LINUX_KBUILD_USES_EXTRA_CFLAGS], [
34     CPPFLAGS="$save_CPPFLAGS"
35     AC_MSG_RESULT($ac_linux_kbuild_requires_extra_cflags)])
36 
37-dnl AC_CHECK_LINUX_BUILD([msg], [var], [includes], [code], [define])
38+dnl AC_CHECK_LINUX_BUILD([msg], [var], [includes], [code], [define], [CFLAGS])
39 AC_DEFUN([AC_CHECK_LINUX_BUILD],
40  [AS_VAR_PUSHDEF([ac_linux_build], [$2])dnl
41   AC_CACHE_CHECK([$1], [ac_linux_build],
42-   [AC_TRY_KBUILD([$3], [$4],
43+   [save_CPPFLAGS="$CPPFLAGS"
44+     CPPFLAGS="$CPPFLAGS $7"
45+     AC_TRY_KBUILD([$3], [$4],
46                  AS_VAR_SET([ac_linux_build], [yes]),
47                  AS_VAR_SET([ac_linux_build], [no]))
48+     CPPFLAGS="$save_CPPFLAGS"
49    ])
50   AS_IF([test AS_VAR_GET([ac_linux_build]) = yes],
51         [AC_DEFINE([$5],1,[$6])])
52diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
53index 3f22f7a..67ddf91 100644
54--- a/src/cf/linux-test4.m4
55+++ b/src/cf/linux-test4.m4
56@@ -684,7 +684,8 @@ struct dentry _dentry;
57 struct nameidata _nameidata;
58 (void)_inode.i_op->permission(&_inode, 0, &_nameidata);],
59                       [IOP_PERMISSION_TAKES_NAMEIDATA],
60-                      [define if your iops.permission takes a nameidata argument])
61+                      [define if your iops.permission takes a nameidata argument],
62+                      [])
63 ])
64 
65 
66--
671.7.3.4
68
Note: See TracBrowser for help on using the repository browser.