sdk: fix building external modules when CONFIG_STACK_VALIDATION=y
authorYousong Zhou <yszhou4tech@gmail.com>
Thu, 25 Apr 2019 05:26:23 +0000 (05:26 +0000)
committerYousong Zhou <yszhou4tech@gmail.com>
Fri, 26 Apr 2019 13:05:39 +0000 (13:05 +0000)
commita9f6fceb4255ba847415cf82035f5fde3dc0ce2a
treef3f73334d0273c51ec3f73d555bc763767a78681
parent40de4c038a5c9e452dcaa4939c4ed167e9db50d9
sdk: fix building external modules when CONFIG_STACK_VALIDATION=y

The option is at the moment enabled for x86/64.  The selection chain
should be

config RETPOLINE
  select STACK_VALIDATION if HAVE_STACK_VALIDATION
config x86
  select HAVE_STACK_VALIDATION            if X86_64

cryptdev-linux:

make[4]: Entering directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10'
make -C /store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.113 M=/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10 ARCH=x86 CROSS_COMPILE=x86_64-openwrt-linux-musl- modules
make[5]: Entering directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.113'
make[6]: *** No rule to make target '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10/ioctl.o', needed by '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10/cryptodev.o'.  Stop.
Makefile:1533: recipe for target '_module_/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10' failed

Open vSwitch intree kmods

make[7]: Entering directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux'
make -C /store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.111 ARCH=x86 M=/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux modules
make[8]: Entering directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.111'
make[9]: *** No rule to make target 'tools/objtool/objtool', needed by '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux/actions.o'.  Stop.
Makefile:1533: recipe for target '_module_/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux' failed
make[8]: *** [_module_/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux] Error 2
make[8]: Leaving directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.111'

Reference: builddeb: include objtool binary in headers package, https://patchwork.kernel.org/patch/9014071/
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
target/sdk/Makefile