diff options
Diffstat (limited to 'sysdeps/unix/Makefile')
-rw-r--r-- | sysdeps/unix/Makefile | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/sysdeps/unix/Makefile b/sysdeps/unix/Makefile index 5b326e032c..4ab06ba33e 100644 --- a/sysdeps/unix/Makefile +++ b/sysdeps/unix/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1991,1992,1993,1994,1995,1996,1997,1998,1999,2003 +# Copyright (C) 1991,1992,1993,1994,1995,1996,1997,1998,1999,2003, 2006 # Free Software Foundation, Inc. # This file is part of the GNU C Library. @@ -212,24 +212,6 @@ common-generated := $(common-generated) \ bits/ioctls.h ioctls make-ioctls make-ioctls.c endif -ifeq ($(subdir),stdio-common) -ifeq (,$(filter-out $(sysdep_dir)/generic/ $(objpfx),\ - $(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/errlist.c)))))) - -before-compile: $(objpfx)errlist.c -$(objpfx)errlist.c: $(objpfx)make_errlist - @rm -f $@ - $(dir $<)$(notdir $<) > $@-tmp - mv $@-tmp $@ - -$(objpfx)make_errlist: $(sysdep_dir)/unix/make_errlist.c - $(native-compile) - -generated := $(generated) make_errlist errlist.c - -endif -endif # stdio-common - ifeq (,$(filter-out $(sysdep_dir)/generic/ $(common-objpfx),\ $(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/sys/syscall.h)))))) @@ -294,7 +276,13 @@ sysdep_routines += stub-syscalls $(objpfx)stub-syscalls.c: $(common-objpfx)sysd-syscalls \ $(..)sysdeps/unix/Makefile $(make-target-directory) - (echo '#include <errno.h>'; \ + (for call in $(unix-stub-syscalls); do \ + echo "#define $$call RENAMED_$$call"; \ + done; \ + echo '#include <errno.h>'; \ + for call in $(unix-stub-syscalls); do \ + echo "#undef $$call"; \ + done; \ echo 'long int _no_syscall (void)'; \ echo '{ __set_errno (ENOSYS); return -1L; }'; \ for call in $(unix-stub-syscalls); do \ @@ -317,9 +305,6 @@ generated += stub-syscalls.c endif endif -export sysdirs -export asm_CPP := $(COMPILE.S) -E -x assembler-with-cpp - # This is the end of the pipeline for compiling the syscall stubs. # The stdin in assembler with cpp using sysdep.h macros. # Be sure to disable debugging info since it would all just say "<stdin>". @@ -330,7 +315,9 @@ $(common-objpfx)sysd-syscalls: $(..)sysdeps/unix/make-syscalls.sh \ $(wildcard $(+sysdep_dirs:%=%/syscalls.list)) for dir in $(+sysdep_dirs); do \ test -f $$dir/syscalls.list && \ - { $(SHELL) $(dir $<)$(notdir $<) $$dir || exit 1; }; \ + { sysdirs='$(sysdirs)' \ + asm_CPP='$(COMPILE.S) -E -x assembler-with-cpp' \ + $(SHELL) $(dir $<)$(notdir $<) $$dir || exit 1; }; \ test $$dir = $(..)sysdeps/unix && break; \ done > $@T mv -f $@T $@ |