compat: fix few compilations by adding compat_autoconf.h support
authorLuis R. Rodriguez <mcgrof@frijolero.org>
Fri, 24 Feb 2012 22:20:31 +0000 (14:20 -0800)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Fri, 24 Feb 2012 23:55:25 +0000 (15:55 -0800)
commit7bf2796dc1899d68c721a1b74777df4879c89a2e
tree8b572bd46ef2a6feb06d6312b14489d1d24d55d6
parenta30bd3ceb80183417d53eeecb297f18a23ab660d
compat: fix few compilations by adding compat_autoconf.h support

The Makefile was generating the appropriate CONFIG_COMPAT_KERNEL_*
variables for our Makefiles but this was being ignored by C files
as compat had no compat_autoconf.h being generated. This patch
addresses this but also puhes out the CONFIG_COMPAT_KERNEL_* variable
generation to scripts. We have now two scripts:

scripts/gen-compat-config.sh - generates .config for Makefile propagation
scripts/gen-compat-autoconf.sh  - generates compat_autoconf.h for code propagation

This fixes running ckmake on older kernels. This issue was present
only on compat and not compat_wireless as compat_wireless was generating
its own compat_autoconf.h. This fixes compilation against some older
kernels of just the compat module alone. Some work is still required
for some newer and really ancient kernels:

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic  [FAILED]
Trying kernel                     3.2.2-030202-generic  [FAILED]
Trying kernel                    3.1.10-030110-generic  [FAILED]
Trying kernel                    3.0.18-030018-generic  [FAILED]
Trying kernel                  2.6.39-02063904-generic  [FAILED]
Trying kernel                         2.6.38-8-generic  [OK]
Trying kernel                        2.6.38-13-generic  [OK]
Trying kernel                        2.6.38-12-generic  [OK]
Trying kernel                        2.6.38-11-generic  [OK]
Trying kernel                        2.6.38-10-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                        2.6.31-22-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [FAILED]
Trying kernel                    2.6.24-020624-generic  [FAILED]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
.gitignore
Makefile
include/linux/compat_autoconf.h [deleted file]
scripts/gen-compat-autoconf.sh [new file with mode: 0755]
scripts/gen-compat-config.sh [new file with mode: 0755]