From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] open_posix_testsuite: Fix compilation issues
Date: Tue, 17 Mar 2020 21:52:05 +0100 [thread overview]
Message-ID: <20200317205205.GA23447@yuki.lan> (raw)
In-Reply-To: <1584430031-47227-1-git-send-email-zou_wei@huawei.com>
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
next prev parent reply other threads:[~2020-03-17 20:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-17 7:27 [LTP] [PATCH] open_posix_testsuite: Fix compilation issues Zou Wei
2020-03-17 8:21 ` Li Wang
2020-03-17 9:07 ` Yang Xu
2020-03-17 9:32 ` Li Wang
2020-03-17 11:30 ` Enji Cooper
2020-03-17 20:52 ` Cyril Hrubis [this message]
2020-03-19 1:26 ` [LTP] 答复: " Zouwei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200317205205.GA23447@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox