* [PATCH 0/2] Two small ./configure fixes
@ 2014-03-06 17:41 Stefan Hajnoczi
2014-03-06 17:41 ` [PATCH 1/2] Honor ./configure --cc= option Stefan Hajnoczi
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2014-03-06 17:41 UTC (permalink / raw)
To: fio; +Cc: axboe
My hopes of cross-compiling fio for Windows were dashed when I realized
pthreads is needed (I guess only Cygwin supports it, not mingw).
On the plus side, here are two small fixes for ./configure.
Stefan Hajnoczi (2):
Honor ./configure --cc= option
Detect Windows operating system in ./configure
configure | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--
1.8.5.3
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/2] Honor ./configure --cc= option
2014-03-06 17:41 [PATCH 0/2] Two small ./configure fixes Stefan Hajnoczi
@ 2014-03-06 17:41 ` Stefan Hajnoczi
2014-03-06 17:41 ` [PATCH 2/2] Detect Windows operating system in ./configure Stefan Hajnoczi
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2014-03-06 17:41 UTC (permalink / raw)
To: fio; +Cc: axboe
The cc variable is assigned before parsing command-line options. This
effectively ignores the ./configure --cc= option. Move the cc variable
assigned below option parsing.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
configure | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 4a8d352..7b1d79a 100755
--- a/configure
+++ b/configure
@@ -130,9 +130,6 @@ output_sym() {
targetos=""
cpu=""
-cross_prefix=${cross_prefix-${CROSS_COMPILE}}
-cc="${CC-${cross_prefix}gcc}"
-
# default options
show_help="no"
exit_val=0
@@ -175,6 +172,9 @@ if test "$show_help" = "yes" ; then
exit $exit_val
fi
+cross_prefix=${cross_prefix-${CROSS_COMPILE}}
+cc="${CC-${cross_prefix}gcc}"
+
if check_define __ANDROID__ ; then
targetos="Android"
elif check_define __linux__ ; then
--
1.8.5.3
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/2] Detect Windows operating system in ./configure
2014-03-06 17:41 [PATCH 0/2] Two small ./configure fixes Stefan Hajnoczi
2014-03-06 17:41 ` [PATCH 1/2] Honor ./configure --cc= option Stefan Hajnoczi
@ 2014-03-06 17:41 ` Stefan Hajnoczi
2014-03-06 18:14 ` [PATCH 0/2] Two small ./configure fixes Sitsofe Wheeler
2014-03-06 21:32 ` Jens Axboe
3 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2014-03-06 17:41 UTC (permalink / raw)
To: fio; +Cc: axboe
We should not rely on `uname -s` if we ever want cross-compiling to
work, so detect _WIN32.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
configure | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure b/configure
index 7b1d79a..63aa02d 100755
--- a/configure
+++ b/configure
@@ -184,6 +184,8 @@ elif check_define __OpenBSD__ ; then
elif check_define __sun__ ; then
targetos='SunOS'
CFLAGS="$CFLAGS -D_REENTRANT"
+elif check_define _WIN32 ; then
+ targetos='CYGWIN'
else
targetos=`uname -s`
fi
--
1.8.5.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] Two small ./configure fixes
2014-03-06 17:41 [PATCH 0/2] Two small ./configure fixes Stefan Hajnoczi
2014-03-06 17:41 ` [PATCH 1/2] Honor ./configure --cc= option Stefan Hajnoczi
2014-03-06 17:41 ` [PATCH 2/2] Detect Windows operating system in ./configure Stefan Hajnoczi
@ 2014-03-06 18:14 ` Sitsofe Wheeler
2014-03-06 21:20 ` Jens Axboe
2014-03-06 21:32 ` Jens Axboe
3 siblings, 1 reply; 8+ messages in thread
From: Sitsofe Wheeler @ 2014-03-06 18:14 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: fio, axboe
On Thu, Mar 06, 2014 at 06:41:57PM +0100, Stefan Hajnoczi wrote:
> My hopes of cross-compiling fio for Windows were dashed when I realized
> pthreads is needed (I guess only Cygwin supports it, not mingw).
I think mingw supports pthreads using winpthreads (see
http://thread.gmane.org/gmane.comp.storage.fio/97/focus=149 ). Does fio
even compile with pure cygwin gcc (rather than mingw)? I think I had a
brief try and it complained about conflicting headers...
--
Sitsofe | http://sucs.org/~sits/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] Two small ./configure fixes
2014-03-06 18:14 ` [PATCH 0/2] Two small ./configure fixes Sitsofe Wheeler
@ 2014-03-06 21:20 ` Jens Axboe
2014-03-06 21:22 ` Bruce Cran
0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2014-03-06 21:20 UTC (permalink / raw)
To: Sitsofe Wheeler, Stefan Hajnoczi; +Cc: fio, bcran
On 03/06/2014 11:14 AM, Sitsofe Wheeler wrote:
> On Thu, Mar 06, 2014 at 06:41:57PM +0100, Stefan Hajnoczi wrote:
>> My hopes of cross-compiling fio for Windows were dashed when I realized
>> pthreads is needed (I guess only Cygwin supports it, not mingw).
>
> I think mingw supports pthreads using winpthreads (see
> https://urldefense.proofpoint.com/v1/url?u=http://thread.gmane.org/gmane.comp.storage.fio/97/focus%3D149&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=3JMVyziIyZtZ5cv9eWNLwQ%3D%3D%0A&m=UhTi1rWRqSE0ZT%2B5li5HCwkSWuK8mUG1CqLBrQTtHU0%3D%0A&s=28594f27ce732489c3620148921f10705aa70e811eeaf337622bc397dae3f21d ). Does fio
> even compile with pure cygwin gcc (rather than mingw)? I think I had a
> brief try and it complained about conflicting headers...
Probably want to pull Bruce into this thread.
--
Jens Axboe
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH 0/2] Two small ./configure fixes
2014-03-06 21:20 ` Jens Axboe
@ 2014-03-06 21:22 ` Bruce Cran
2014-03-07 8:31 ` Stefan Hajnoczi
0 siblings, 1 reply; 8+ messages in thread
From: Bruce Cran @ 2014-03-06 21:22 UTC (permalink / raw)
To: Jens Axboe, Sitsofe Wheeler, Stefan Hajnoczi; +Cc: fio@vger.kernel.org
The Windows build of fio assumes only a minimal set of POSIX headers is available, so trying to build using Cygwin's GCC and its full set is probably not going to work. Why do you not want to use MinGW GCC?
--
Bruce
-----Original Message-----
From: Jens Axboe [mailto:axboe@fb.com]
Sent: Thursday, March 6, 2014 2:20 PM
To: Sitsofe Wheeler; Stefan Hajnoczi
Cc: fio@vger.kernel.org; Bruce Cran
Subject: Re: [PATCH 0/2] Two small ./configure fixes
On 03/06/2014 11:14 AM, Sitsofe Wheeler wrote:
> On Thu, Mar 06, 2014 at 06:41:57PM +0100, Stefan Hajnoczi wrote:
>> My hopes of cross-compiling fio for Windows were dashed when I
>> realized pthreads is needed (I guess only Cygwin supports it, not mingw).
>
> I think mingw supports pthreads using winpthreads (see
> https://urldefense.proofpoint.com/v1/url?u=http://thread.gmane.org/gma
> ne.comp.storage.fio/97/focus%3D149&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r
> =3JMVyziIyZtZ5cv9eWNLwQ%3D%3D%0A&m=UhTi1rWRqSE0ZT%2B5li5HCwkSWuK8mUG1CqLBrQTtHU0%3D%0A&s=28594f27ce732489c3620148921f10705aa70e811eeaf337622bc397dae3f21d ). Does fio even compile with pure cygwin gcc (rather than mingw)? I think I had a brief try and it complained about conflicting headers...
Probably want to pull Bruce into this thread.
--
Jens Axboe
This e-mail (and any attachments) is confidential and may be privileged. Any unauthorized use, copying, disclosure or dissemination of this communication is prohibited. If you are not the intended recipient, please notify the sender immediately and delete all copies of the message and its attachments.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] Two small ./configure fixes
2014-03-06 21:22 ` Bruce Cran
@ 2014-03-07 8:31 ` Stefan Hajnoczi
0 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2014-03-07 8:31 UTC (permalink / raw)
To: Bruce Cran; +Cc: Jens Axboe, Sitsofe Wheeler, fio@vger.kernel.org
On Thu, Mar 06, 2014 at 09:22:30PM +0000, Bruce Cran wrote:
> The Windows build of fio assumes only a minimal set of POSIX headers is available, so trying to build using Cygwin's GCC and its full set is probably not going to work. Why do you not want to use MinGW GCC?
I want to cross-compile using mingw, just wasn't aware of winpthreads.
Not sure if anyone actually wants to use Cygwin :-).
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] Two small ./configure fixes
2014-03-06 17:41 [PATCH 0/2] Two small ./configure fixes Stefan Hajnoczi
` (2 preceding siblings ...)
2014-03-06 18:14 ` [PATCH 0/2] Two small ./configure fixes Sitsofe Wheeler
@ 2014-03-06 21:32 ` Jens Axboe
3 siblings, 0 replies; 8+ messages in thread
From: Jens Axboe @ 2014-03-06 21:32 UTC (permalink / raw)
To: Stefan Hajnoczi, fio
On 03/06/2014 10:41 AM, Stefan Hajnoczi wrote:
> My hopes of cross-compiling fio for Windows were dashed when I realized
> pthreads is needed (I guess only Cygwin supports it, not mingw).
>
> On the plus side, here are two small fixes for ./configure.
>
> Stefan Hajnoczi (2):
> Honor ./configure --cc= option
> Detect Windows operating system in ./configure
Thanks, applied both.
--
Jens Axboe
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-03-07 8:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-06 17:41 [PATCH 0/2] Two small ./configure fixes Stefan Hajnoczi
2014-03-06 17:41 ` [PATCH 1/2] Honor ./configure --cc= option Stefan Hajnoczi
2014-03-06 17:41 ` [PATCH 2/2] Detect Windows operating system in ./configure Stefan Hajnoczi
2014-03-06 18:14 ` [PATCH 0/2] Two small ./configure fixes Sitsofe Wheeler
2014-03-06 21:20 ` Jens Axboe
2014-03-06 21:22 ` Bruce Cran
2014-03-07 8:31 ` Stefan Hajnoczi
2014-03-06 21:32 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox