Re: [Mesa-dev] [PATCH 2/2] automake: Remove OPT_FLAGS.

2012-07-26 Thread Matt Turner
On Thu, Jul 26, 2012 at 9:52 AM, Eric Anholt e...@anholt.net wrote:
 If you want to change your compiler arguments, just set CFLAGS/CXXFLAGS.
 Having Mesa have this separate variable is a great way to have your arguments
 not thoroughly propagated to all compiler invocations.
 ---

Reviewed-by: Matt Turner matts...@gmail.com
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/2] automake: Remove OPT_FLAGS.

2012-07-26 Thread Brian Paul

On 07/26/2012 10:52 AM, Eric Anholt wrote:

If you want to change your compiler arguments, just set CFLAGS/CXXFLAGS.
Having Mesa have this separate variable is a great way to have your arguments
not thoroughly propagated to all compiler invocations.
---

I don't feel strongly about removing the variable from configure, just
as long as we don't have to propagate it into Makefiles.  I use shared
configure args including CFLAGS and CXXFLAGS across many projects, so
I've never seen the use for this one, but if people really care to
keep it, we should just append it to CFLAGS/CXXFLAGS in configure.ac.


This sounds good but someone else will have to review.

But while you're in this area, it would be nice if passing 
--enable-debug would set the -g flag and omit the -O2 flag.  It 
doesn't seem right that one has to explicitly set CFLAGS and CXXFLAGS 
to -g when --enable-debug is used.


-Brian
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/2] automake: Remove OPT_FLAGS.

2012-07-26 Thread Kenneth Graunke
On 07/26/2012 09:52 AM, Eric Anholt wrote:
 If you want to change your compiler arguments, just set CFLAGS/CXXFLAGS.
 Having Mesa have this separate variable is a great way to have your arguments
 not thoroughly propagated to all compiler invocations.
 ---
 
 I don't feel strongly about removing the variable from configure, just
 as long as we don't have to propagate it into Makefiles.  I use shared
 configure args including CFLAGS and CXXFLAGS across many projects, so
 I've never seen the use for this one, but if people really care to
 keep it, we should just append it to CFLAGS/CXXFLAGS in configure.ac.

I'm okay with removing it.  Both of these are:
Reviewed-by: Kenneth Graunke kenn...@whitecape.org

The only concern I have is that this conflicts with Marek's patch to
make --enable-32-bit work, which would be good to have.

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/2] automake: Remove OPT_FLAGS.

2012-07-26 Thread Marek Olšák
Michel Dänzer told me on IRC that setting CFLAGS overrode all flags,
while OPT_FLAGS was only appended to existing CFLAGS, which is the
reason I have been using OPT_FLAGS. Is that not true anymore?

Marek

On Thu, Jul 26, 2012 at 6:52 PM, Eric Anholt e...@anholt.net wrote:
 If you want to change your compiler arguments, just set CFLAGS/CXXFLAGS.
 Having Mesa have this separate variable is a great way to have your arguments
 not thoroughly propagated to all compiler invocations.
 ---

 I don't feel strongly about removing the variable from configure, just
 as long as we don't have to propagate it into Makefiles.  I use shared
 configure args including CFLAGS and CXXFLAGS across many projects, so
 I've never seen the use for this one, but if people really care to
 keep it, we should just append it to CFLAGS/CXXFLAGS in configure.ac.

  configs/current.in   |5 ++---
  configure.ac |9 ++---
  src/gallium/drivers/r300/Makefile.am |1 -
  src/gallium/drivers/r600/Makefile.am |1 -
  4 files changed, 4 insertions(+), 12 deletions(-)

 diff --git a/configs/current.in b/configs/current.in
 index 1840632..c4f3f4d 100644
 --- a/configs/current.in
 +++ b/configs/current.in
 @@ -9,15 +9,14 @@ CONFIG_NAME = autoconf
  # Compiler and flags
  CC = @CC@
  CXX = @CXX@
 -OPT_FLAGS = @OPT_FLAGS@
  PIC_FLAGS = @PIC_FLAGS@
  DEFINES = @DEFINES@
  API_DEFINES = @API_DEFINES@
  SHARED_GLAPI = @SHARED_GLAPI@
  CFLAGS_NOVISIBILITY = @CPPFLAGS@ @CFLAGS@ \
 -   $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES)
 +   $(PIC_FLAGS) $(DEFINES)
  CXXFLAGS_NOVISIBILITY = @CPPFLAGS@ @CXXFLAGS@ \
 -   $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES)
 +   $(PIC_FLAGS) $(DEFINES)
  CFLAGS = $(CFLAGS_NOVISIBILITY) @VISIBILITY_CFLAGS@
  CXXFLAGS = $(CXXFLAGS_NOVISIBILITY) @VISIBILITY_CXXFLAGS@
  LDFLAGS = @LDFLAGS@
 diff --git a/configure.ac b/configure.ac
 index c81d18b..47b9187 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -246,11 +246,6 @@ esac
  AC_SUBST([VISIBILITY_CFLAGS])
  AC_SUBST([VISIBILITY_CXXFLAGS])

 -dnl These should be unnecessary, but let the user set them if they want
 -AC_ARG_VAR([OPT_FLAGS], [Additional optimization flags for the compiler.
 -Default is to use CFLAGS.])
 -AC_SUBST([OPT_FLAGS])
 -
  dnl
  dnl Hacks to enable 32 or 64 bit build
  dnl
 @@ -2301,9 +2296,9 @@ echo Static libs: $enable_static

  dnl Compiler options
  # cleanup the CFLAGS/CXXFLAGS/DEFINES vars
 -cflags=`echo $CFLAGS $OPT_FLAGS $PIC_FLAGS | \
 +cflags=`echo $CFLAGS $PIC_FLAGS | \
  $SED 's/^ *//;s/  */ /;s/ *$//'`
 -cxxflags=`echo $CXXFLAGS $OPT_FLAGS $PIC_FLAGS | \
 +cxxflags=`echo $CXXFLAGS $PIC_FLAGS | \
  $SED 's/^ *//;s/  */ /;s/ *$//'`
  defines=`echo $DEFINES | $SED 's/^ *//;s/  */ /;s/ *$//'`
  echo 
 diff --git a/src/gallium/drivers/r300/Makefile.am 
 b/src/gallium/drivers/r300/Makefile.am
 index ca2b6c0..79b17f6 100644
 --- a/src/gallium/drivers/r300/Makefile.am
 +++ b/src/gallium/drivers/r300/Makefile.am
 @@ -16,7 +16,6 @@ AM_CFLAGS = \
 $(LLVM_CFLAGS) \
 $(RADEON_CFLAGS) \
 $(DEFINES) \
 -   $(OPT_FLAGS) \
 $(PIC_FLAGS)

  libr300_a_SOURCES = \
 diff --git a/src/gallium/drivers/r600/Makefile.am 
 b/src/gallium/drivers/r600/Makefile.am
 index 65d0dff..628eaab 100644
 --- a/src/gallium/drivers/r600/Makefile.am
 +++ b/src/gallium/drivers/r600/Makefile.am
 @@ -9,7 +9,6 @@ AM_CFLAGS = \
 -I$(top_srcdir)/include \
 $(RADEON_CFLAGS) \
 $(DEFINES) \
 -   $(OPT_FLAGS) \
 $(PIC_FLAGS) \
 $(VISIBILITY_CFLAGS)

 --
 1.7.10.4

 ___
 mesa-dev mailing list
 mesa-dev@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/2] automake: Remove OPT_FLAGS.

2012-07-26 Thread Eric Anholt
Marek Olšák mar...@gmail.com writes:

 Michel Dänzer told me on IRC that setting CFLAGS overrode all flags,
 while OPT_FLAGS was only appended to existing CFLAGS, which is the
 reason I have been using OPT_FLAGS. Is that not true anymore?

By default, configure's CFLAGS and CXXFLAGS are -g -O2 on gcc and
-O2 on non-gcc.  I know of no reason why setting the two to something
else in the ./configure environment (like I do to add
-fno-omit-frame-pointer or -m32 on all projects I build) would be
unsafe.


pgpafPHXGlRkH.pgp
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/2] automake: Remove OPT_FLAGS.

2012-07-26 Thread Marek Olšák
Ah, I see. Thank you for the clarification.

Marek

On Fri, Jul 27, 2012 at 12:29 AM, Eric Anholt e...@anholt.net wrote:
 Marek Olšák mar...@gmail.com writes:

 Michel Dänzer told me on IRC that setting CFLAGS overrode all flags,
 while OPT_FLAGS was only appended to existing CFLAGS, which is the
 reason I have been using OPT_FLAGS. Is that not true anymore?

 By default, configure's CFLAGS and CXXFLAGS are -g -O2 on gcc and
 -O2 on non-gcc.  I know of no reason why setting the two to something
 else in the ./configure environment (like I do to add
 -fno-omit-frame-pointer or -m32 on all projects I build) would be
 unsafe.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev