bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gzip and CPPFLAGS


From: Paul Eggert
Subject: Re: gzip and CPPFLAGS
Date: Wed, 13 Dec 2006 18:14:08 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Thanks for those two patches.  The bit about adding logging I think
I'll leave out for now, as it doesn't fix a bug and the echo might go
slightly bad with backslashes.  The other stuff looks good, though;
thanks.  I installed this:


2006-12-13  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: Test the exit code of the $CPP and $ASCPPPOST commands
        separately.

Index: configure.ac
===================================================================
RCS file: /cvsroot/gzip/gzip/configure.ac,v
retrieving revision 1.10
diff -p -c -r1.10 configure.ac
*** configure.ac        12 Dec 2006 00:03:17 -0000      1.10
--- configure.ac        14 Dec 2006 02:10:58 -0000
*************** AC_SUBST([ASCPPFLAGS])
*** 55,61 ****
  AC_OBJEXT
  
  # Try to assemble match.S.
! # "gcc -E match.s" ignores -E, so we must use match_.s.
  AC_CACHE_CHECK([for an assembler syntax supported by this package],
    [gzip_cv_assembler],
    [gzip_cv_assembler=no
--- 55,61 ----
  AC_OBJEXT
  
  # Try to assemble match.S.
! # "gcc -E match.s" ignores -E, so we must use _match.S.
  AC_CACHE_CHECK([for an assembler syntax supported by this package],
    [gzip_cv_assembler],
    [gzip_cv_assembler=no
*************** AC_CACHE_CHECK([for an assembler syntax 
*** 63,79 ****
     *' NO_ASM '*) ;;
     *)
       if cp $srcdir/lib/match.c _match.S &&
!       eval "$CPP $ASCPPFLAGS _match.S | $ASCPPPOST > match_.s 2>/dev/null"; 
then
         if test ! -s match_.s || grep error < match_.s > /dev/null; then
         :
!        elif eval "$CC -c match_.s >/dev/null 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" &&
            grep '\.note\.GNU-stack' conftest.s >/dev/null 2>&1 &&
!           eval "$CC -c -Wa,--noexecstack match_.s >/dev/null 2>&1" &&
            test -f match_.$OBJEXT; then
           gzip_cv_assembler='yes, with -Wa,--noexecstack'
         fi
--- 63,80 ----
     *' NO_ASM '*) ;;
     *)
       if cp $srcdir/lib/match.c _match.S &&
!       eval "$CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i" 2>/dev/null &&
!       eval "$ASCPPPOST < _match.i > match_.s" 2>/dev/null; then
         if test ! -s match_.s || grep error < match_.s > /dev/null; then
         :
!        elif eval "$CC $CPPFLAGS $CFLAGS -c match_.s >/dev/null 2>&1" &&
            test -f match_.$OBJEXT; then
         rm -f match_.$OBJEXT
         gzip_cv_assembler=yes
         if echo 'void foo (void) {}' > conftest.c &&
!           eval "$CC $CPPFLAGS $CFLAGS -S conftest.c >/dev/null 2>&1" &&
            grep '\.note\.GNU-stack' conftest.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
Index: lib/Makefile.am
===================================================================
RCS file: /cvsroot/gzip/gzip/lib/Makefile.am,v
retrieving revision 1.4
diff -p -c -r1.4 Makefile.am
*** lib/Makefile.am     12 Dec 2006 00:03:17 -0000      1.4
--- lib/Makefile.am     14 Dec 2006 02:10:58 -0000
*************** libgzip_a_DEPENDENCIES += $(LIBOBJS)
*** 24,32 ****
  
  match.$(OBJEXT): match.c
        cp $(srcdir)/match.c _match.S
!       $(CPP) $(ASCPPFLAGS) _match.S > _match.i
        @ASCPPPOST@ < _match.i > match_.s
!       $(CC) -c $(CFLAGS) $(ASFLAGS_config) match_.s
        mv match_.$(OBJEXT) $@
        rm -f _match.S _match.i match_.s
  
--- 24,32 ----
  
  match.$(OBJEXT): match.c
        cp $(srcdir)/match.c _match.S
!       $(CPP) $(CPPFLAGS) $(ASCPPFLAGS) _match.S > _match.i
        @ASCPPPOST@ < _match.i > match_.s
!       $(CC) $(CPPFLAGS) $(CFLAGS) $(ASFLAGS_config) -c match_.s
        mv match_.$(OBJEXT) $@
        rm -f _match.S _match.i match_.s
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]