[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gzip and CPPFLAGS
From: |
Bruno Haible |
Subject: |
Re: gzip and CPPFLAGS |
Date: |
Tue, 12 Dec 2006 14:50:54 +0100 |
User-agent: |
KMail/1.9.1 |
Also, I think when $CPP is used, $CPPFLAGS should be used as well.
I was trying "./configure CFLAGS=-m32 LDLAGS=-m32 CPPFLAGS=-m32" on an
x86_64 machine, and it didn't pass the -m32 to the compiler when dealing
with _match.S. I had to use CC="gcc -m32" to make this work, but as the
autoconf manual says, putting the flags into $CC itself should only be
necessary in tricky cases.
This makes it work.
2006-12-12 Bruno Haible <address@hidden>
* configure.ac: Use $CPPFLAGS everywhere $CPP is used, and use
$CPPFLAGS $CFLAGS everywhere $CC is used.
* lib/Makefile.am (match.$(OBJEXT)): Likewise.
--- configure.ac.bak 2006-12-12 14:13:04.000000000 +0100
+++ configure.ac 2006-12-12 14:25:43.000000000 +0100
@@ -63,21 +63,21 @@
*' NO_ASM '*) ;;
*)
if cp $srcdir/lib/match.c _match.S &&
- echo "$as_me:__oline__: $CPP $ASCPPFLAGS _match.S > _match.i"
>&AS_MESSAGE_LOG_FD &&
- eval "$CPP $ASCPPFLAGS _match.S > _match.i" 2>&AS_MESSAGE_LOG_FD &&
+ echo "$as_me:__oline__: $CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i"
>&AS_MESSAGE_LOG_FD &&
+ eval "$CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i"
2>&AS_MESSAGE_LOG_FD &&
echo "$as_me:__oline__: $ASCPPPOST < _match.i > match_.s"
>&AS_MESSAGE_LOG_FD &&
eval "$ASCPPPOST < _match.i > match_.s" 2>&AS_MESSAGE_LOG_FD; then
if test ! -s match_.s || grep error < match_.s > /dev/null; then
:
- elif echo "$as_me:__oline__: $CC -c match_.s" >&AS_MESSAGE_LOG_FD &&
- eval "$CC -c match_.s >&AS_MESSAGE_LOG_FD 2>&1" &&
+ elif echo "$as_me:__oline__: $CC $CPPFLAGS $CFLAGS -c match_.s"
>&AS_MESSAGE_LOG_FD &&
+ eval "$CC $CPPFLAGS $CFLAGS -c match_.s >&AS_MESSAGE_LOG_FD 2>&1" &&
test -f match_.$OBJEXT; then
rm -f match_.$OBJEXT
gzip_cv_assembler=yes
if echo 'void foo (void) {}' > conftest.c &&
- eval "$CC -S conftest.c >/dev/null 2>&1" &&
+ eval "$CC $CPPFLAGS $CFLAGS -S conftest.c >/dev/null 2>&1" &&
grep '\.note\.GNU-stack' conftest.s >/dev/null 2>&1 &&
- eval "$CC -c -Wa,--noexecstack match_.s >/dev/null 2>&1" &&
+ eval "$CC $CPPFLAGS $CFLAGS -c -Wa,--noexecstack match_.s
>/dev/null 2>&1" &&
test -f match_.$OBJEXT; then
gzip_cv_assembler='yes, with -Wa,--noexecstack'
fi
--- lib/Makefile.am 12 Dec 2006 00:03:17 -0000 1.4
+++ lib/Makefile.am 12 Dec 2006 13:52:16 -0000
@@ -24,9 +24,9 @@
match.$(OBJEXT): match.c
cp $(srcdir)/match.c _match.S
- $(CPP) $(ASCPPFLAGS) _match.S > _match.i
+ $(CPP) $(CPPFLAGS) $(ASCPPFLAGS) _match.S > _match.i
@ASCPPPOST@ < _match.i > match_.s
- $(CC) -c $(CFLAGS) $(ASFLAGS_config) match_.s
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(ASFLAGS_config) -c match_.s
mv match_.$(OBJEXT) $@
rm -f _match.S _match.i match_.s