bug-hurd
[Top][All Lists]
Advanced

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

Re: Libc optimization patch


From: Jeff Bailey
Subject: Re: Libc optimization patch
Date: Sun, 2 Dec 2001 07:53:08 -0800
User-agent: Mutt/1.2.5i

On Sat, Dec 01, 2001 at 09:31:13PM -0500, Roland McGrath wrote:
> Sorry, can you refer me to the earlier problem report?
> I don't remember why this matters.

Detailed report follows.

> Please always use diff -u or diff -c.

I have added 'diff -c' to my .cvsrc file.  Hope this helps.

i386-pc-gnu-gcc  -I../include -I. -I/root/hurdlibio/build.glibc-hurd/mach -I.. 
-I../libio -I../hurd -I/root/hurdlibio/build.glibc-hurd/hurd/ -I../mach 
-I/root/hurdlibio/build.glibc-hurd/mach/ -I/root/hurdlibio/build.glibc-hurd 
-I../sysdeps/i386/elf -I../sysdeps/mach/hurd/i386 -I../sysdeps/mach/hurd 
-I../sysdeps/gnu -I../sysdeps/unix/bsd/bsd4.4 -I../sysdeps/unix/mman 
-I../sysdeps/mach/i386 -I../sysdeps/mach -I../sysdeps/i386/fpu 
-I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/unix/bsd 
-I../sysdeps/unix/common -I../sysdeps/unix/inet -I../sysdeps/unix 
-I../sysdeps/posix -I../sysdeps/ieee754 -I../sysdeps/generic/elf 
-I../sysdeps/generic   -D_LIBC_REENTRANT -include ../include/libc-symbols.h     
-M -x c - | \
sed -e 's,- *:,/root/hurdlibio/build.glibc-hurd/mach/mach/mach_interface.udeps 
/root/hurdlibio/build.glibc-hurd/mach/mach/mach_interface.ustamp 
/root/hurdlibio/build.glibc-hurd/mach/mach/mach_interface.uh 
/root/hurdlibio/build.glibc-hurd/mach/mach/mach_interface.__h\
                  
/root/hurdlibio/build.glibc-hurd/mach/mach/mach_interface_server.c 
/root/hurdlibio/build.glibc-hurd/mach/mach/mach_interface_server.h:,' \
    -e 's@ /root/hurdlibio/build\.glibc-hurd/@ $(common-objpfx)@g' -e 
's@^/root/hurdlibio/build\.glibc-hurd/@$(common-objpfx)@g' > 
/root/hurdlibio/build.glibc-hurd/mach/mach/mach_interface.udeps.new
In file included from ../include/libc-symbols.h:54,
                 from <stdin>:1:
/root/hurdlibio/build.glibc-hurd/config.h:3:3: #error "glibc cannot be compiled 
without optimization"
mv -f /root/hurdlibio/build.glibc-hurd/mach/mach/mach_interface.udeps.new 
/root/hurdlibio/build.glibc-hurd/mach/mach/mach_interface.udeps

Make doesn't actually register the error for this, I think because of
all the pipes and redirects (something eats it - Is this a seperate bug?)

My solution is to call $(CC) with $(CFLAGS) as well as $(CPPFLAGS).  I
think this is best for two reasons:

1) It allows the user to override settings on these commands
2) If there are further changes that get placed in CFLAGS in the
future, those will get carried through.

Is this the format you want the diff in?

Index: mach/Machrules
===================================================================
RCS file: /cvs/glibc/libc/mach/Machrules,v
retrieving revision 1.71
diff -c -r1.71 Machrules
*** Machrules   2001/07/06 04:55:34     1.71
--- Machrules   2001/12/02 15:47:48
***************
*** 135,141 ****
    $(objpfx)%.udeps: $(..)mach/Machrules
        $(make-target-directory)
        $(include-%.defs) | \
!       $(CC) $(CPPFLAGS) -M -x c - | \
        sed -e 's,- *:,$@ $(@:.udeps=.ustamp) $(@:.udeps=.uh) $(@:.udeps=.__h)\
                          $(@:.udeps=_server.c) $(@:.udeps=_server.h):,' \
            $(sed-remove-objpfx) > $@.new
--- 135,141 ----
    $(objpfx)%.udeps: $(..)mach/Machrules
        $(make-target-directory)
        $(include-%.defs) | \
!       $(CC) $(CFLAGS) $(CPPFLAGS) -M -x c - | \
        sed -e 's,- *:,$@ $(@:.udeps=.ustamp) $(@:.udeps=.uh) $(@:.udeps=.__h)\
                          $(@:.udeps=_server.c) $(@:.udeps=_server.h):,' \
            $(sed-remove-objpfx) > $@.new
Index: mach/Makefile
===================================================================
RCS file: /cvs/glibc/libc/mach/Makefile,v
retrieving revision 1.98
diff -c -r1.98 Makefile
*** Makefile    2001/08/22 22:24:02     1.98
--- Makefile    2001/12/02 15:47:48
***************
*** 72,78 ****
        $(make-target-directory)
        echo '#include <mach/syscall_sw.h>' | \
        DEPENDENCIES_OUTPUT='$@-dep $@' \
!       $(CC) $(CPPFLAGS) -E -x c-header - \
              -D_MACH_`echo $(base-machine) | tr a-z A-Z`_SYSCALL_SW_H_=1 | \
        sed -n -e 's/^kernel_trap(\(.*\),\([-0-9]*\),\([0-9]*\))$$/\1 \2 \3/p'\
        | $(AWK) -f $< > $@-new
--- 72,78 ----
        $(make-target-directory)
        echo '#include <mach/syscall_sw.h>' | \
        DEPENDENCIES_OUTPUT='$@-dep $@' \
!       $(CC) $(CFLAGS) $(CPPFLAGS) -E -x c-header - \
              -D_MACH_`echo $(base-machine) | tr a-z A-Z`_SYSCALL_SW_H_=1 | \
        sed -n -e 's/^kernel_trap(\(.*\),\([-0-9]*\),\([0-9]*\))$$/\1 \2 \3/p'\
        | $(AWK) -f $< > $@-new


-- 
Abandon the search for truth; settle for a good fantasy.




reply via email to

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