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

Re: [plugwash@p10link.net: Bug#660309: tophat: broken code in configure script for determining CFLAGS]



Hi Andreas,

On Sat, Feb 18, 2012 at 2:42 AM, Andreas Tille <andreas@an3as.eu> wrote:
> Hi Carlos,
>
> just for the case you have not yet realised that maintainers should read
> the mailing list
>
>   http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging
>

I just enabled mail delivery on this list. I forgot to do it after I
started packaging.

> to recieve such bug reports.  You can do a git pull to fetch the changes
> I did regarding this bug.  I have no idea whether you are planing more
> changes or if I should just upload.  It would be great if you could
> foreward this problem to upstream.
>
> Just tell me on-list if you want the package sponsored or you will do
> some further changes.
>

I think we can upload. I will make sure to forward this issue to
upstream and see if this patch or a similar solution can be included
in next version.

Thanks for taking care of this. I'll be paying attention to
debian-med-packaging to catch any further issue.

-Carlos

> Kind regards
>
>       Andreas.
>
> ----- Forwarded message from peter green <plugwash@p10link.net> -----
>
> Date: Sat, 18 Feb 2012 03:37:47 +0000
> From: peter green <plugwash@p10link.net>
> To: Debian Bug Tracking System <submit@bugs.debian.org>
> Subject: Bug#660309: tophat: broken code in configure
>        script for determining CFLAGS
> X-Debian-PR-Message: report 660309
> X-Debian-PR-Package: tophat
> X-Debian-PR-Keywords: patch
> X-Debian-PR-Source: tophat
> X-Spam_score: -2.3
>
> Package: tophat
> Version: 1.4.1-1
> Severity: serious
> tags: patch
>
> The configure.ac file in your package contains code to determine c
> compiler flags based on architecture. Unfortunately this code is
> horriblly broken.
>
> On i386 the configure script uses -march=i686. This is not acceptable
> in debian as debian supports (at least in theory) processors down to
> the 486.
>
> On all other debian architectures the configure script falls into a
> broken* fallback test for -m64. This test always passes causing the
> build to use -m64. This is tolerable (but pointless) on amd64 and
> kfreebsd-amd64 and breaks the build on all other architectures.
>
> Even more strangely the code seems to be setup to define
> _FILE_OFFSET_BITS=64 on unknown architectures that don't support -m64
> (though due to the broken -m64 test that codepath is never used) but
> not on x86.
>
> The attatched patch simply removes the broken checking code and leaves
> EXT_CFLAGS empty on all architectures. I have tested that with this
> patch the package builds on kfreebsd-i386.
>
> * I have not determined exactly how it is broken but it seems to be
> passing on all architectures. My suspsicion is the CFLAGS set before
> the test aren't actually being used.
>
> Description: Remove crazy cflag determination code
>  This code was broken (for example the test for -m64 plain doesn't work)
>  and does the wrong thing (uses -m686 on x86) for debian. Strip it out
>  completely
>
> Author: Peter Michael Green <plugwash@p10link.net)
>
> ---
> The information above should follow the Patch Tagging Guidelines, please
> checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
> are templates for supplementary fields that you might want to add:
>
> Origin: <vendor|upstream|other>, <url of original patch>
> Bug: <url in upstream bugtracker>
> Bug-Debian: http://bugs.debian.org/<bugnumber>
> Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
> Forwarded: <no|not-needed|url proving that it has been forwarded>
> Reviewed-By: <name and email of someone who approved the patch>
> Last-Update: <YYYY-MM-DD>
>
> --- tophat-1.4.1.orig/configure.ac
> +++ tophat-1.4.1/configure.ac
> @@ -75,26 +75,6 @@ generic_CFLAGS="-Wall -Wno-strict-aliasi
>  ext_CFLAGS=""
>  debug_CFLAGS="-g"
>  #echo "${host_cpu}-${host_os}"
> -case "${host_cpu}-${host_os}" in
> -   i*86-*linux*)
> -    ext_CFLAGS="-march=i686";;
> -   i*86-darwin*)
> -    AC_ARG_ENABLE(universal, [  --enable-universal      enable universal binary (Intel Apple only)],
> -                                 [is_uni=1], [is_uni=0])
> -       case $is_uni in
> -         1) CFLAGS="-m64"
> -            AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
> -                                                  [ext_CFLAGS="-arch x86_64 -arch i386 -arch ppc64 -arch ppc"],
> -                                                  [ext_CFLAGS="-arch i386 -arch ppc"]);;
> -         0) CFLAGS="-m64"
> -                AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [ext_CFLAGS="-arch x86_64"], []);;
> -       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(intel64,      [  --enable-intel64        optimize for Intel64 CPU such as Xeon and Core2],
>                          [ext_CFLAGS="${ext_CFLAGS} -mtune=nocona"], [])
>
> _______________________________________________
> Debian-med-packaging mailing list
> Debian-med-packaging@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging
>
>
> ----- End forwarded message -----
>
> --
> http://fam-tille.de


Reply to: