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

Getting -m64 at the right time and place.



Dear mentors,

I am working on a package that, when unmodified, fails on 32bits arches because
-m64 is in the CFLAGS. We solved the problem by patching the configure file,
but of course this breaks when new upstream releases refresh it with newer
versions of autoconf.

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?

The package is "maq", our current patch is on svn.debian.org and
patch-tracking.debian.net, and the Upstream sources can be browsed on
Sourceforge:

http://packages.qa.debian.org/m/maq.html
http://patch-tracking.debian.net/patch/series/view/maq/0.6.7-1/10_prevent_-64_option.patch
http://maq.svn.sourceforge.net/viewvc/maq/trunk/maq/configure.ac?revision=672&view=markup

The modification I consider is the following:

--- a/configure.ac
+++ b/configure.ac
@@ -23,10 +23,6 @@ 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])]);;
 esac
 AC_ARG_ENABLE(experimental, [  --enable-experimental   enable experimental features],
                          [ext_CFLAGS="${ext_CFLAGS} -DMAQ_SHOW_EXPERIMENTAL"], [])

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. How can we have
a configure file that does the right thing: -m64 only on 64-bit architectures?

Have a nice day,

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


Reply to: