Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-lisp
Navigation:
Lists: gentoo-lisp: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: yann@...
From: "Marijn Schouten (hkBst)" <hkBst@g.o>
Subject: lush: tricks concerning CFLAGS and target architecture
Date: Mon, 24 Sep 2007 15:15:21 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Yann,

I write to you concerning Lush as I couldn't find an email address
specifically for it...

I would like you to consider dropping all the tricks concerning CFLAGS and
target architecture that are now employed by Lush. Do you really know what
CFLAGS are acceptable on a dozen arches? Apparently not as the current default
is warned against if you use Mandriva.

"
** IMPORTANT NOTE to Mandrake 9.2 Users: before compiling, edit
lush/src/Makefile and replace "-O3" by "-O2" in the line that
begins with "OPTS=" or Lush may crash.
"

I guess that is because that version of Mandriva uses >=gcc-4, so that warning
is pathetically ill-targeted.

I am currently using the following patch to fix some of the issues, but I am
sure you is easy enough for you to rip out the whole of AC_DEFUN(AC_CC_OPTIMIZE.

- --- aclocal.m4.old      2007-09-18 19:07:48.000000000 +0200
+++ aclocal.m4  2007-09-18 19:15:29.000000000 +0200
@@ -102,49 +102,49 @@
         [ac_cpu=$withval])

    AC_ARG_VAR(OPTS, [Optimization flags for all compilers.])
- -   if test x${OPTS+set} = xset ; then
- -     saved_CFLAGS="$CFLAGS"
- -     CFLAGS=
- -     for opt in $saved_CFLAGS ; do
- -       case $opt in
- -         -O*|-g*) ;;
- -         *) CFLAGS="$CFLAGS $opt" ;;
- -       esac
- -     done
- -     AC_MSG_CHECKING([user provided debugging flags])
+#   if test x${OPTS+set} = xset ; then
+#     saved_CFLAGS="$CFLAGS"
+#     CFLAGS=
+#     for opt in $saved_CFLAGS ; do
+#       case $opt in
+#         -O*|-g*) ;;
+#         *) CFLAGS="$CFLAGS $opt" ;;
+#       esac
+#     done
+#     AC_MSG_CHECKING([user provided debugging flags])
      AC_MSG_RESULT($OPTS)
- -   else
- -     saved_CFLAGS="$CFLAGS"
- -     CFLAGS=
- -     for opt in $saved_CFLAGS ; do
- -       case $opt in
- -         -O*) ;;
- -         -g*) OPTS="$OPTS $opt" ;;
- -         *) CFLAGS="$CFLAGS $opt" ;;
- -       esac
- -     done
+#   else
+#     saved_CFLAGS="$CFLAGS"
+#     CFLAGS=
+#     for opt in $saved_CFLAGS ; do
+#       case $opt in
+#         -O*) ;;
+#         -g*) OPTS="$OPTS $opt" ;;
+#         *) CFLAGS="$CFLAGS $opt" ;;
+#       esac
+#     done
      if test x$ac_debug = xno ; then
        OPTS=-DNO_DEBUG
- -       AC_CHECK_CC_OPT([-Wall],[OPTS="$OPTS -Wall"])
- -       AC_CHECK_CC_OPT([-O3],[OPTS="$OPTS -O3"],
- -         [ AC_CHECK_CC_OPT([-O2], [OPTS="$OPTS -O2"] ) ] )
- -       if test -z "$ac_cpu" ; then
- -        AC_MSG_WARN([guessing cpu type (use --with-cpu=cpuname to override.)])
- -       fi
- -       opt="-march=${ac_cpu-${host_cpu}}"
- -       AC_CHECK_CC_OPT([$opt], [OPTS="$OPTS $opt"],
- -         [ opt="-mcpu=${ac_cpu-${host_cpu}}"
- -            AC_CHECK_CC_OPT([$opt], [OPTS="$OPTS $opt"]) ] )
- -       if test -z "$ac_cpu" -a "$host_cpu" = "i686" ; then
- -            AC_CHECK_CC_OPT([-mmmx],[OPTS="$OPTS -mmmx"
- -              AC_MSG_WARN([use --with-cpu=cpuname to avoid assuming that MMX
works.])])
- -            if test -r /proc/cpuinfo && grep -q sse /proc/cpuinfo ; then
- -              AC_CHECK_CC_OPT([-msse],[OPTS="$OPTS -msse"
- -                AC_MSG_WARN([use --with-cpu=cpuname to avoid assuming that
SSE works.])])
- -            fi
- -       fi
+#       AC_CHECK_CC_OPT([-Wall],[OPTS="$OPTS -Wall"])
+#       AC_CHECK_CC_OPT([-O3],[OPTS="$OPTS -O3"],
+#         [ AC_CHECK_CC_OPT([-O2], [OPTS="$OPTS -O2"] ) ] )
+#       if test -z "$ac_cpu" ; then
+#        AC_MSG_WARN([guessing cpu type (use --with-cpu=cpuname to override.)])
+#       fi
+#       opt="-march=${ac_cpu-${host_cpu}}"
+#       AC_CHECK_CC_OPT([$opt], [OPTS="$OPTS $opt"],
+#        [ opt="-mcpu=${ac_cpu-${host_cpu}}"
+#            AC_CHECK_CC_OPT([$opt], [OPTS="$OPTS $opt"]) ] )
+#       if test -z "$ac_cpu" -a "$host_cpu" = "i686" ; then
+#            AC_CHECK_CC_OPT([-mmmx],[OPTS="$OPTS -mmmx"
+#              AC_MSG_WARN([use --with-cpu=cpuname to avoid assuming that MMX
works.])])
+#            if test -r /proc/cpuinfo && grep -q sse /proc/cpuinfo ; then
+#              AC_CHECK_CC_OPT([-msse],[OPTS="$OPTS -msse"
+#                AC_MSG_WARN([use --with-cpu=cpuname to avoid assuming that
SSE works.])])
+#            fi
+#       fi
      fi
- -   fi
+#   fi
 ])

Thank you,

Marijn

- --
Marijn Schouten (hkBst), Gentoo Lisp project
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG97hpp/VmCx0OL2wRAgT2AKCtiYY3+1IB53zeinxP/KCxwwDlzQCdFQLe
Yf5CZ6He/9Q4k+bZcbJr1Ws=
=WMqB
-----END PGP SIGNATURE-----
-- 
gentoo-lisp@g.o mailing list


Navigation:
Lists: gentoo-lisp: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Fw: subscribe gentoo-lisp@g.o
Next by thread:
Hop
Previous by date:
Fw: subscribe gentoo-lisp@g.o
Next by date:
Hop


Updated Jun 17, 2009

Summary: Archive of the gentoo-lisp mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.