From: Nick Clifton <nickc@redhat.com>
To: bonzini@gnu.org, aoliva@redhat.com
Cc: binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: RFC: Adding a check to the top level configure script for a binary-mounted cygwin-hosted build directory
Date: Thu, 24 May 2007 09:47:00 -0000 [thread overview]
Message-ID: <46555F35.40003@redhat.com> (raw)
In-Reply-To: <46543BE2.1010209@lu.unisi.ch>
[-- Attachment #1: Type: text/plain, Size: 571 bytes --]
Hi Paolo, Hi Alex,
> I haven't looked at the patch yet, but as an aside, I think this should
> also go into the main autoconf distribution; there is no reason why
> somebody should build under a text-mode mounted directory.
I agree, I think it would be very good to have this check available in
the main autoconf sources.
I am attaching an updated patch which fixes a couple of problems
uncovered in the first version:
* I was not escaping the square brackets in the awk script.
* The check for the "binmode" string needed to be stricter.
Cheers
Nick
[-- Attachment #2: pr4334.patch.2 --]
[-- Type: text/plain, Size: 1690 bytes --]
Index: configure.ac
===================================================================
RCS file: /cvs/src/src/configure.ac,v
retrieving revision 1.10
diff -c -3 -p -r1.10 configure.ac
*** configure.ac 21 Mar 2007 20:11:06 -0000 1.10
--- configure.ac 24 May 2007 09:45:14 -0000
*************** case "${host}" in
*** 965,970 ****
--- 965,971 ----
host_makefile_frag="config/mh-djgpp"
;;
*-cygwin*)
+ ACX_CHECK_CYGWIN_BINMOUNTED_BUILDDIR
host_makefile_frag="config/mh-cygwin"
;;
*-mingw32*)
Index: config/acx.m4
===================================================================
RCS file: /cvs/src/src/config/acx.m4,v
retrieving revision 1.25
diff -c -3 -p -r1.25 acx.m4
*** config/acx.m4 26 Mar 2007 15:38:25 -0000 1.25
--- config/acx.m4 24 May 2007 09:45:14 -0000
*************** AC_DEFUN([ACX_BUGURL],[
*** 597,599 ****
--- 597,618 ----
AC_SUBST(REPORT_BUGS_TO)
AC_SUBST(REPORT_BUGS_TEXI)
])
+
+ dnl ####
+ dnl # ACX_CHECK_CYGWIN_BINMOUNTED_BUILDDIR
+ dnl # On Cygwin hosts, check that the build directory is mounted in
+ dnl # binmode as builds will not work if it is mounted in textmode.
+ dnl # See binutils PR 4334 for more details about why textmode is a problem.
+ AC_DEFUN([ACX_CHECK_CYGWIN_BINMOUNTED_BUILDDIR],[
+ AC_MSG_CHECKING([build directory to see if it is mounted in binmode])
+ build_dir=`pwd`
+ build_dir_mount_point=`df ${build_dir} | awk '/[[0-9]]%/{print $NF;}'`
+ is_binmode=`mount | grep "${build_dir_mount_point} " | grep binmode`
+ if test $? == 0 ; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([The build directory is not mounted in binmode])
+ fi
+ ])
+
\ No newline at end of file
next prev parent reply other threads:[~2007-05-24 9:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-23 12:52 Nick Clifton
2007-05-23 13:04 ` Paolo Bonzini
2007-05-24 9:47 ` Nick Clifton [this message]
2007-05-24 14:27 ` DJ Delorie
2007-05-24 15:26 ` Nick Clifton
2007-05-24 15:43 ` DJ Delorie
2007-05-25 9:47 ` Corinna Vinschen
2007-05-25 12:15 ` Eric Blake
2007-05-24 18:26 ` Eli Zaretskii
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=46555F35.40003@redhat.com \
--to=nickc@redhat.com \
--cc=aoliva@redhat.com \
--cc=binutils@sourceware.org \
--cc=bonzini@gnu.org \
--cc=gdb-patches@sourceware.org \
/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