Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Aug 2002 12:39:51 +0200
From:      Tilman Linneweh <tilman@arved.de>
To:        ports@freebsd.org
Cc:        ade@freebsd.org
Subject:   Bug in c.m4 of autoconf installation overwrites CFLAGS?
Message-ID:  <20020803123951.6fd40e50.tilman@arved.de>

next in thread | raw e-mail | index | archive | help
--=.IYx/WGlmZ5JVI4
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hello ade, Hello ports. 

I think I found a problem in c.m4 installed by port devel/autoconf.
Please comment on this.

The Code from AC_PROG_CXX_G goes like this:

m4_define([_AC_PROG_CXX_G],
[ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-g"
AC_CACHE_CHECK(whether $CXX accepts -g, ac_cv_prog_cxx_g,
               [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
                                   [ac_cv_prog_cxx_g=yes],
                                   [ac_cv_prog_cxx_g=no])])
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi[]dnl
])# _AC_PROG_CXX_G

This overwrites CXXFLAGS with O2 in every port that calls AC_PROG_CXX 
or AC_PROG_CC. 

IMHO the lines adding -O2 to CXXFLAGS and CFLAGS should be removed from c.m4
This would make work for porters a lot easier.

regards
arved
--=.IYx/WGlmZ5JVI4
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE9S7L5fCLDn4B6xToRAp5vAJ9S+jst1opxPobgpeb2VfFxsVr2nACfY44Z
jctBv0FWO7P/Asv9kMOg1bk=
=avIT
-----END PGP SIGNATURE-----

--=.IYx/WGlmZ5JVI4--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020803123951.6fd40e50.tilman>