[LTP] [PATCH] open_posix_testsuite: Fix compilation issues

Cyril Hrubis chrubis@suse.cz
Tue Mar 17 21:52:05 CET 2020


Hi!
> Fix compilation issues:
> 1. Add the '-lpthread -lrt -lm' config into LDFLAGS

Just linking with -lpthread is not correct way how to compile pthread
programs on Linux, we have to add -pthread to both CLFAGS and LDFLAGS.

I guess that we should also default to the output of getconf for pthread
CFLAGS and LDFLAGS if available[1]. Unfortunately it looks like this is not
implemented on Linux yet.

So if getconf fails we will have to probably fallback to per-OS table of
CFLAGS and LDFLAGS.

[1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html#tagtcjh_25

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list