7a764df5e9
This reverts commit e267e9ec30.
66 lines
2.4 KiB
Diff
66 lines
2.4 KiB
Diff
From 5f1d570c7bcafbda90bc5985b716fdb94e2aa10a Mon Sep 17 00:00:00 2001
|
|
From: Marc Dionne <marc.c.dionne@gmail.com>
|
|
Date: Sun, 27 Jan 2013 20:52:39 -0500
|
|
Subject: [PATCH] Linux: Detect undefined symbols in kernel modules
|
|
|
|
Undefined symbols in the kernel modules are not currently detected
|
|
at build time. As a result, buildbot may indicate success while
|
|
the resulting kernel modules are unusable.
|
|
|
|
In the kernel build process, modpost warns about missing symbols
|
|
but does not return an error in the case of external modules.
|
|
Detect these warnings and cause the libafs build to fail.
|
|
|
|
Reviewed-on: http://gerrit.openafs.org/8981
|
|
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
|
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
|
|
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
|
|
(cherry picked from commit dbdee60a83d72d38a04a0eeb2a5324cf497e57e3)
|
|
|
|
Change-Id: If28b97b6ce53b0feef2464a56fd7a48443c973ae
|
|
---
|
|
src/libafs/.gitignore | 1 +
|
|
src/libafs/MakefileProto.LINUX.in | 10 +++++++++-
|
|
2 files changed, 10 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/src/libafs/.gitignore b/src/libafs/.gitignore
|
|
index d87f88a..225e979 100644
|
|
--- a/src/libafs/.gitignore
|
|
+++ b/src/libafs/.gitignore
|
|
@@ -26,3 +26,4 @@
|
|
/rpc
|
|
/sys
|
|
/rx
|
|
+/.makelog
|
|
diff --git a/src/libafs/MakefileProto.LINUX.in b/src/libafs/MakefileProto.LINUX.in
|
|
index 63b2f35..9449360 100644
|
|
--- a/src/libafs/MakefileProto.LINUX.in
|
|
+++ b/src/libafs/MakefileProto.LINUX.in
|
|
@@ -19,6 +19,8 @@ INSTALL_DATA = @INSTALL_DATA@
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|
|
|
+AFS_OS_CLEAN = .makelog
|
|
+
|
|
# OS specific object files:
|
|
AFS_OS_OBJS = \
|
|
osi_alloc.o \
|
|
@@ -338,7 +340,13 @@ ${LIBAFS} ${LIBAFS_MP} ${LIBAFS_EP} ${LIBAFS_BM}: ${LINUX_LIBAFS_NAME}.ko
|
|
.FORCE:
|
|
${LINUX_LIBAFS_NAME}.ko afspag.ko: .FORCE
|
|
env EXTRA_CFLAGS="${EXTRA_CFLAGS}" @TOP_SRCDIR@/libafs/make_kbuild_makefile.pl ${KDIR} $@ @TOP_OBJDIR@/src/config/Makefile.config Makefile.afs Makefile.common
|
|
- env EXTRA_CFLAGS="${EXTRA_CFLAGS}" $(MAKE) -C ${LINUX_KERNEL_BUILD} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules
|
|
+ env EXTRA_CFLAGS="${EXTRA_CFLAGS}" $(MAKE) -C ${LINUX_KERNEL_BUILD} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules 2>&1 | tee .makelog
|
|
+ @if [ `grep ^WARNING .makelog | wc -l` -ne 0 ]; then \
|
|
+ echo Error: Undefined symbols in modules ; \
|
|
+ rm .makelog \
|
|
+ exit 1 ; \
|
|
+ fi
|
|
+ rm .makelog
|
|
|
|
<all -linux26 -linux_26 -umlinux26>
|
|
${LIBAFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
|
|
--
|
|
1.7.2.5
|
|
|