diff options
author | Mikko Rapeli <mikko.rapeli@bmw.de> | 2019-07-12 14:26:47 +0300 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-07-12 11:14:37 -0700 |
commit | 852f2d9d2630108e7bfe12f0b6e6449c2893f6e9 (patch) | |
tree | 4da93b7fd5729df84975932f5282ca06fb2503ea /meta-networking/recipes-support/uftp | |
parent | e95bde8be7b8c8022e3dd75b5c2053b49c5c8dc3 (diff) | |
download | meta-openembedded-contrib-852f2d9d2630108e7bfe12f0b6e6449c2893f6e9.tar.gz |
protobuf: fix ptest compilation with hardening flags
Build fails when conf/local.conf has both hardening and ptests enabled:
require conf/distro/include/security_flags.inc
DISTRO_FEATURES_append = " ptest"
Use CXXFLAGS for examples too to avoid hardening warnings
about using O0 optimization.
Then change linking order to avoid linker failures:
aarch64-poky-linux-g++ -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=form
at-security -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security
--sysroot=/home/builder/src/base/build/tmp/work/aarch64-poky-linux/protobuf/3.8.0-r0/recipe-sysroot
-O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/builder/src/base/build/tmp/work/aar
ch64-poky-linux/protobuf/3.8.0-r0=/usr/src/debug/protobuf/3.8.0-r0 -fdebug-pre
fix-map=/home/builder/src/base/build/tmp/work/aarch64-poky-linux/protobuf/3.8.0-r0=/usr/src/debug/pr
otobuf/3.8.0-r0 -fdebug-prefix-map=/home/builder/src/base/build/tmp/work/aarch6
4-poky-linux/protobuf/3.8.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/builder/src
/base/build/tmp/work/aarch64-poky-linux/protobuf/3.8.0-r0/recipe-sysroot-native= -fvisibility-inlin
es-hidden -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now -fstack-p
rotector-strong -Wl,-z,relro,-z,now -pthread -I/home/builder/src/base/build/tmp/work/aarch64-poky-linux/p
rotobuf/3.8.0-r0/git/src -L/home/builder/src/base/build/tmp/work/aarch64-poky-linux/protobuf/3.8.0-r
0/git/src/.libs -L/home/builder/src/base/build/tmp/work/aarch64-poky-linux/protobuf/3.8.0-r0/re
cipe-sysroot/usr/lib -lprotobuf ../src/google/protobuf/.libs/timestamp.pb.o add_person.cc addressbook.pb.cc -
o add_person_cpp
/home/builder/src/base/build/tmp/work/aarch64-poky-linux/protobuf/3.8.0-r0/recipe-sysroot-native/usr
/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.1.0/ld: ../src/google/protobuf/.libs/timestamp.pb.o: in function `google::protobuf::Timestamp::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const':
/usr/src/debug/protobuf/3.8.0-r0/git/src/google/protobuf/timestamp.pb.cc:279: undefined reference to `google::protobuf::internal::WireFormat::SerializeUnknownFields(google::protobuf::UnknownFieldSet const&, google::protobuf::io::CodedOutputStream*)'
Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support/uftp')
0 files changed, 0 insertions, 0 deletions