From 9008705d02ceb6532f9dcbee12b1c481a1312bbe Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 25 Jan 2010 13:36:46 +0100 Subject: Add a sanity check to verify that the system() command works. Pre 2.6.23 Linux kernels have a limit on the environment size that can be passed to a forked process. We quite easily overstep this boundary when building big projects on Symbian, and since we depend on running the system() command, this causes the build to fail. This commit tests that system() can be successfully run. --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 1510bfd..8f2d8a4 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -129,3 +129,13 @@ symbianresources.dependency_type = TYPE_C symbianresources.CONFIG = no_link QMAKE_EXTRA_COMPILERS += symbianresources + +# Pre 2.6.23 Linux kernels have a limit on the environment size that can be passed to +# a forked process. We quite easily overstep this boundary when building big projects +# on Symbian, and since we depend on running the system() command, this causes the build +# to fail. Test here that system() can be successfully run. It is important that this +# check happens as late as possible, otherwise it will not be caught. +execve_sanity_test = $$system("echo testing") +!contains(execve_sanity_test, "testing") { + error("Running system() failed. Maybe your kernel is too old? (Linux kernels need at least version 2.6.23)") +} -- cgit v0.12