compat: fix compile errors when assembly is built into modules

Upstream commit a04996415774e7bfe7bd95ef0013b13fd12eb6b2

On powerpc, modules can be compiled and linked with an assembly file, adding
missing symbols that the compiler references when using -Os.

== ckmake-report.log ==

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.50              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.33              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.17              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.5               [  OK  ]
24  3.7.0               [  OK  ]

real    0m33.803s
user    11m24.519s
sys     3m39.690s

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: do not access default_ethtool_ops

Upstream commit 670c4a3d46797a92fd15d201e5d9859393c7b2b6

&default_ethtool_ops is not exported in kernel 3.7.4 and earlier and it
should be be accessed from compat.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: ckmake: make return code 2 is error

Upstream commit 9f0c7145e86d00246363c25d0f063994e17dd995

If make returns 2 it should be treat as an error and not as ok.
The documentation says 2 is returned if make encountered an error:
https://www.gnu.org/software/make/manual/html_node/Running.html

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: ckmake: remove lots of warning spam for the log

Upsteam commit b24d81b3794854cb7bbcbcf25fac697de263971a

Set the environment variable KCFLAGS = "-Wno-unused-but-set-variable"
to remove lots of spam from the log.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: ckmake: do not start all build at the same time

Upstream commit 63f5334d3cf14334a948e60154d2854f38100b4a

When all builds are started at the same time this causes problems like,
because all threads want to access the same file.

In the compat-drivers build this resulted in this error for some threads:
./scripts/gen-compat-autoconf.sh: /usr/bin/env: bad interpreter: Text file busy

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add efi_enabled()

Upstream commit 3e1afb65a6fa6d964c1bbc9b2f4fc89c31d42d1a

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: netdev_set_default_ethtool_ops() is not in kernel 3.7.5

Upstream commit 726d9b2ca3f75cba9f1d03e519c2b2e8bf6523a7

netdev_set_default_ethtool_ops() should be added to compat for every
3.7.X series kernel as it is also not in 3.7.5.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: check if efi_enabled() was already backported

Upstream commit 28c1dde0df2c9e01e8d57a774687734ed21bd208

efi_enabled() gets backported to older kernel versions and if this is
the case compat should not try to do the same.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: deactivate netdev_set_default_ethtool_ops() for some 3.7 kernels

Upstream commit 4971ae5e2075a284ff36a68cab7c3f407a852801

netdev_set_default_ethtool_ops() was backported in 3.7.8 and compat
should not ship it on any more recent versions any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>