[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Getting -m64 at the right time and place.



Le Sat, Nov 15, 2008 at 08:37:49AM +0100, Mike Hommey a écrit :
> On Sat, Nov 15, 2008 at 12:37:55PM +0900, Charles Plessy wrote:
> > However, as I do not understand the purpose of -D_FILE_OFFSET_BITS=64, I am
> > worried it would be breaking maq on 32-bit arches to remove it.
> 
> It will only break its ability to read large files (> 2GB). That is what
> _FILE_OFFSET_BITS is for.

Le Sat, Nov 15, 2008 at 04:52:52PM +0900, Paul Wise a écrit :
> 
> > I am now exploring the possibility of making one patch modifying configure.ac,
> > and another that would be easy to refresh with autoreconf. But before doing so
> > I would like to hear your advices: isn't this -m64 micromanaging useless and
> > should I propose Upstream to give full freedom to Autoconf to deal with the
> > issue?
> 
> Send a patch upstream and educate them why this is a bad idea.

Dear Mike and Paul,

thanks a lot for your answers.

Maq is likely to have to access files bigger than 2Gb sometimes, so I probably
should not remove -D_FILE_OFFSET_BITS=64.

Would the following patch make sense?

diff --git a/configure.ac b/configure.ac
index ad2f1e6..4f2993a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,10 +23,7 @@ case "${host_cpu}-${host_os}" in
                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [ext_CFLAGS="-m64"], []);;
        esac;;
   *)
-    AC_MSG_CHECKING([if gcc accepts -m64])
-    CFLAGS="-m64"
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [ext_CFLAGS="-m64"; AC_MSG_RESULT([yes])],
-                                         [ext_CFLAGS="-D_FILE_OFFSET_BITS=64"; AC_MSG_RESULT([no])]);;
+    ext_CFLAGS="-D_FILE_OFFSET_BITS=64";;
 esac
 AC_ARG_ENABLE(experimental, [  --enable-experimental   enable experimental features],
                          [ext_CFLAGS="${ext_CFLAGS} -DMAQ_SHOW_EXPERIMENTAL"], [])

Have a nice day,

-- 
Charles Plessy
Debian Med packaging team,
Tsurumi, Kanagawa, Japan


Reply to: