Skip to contentSkip to conversation

what is the minimal version of make supported for building the kernel?

PATCH Robert P. J. Day 2 participants 2 messages Jun 20, 2016 – Jul 6, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

another curiosity related to my current travels through the
initramfs code, i noticed this git commit from back in 2013:

$ git show 7ac1815683
commit 7ac181568342ec618d4da1ab03c2babcaa7ee84f
Author: Jan Beulich <[email protected]>
Date:   Wed Dec 18 17:08:57 2013 -0800

fix build with make 3.80

According to Documentation/Changes, make 3.80 is still being supported for building the kernel, hence make files must not make (unconditional) use of features introduced only in newer versions.

Commit 1bf49dd4be0b ("./Makefile: export initial ramdisk compression config option") however introduced "else ifeq" constructs which make 3.80 doesn't understand. Replace the logic there with more conventional (in the kernel build infrastructure) list constructs (except that the list here is intentionally limited to exactly one element).

Makefile +0 -0
index 858a147..89cee86 100644
@@ -732,19 +732,13 @@ export mod_strip_cmd
 # Select initial ramdisk compression format, default is gzip(1).
 # This shall be used by the dracut(8) tool while creating an

initramfs image.
#
-INITRD_COMPRESS=gzip
-ifeq ($(CONFIG_RD_BZIP2), y)
- INITRD_COMPRESS=bzip2
-else ifeq ($(CONFIG_RD_LZMA), y)
- INITRD_COMPRESS=lzma
-else ifeq ($(CONFIG_RD_XZ), y)
- INITRD_COMPRESS=xz
-else ifeq ($(CONFIG_RD_LZO), y)
- INITRD_COMPRESS=lzo
-else ifeq ($(CONFIG_RD_LZ4), y)
- INITRD_COMPRESS=lz4
-endif
-export INITRD_COMPRESS
+INITRD_COMPRESS-y := gzip
+INITRD_COMPRESS-$(CONFIG_RD_BZIP2) := bzip2

+INITRD_COMPRESS-$(CONFIG_RD_LZMA)  := lzma
+INITRD_COMPRESS-$(CONFIG_RD_XZ)    := xz
+INITRD_COMPRESS-$(CONFIG_RD_LZO)   := lzo
+INITRD_COMPRESS-$(CONFIG_RD_LZ4)   := lz4

+export INITRD_COMPRESS := $(INITRD_COMPRESS-y)

... etc etc ...

now, Documentation/Changes currently does indeed state:

Current Minimal Requirements
============================
... snip ...
o GNU make 3.80 # make --version

but i did a quick grep to find:

  $ grep -r "else ifeq" *
  lib/raid6/test/Makefile:else ifeq ($(HAS_NEON),yes)
  $

so would that single test not violate the rule just described above? is Documentation/Changes entirely up to date with respect to minimal requirements?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw
Quoted 9 lines · Robert P. J. Day

now, Documentation/Changes currently does indeed state:

Current Minimal Requirements
============================
... snip ...
o GNU make 3.80 # make --version

but i did a quick grep to find:

Quoted 7 lines
  $ grep -r "else ifeq" *
  lib/raid6/test/Makefile:else ifeq ($(HAS_NEON),yes)
  $

so would that single test not violate the rule just described above? is Documentation/Changes entirely up to date with respect to minimal requirements?

Probably not. Checking with the latest 4.x and 3.x stable releases, on a CentOS 5.11 i386 VM with 4GB of RAM, 'make defconfig' fails in 4.6.3 using make 3.80:

make[1]: *** virtual memory exhausted. Stop.

which looks like a bug that was fixed in 3.81. 'make defconfig' using make 3.80 works with 3.14.73, but curiously 'make distclean' then fails with

Extraneous text after 'else' directive

in kernel/gcov/Makefile.

As make 3.80 dates from 2002... it might be time to bump the minimum required make version up to 3.81 (which is only ten years old now).

Signature · 1 line
Jim