This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: use CPPFLAGS at configure time


On Apr  4, 2003, Alexandre Oliva <aoliva@redhat.com> wrote:

> I'll just resort to using CFLAGS instead of CPPFLAGS, which is
> indeed the right thing to do, but will require me to assume that
> CFLAGS would be set to -g -O2 by AC_PROG_CC, if not previously set.
> I.e., I'd do:

> 		  CFLAGS=${CFLAGS-"-g -O2"}" -mabi=$mips_config_abi"

This is what this patch implements.  I thought I'd submitted it a long
time ago, but apparently I didn't.  Ok?

Index: ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* configure.in (mips_cc_abi): Don't look for -mabi in $CPPFLAGS.
	Add -mabi to CFLAGS if mips_config_abi differs from that of $CC
	$CFLAGS.

Index: configure.in
===================================================================
RCS file: /cvs/glibc/libc/configure.in,v
retrieving revision 1.397
diff -u -p -r1.397 configure.in
--- configure.in 21 May 2003 09:25:53 -0000 1.397
+++ configure.in 4 Jun 2003 19:18:57 -0000
@@ -387,7 +387,7 @@ m68k)		base_machine=m68k machine=m68k/m6
 m88???)		base_machine=m88k machine=m88k/$machine ;;
 m88k)		base_machine=m88k machine=m88k/m88100 ;;
 mips64*)	base_machine=mips64
-		case "$CC $CFLAGS $CPPFLAGS " in
+		case "$CC $CFLAGS " in
 		*" -mabi=n32 "*) mips_cc_abi=n32 ;;
 		*" -mabi=64 "*|*" -mabi=n64 "*) mips_cc_abi=64 ;;
 		*" -mabi=32 "*|*" -mabi=o32 "*) mips_cc_abi=32 ;;
@@ -407,9 +407,7 @@ mips64*)	base_machine=mips64
 		esac
 		machine=$machine/$config_machine
 		if test $mips_config_abi != $mips_cc_abi; then
-		  # This won't make it to config.make, but we want to
-		  # set this in case configure tests depend on it.
-		  CPPFLAGS="$CPPFLAGS -mabi=$mips_config_abi"
+		  CFLAGS=${CFLAGS-"-g -O2"}" -mabi=$mips_config_abi"
 		fi
 		;;
 mips*)		base_machine=mips machine=mips/mips32/$machine ;;
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]