On 07/09/2017 09:02 PM, Gregg Reynolds wrote: > On Jul 9, 2017 2:37 PM, "Mats Wichmann" <mats at wichmann.us> wrote: > > On 07/09/2017 12:59 AM, Natalia Theologou wrote: > >> scons TARGET_OS=linux TARGET_ARCH=arm TARGET_TRANSPORT=IP SECURED=0 > RELEASE=1 TC_PREFIX=arm-none-linux-gnueabi- TC_PATH=/opt/gcc-arm-none- > eabi-6-2017-q2-update/arm-none-eabi/bin > > > Hmmm.... > > somewhere in the bowels of our build scripts, if we're targeting linux: > > if 'gcc' in compiler: > thread_env.AppendUnique(CFLAGS = ['-Wall']) > if target_os not in ['android']: > thread_env.AppendUnique(CFLAGS = ['-pthread']) > thread_env.AppendUnique(LIBS = ['pthread']) > > > well there's part of the problem. a good build system would feature test > for pthreads, rather than assuming it's there just because the target is > not android. this is atrocious code.
sadly, it HAS a test. which fails, so we do know. that result didn't get taken into account in the place I posted the snip from. organic project growth and all that. yes, you're right that the number of places where there are platform-based assumptions which are just encoded (if foo in ['linux', 'android', 'tizen']... Huh?), and not commented, are a weakness. Been trying to sneak up on that problem but it's really slow going. === .sconf_temp/conftest_1.c:7:7: error: #error POSIX Threads support not available # error POSIX Threads support not available ^~~~~ scons: Configure: no