mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
It was discovered by Martin Jansa that the sysroot poisoning errors are not functioning as they should. Due to either a bug from day 1 or a bad rebase, -Werror=poison-system-directories is only passed when GCC is invoking _just_ the preprocessor, not the compiler. Demonstrate this by expanding the test case to exercise not just $CPP, but also $CC for both C and C++ languages. This improved test case now fails. (From OE-Core rev: 3ff9e67e278f6548952592675fc88ba41d1a8e96) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
21 lines
729 B
BlitzBasic
21 lines
729 B
BlitzBasic
SUMMARY = "Sysroot poisoning test"
|
|
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
|
|
|
LICENSE = "MIT"
|
|
|
|
inherit nopackages
|
|
|
|
# This test confirms that compiling code that searches /usr/include for headers
|
|
# will result in compiler errors. This recipe should will fail to build and
|
|
# oe-selftest has a test that verifies that.
|
|
do_compile() {
|
|
bbnote Testing preprocessor
|
|
echo "int main(int argc, char** argv) {}" | ${CPP} -I/usr/include -
|
|
bbnote Testing C compiler
|
|
echo "int main(int argc, char** argv) {}" | ${CC} -x c -I/usr/include -
|
|
bbnote Testing C++ compiler
|
|
echo "int main(int argc, char** argv) {}" | ${CC} -x c++ -I/usr/include -
|
|
}
|
|
|
|
EXCLUDE_FROM_WORLD = "1"
|