Skip to content

Commit

Permalink
Workaround Debian's broken System.map behavior
Browse files Browse the repository at this point in the history
Debian ships fake System.map files by default, leading to the
invocation of depmod with them to flood you with errors about
missing symbols.

Let's notice and not do that.

Signed-off-by: Rich Ercolani <[email protected]>
  • Loading branch information
rincebrain committed Dec 15, 2021
1 parent f291fa6 commit bd067fe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion module/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,15 @@ modules_install-Linux:
if [ -n "$(DESTDIR)" ]; then \
find $$kmoddir -name 'modules.*' | xargs $(RM); \
fi
@# Debian ships sub-1kb fake System.map files that just say
@# "if you want system.map go install this package"
@# Naturally, depmod is less than amused by this.
sysmap=$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
if [ -f $$sysmap ]; then \
depmod -ae -F $$sysmap @LINUX_VERSION@; \
size=$$(find $$sysmap -type f -size +1024c); \
if [ ! -z "$$size" ]; then \
depmod -ae -F $$sysmap @LINUX_VERSION@; \
fi \
fi

modules_install-FreeBSD:
Expand Down

0 comments on commit bd067fe

Please sign in to comment.