From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26546 invoked by alias); 24 May 2007 09:47:39 -0000 Received: (qmail 26524 invoked by uid 22791); 24 May 2007 09:47:36 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 24 May 2007 09:47:29 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l4O9lRbx010111; Thu, 24 May 2007 05:47:27 -0400 Received: from pobox.fab.redhat.com (pobox.fab.redhat.com [10.33.63.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l4O9lQHU022299; Thu, 24 May 2007 05:47:26 -0400 Received: from [10.33.6.10] (vpn-6-10.fab.redhat.com [10.33.6.10]) by pobox.fab.redhat.com (8.13.1/8.13.1) with ESMTP id l4O9lPbl010705; Thu, 24 May 2007 05:47:25 -0400 Message-ID: <46555F35.40003@redhat.com> Date: Thu, 24 May 2007 09:47:00 -0000 From: Nick Clifton User-Agent: Thunderbird 1.5.0.10 (X11/20070301) MIME-Version: 1.0 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 References: <46543BE2.1010209@lu.unisi.ch> In-Reply-To: <46543BE2.1010209@lu.unisi.ch> Content-Type: multipart/mixed; boundary="------------020200060303020601090501" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-05/txt/msg00362.txt.bz2 This is a multi-part message in MIME format. --------------020200060303020601090501 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 571 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 --------------020200060303020601090501 Content-Type: text/plain; name="pr4334.patch.2" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pr4334.patch.2" Content-length: 1690 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 --------------020200060303020601090501--