aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/Dist1
-rw-r--r--sysdeps/unix/sysv/linux/Makefile34
-rw-r--r--sysdeps/unix/sysv/linux/arm/Dist1
-rw-r--r--sysdeps/unix/sysv/linux/configure24
-rw-r--r--sysdeps/unix/sysv/linux/configure.in24
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.S9
-rw-r--r--sysdeps/unix/sysv/linux/mk-stdiolim.c4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/Dist2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/Dist1
9 files changed, 38 insertions, 62 deletions
diff --git a/sysdeps/unix/sysv/linux/Dist b/sysdeps/unix/sysv/linux/Dist
index fc403871f3..ae79600717 100644
--- a/sysdeps/unix/sysv/linux/Dist
+++ b/sysdeps/unix/sysv/linux/Dist
@@ -10,6 +10,7 @@ net/ethernet.h
net/if.h
net/if_arp.h
net/if_ppp.h
+net/if_slip.h
net/ppp-comp.h
net/ppp_defs.h
net/route.h
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index c61904a3b8..7255a69ece 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -19,13 +19,15 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscal
echo > $(@:.d=.h).new \
'/* Generated at libc build time from kernel syscall list. */'
SUNPRO_DEPENDENCIES='$(@:.h=.d) $(patsubst $(objpfx)%,$$(objpfx)%,\
- $(@:.h=.d))' \
+ $(@:.d=.h) $(@:.h=.d))' \
$(CC) -E -x c $< -D_LIBC -dM | \
sed -n >> $(@:.d=.h).new \
's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p'
mv -f $(@:.d=.h).new $(@:.d=.h)
+ifndef no_deps
# Get the generated list of dependencies (probably /usr/include/asm/unistd.h).
-include $(objpfx)syscall-list.d
+endif
generated += syscall-list.h syscall-list.d
endif
@@ -35,7 +37,8 @@ endif
ifeq ($(subdir),socket)
sysdep_headers += sys/socketcall.h net/if.h net/if_ppp.h net/ppp-comp.h \
- net/ppp_defs.h net/if_arp.h net/route.h net/ethernet.h
+ net/ppp_defs.h net/if_arp.h net/route.h net/ethernet.h \
+ net/if_slip.h
sysdep_routines += cmsg_nxthdr
endif
@@ -61,3 +64,30 @@ endif
# Don't compile the ctype glue code, since there is no old non-GNU C library.
inhibit-glue = yes
+
+# Tell sysdeps/posix/Makefile that we create stdio_lim.h differently.
+inhibit-stdio_lim = yes
+
+$(common-objpfx)stdio_%.h $(common-objpfx)stdio_%.d: \
+ $(..)sysdeps/unix/sysv/linux/stdio_%.h.in
+ rm -f $(@:.h=.d) $(@:.d=.h)-t
+ echo '#include <linux/limits.h>' | \
+ SUNPRO_DEPENDENCIES='$(@:.h=.d) \
+ $(patsubst $(common-objpfx)%,$$(common-objpfx)%,\
+ $(@:.d=.h) $(@:.h=.d))' \
+ $(CC) -E -dM - > $(@:.d=.h)-t
+ fopen_max=`sed -n 's/^#define OPEN_MAX //p' $(@:.d=.h)-t`; \
+ filename_max=`sed -n 's/^#define PATH_MAX //p' $(@:.d=.h)-t`; \
+ if test -n "$$fopen_max" && test -n "$$filename_max"; then \
+ sed -e "s/DEFAULT_FOPEN_MAX/$$fopen_max/" \
+ -e "s/DEFAULT_FILENAME_MAX/$$filename_max/" $< \
+ > $(@:.d=.h).new && \
+ mv -f $(@:.d=.h).new $(@:.d=.h); \
+ else exit 1; fi
+# Remove this last so that it can be examined if something went wrong.
+ rm -f $(@:.d=.h)-t
+ifndef no_deps
+# Get the list of dependencies (probably /usr/include/linux/limits.h).
+-include $(common-objpfx)stdio_lim.d
+endif
+common-generated += stdio_lim.h stdio_lim.d
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
new file mode 100644
index 0000000000..738b9cc542
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -0,0 +1 @@
+clone.S
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index a8780df917..79dbf16912 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -98,27 +98,3 @@ fi
if test -f $srcdir/elf/ldconfig.c; then
has_ldconfig=yes
fi
-
-# Generate stdio_lim.h
-default_fopen_max="`${CC-gcc} -E $srcdir/sysdeps/unix/sysv/linux/mk-stdiolim.c | grep DEFAULT_FOPEN_MAX | cut -f2 -d':'`"
-default_filename_max="`${CC-gcc} -E $srcdir/sysdeps/unix/sysv/linux/mk-stdiolim.c | grep DEFAULT_FILENAME_MAX | cut -f2 -d':'`"
-# We double check if "default_fopen_max" and "default_filename_max" are
-# ok or not.
-if test "x$default_fopen_max" != "xOPEN_MAX" \
- -a "x$default_filename_max" != "xPATH_MAX"
-then
- sed -e "s/DEFAULT_FOPEN_MAX/$default_fopen_max/" \
- -e "s/DEFAULT_FILENAME_MAX/$default_filename_max/" \
- $srcdir/sysdeps/unix/sysv/linux/stdio_lim.h.in > stdio_lim.h.new
- if test -r stdio_lim.h.new && cmp -s stdio_lim.h.new stdio_lim.h
- then
- echo stdio_lim.h unchanged
- rm -f stdio_lim.h.new
- else
- mv -f stdio_lim.h.new stdio_lim.h
- fi
-else
- # We remove the old one if we cannot generate the new one during
- # configure.
- rm -f stdio_lim.h
-fi
diff --git a/sysdeps/unix/sysv/linux/configure.in b/sysdeps/unix/sysv/linux/configure.in
index f24af67f1e..18bb6dc469 100644
--- a/sysdeps/unix/sysv/linux/configure.in
+++ b/sysdeps/unix/sysv/linux/configure.in
@@ -83,27 +83,3 @@ fi
if test -f $srcdir/elf/ldconfig.c; then
has_ldconfig=yes
fi
-
-# Generate stdio_lim.h
-default_fopen_max="`${CC-gcc} -E $srcdir/sysdeps/unix/sysv/linux/mk-stdiolim.c | grep DEFAULT_FOPEN_MAX | cut -f2 -d':'`"
-default_filename_max="`${CC-gcc} -E $srcdir/sysdeps/unix/sysv/linux/mk-stdiolim.c | grep DEFAULT_FILENAME_MAX | cut -f2 -d':'`"
-# We double check if "default_fopen_max" and "default_filename_max" are
-# ok or not.
-if test "x$default_fopen_max" != "xOPEN_MAX" \
- -a "x$default_filename_max" != "xPATH_MAX"
-then
- sed -e "s/DEFAULT_FOPEN_MAX/$default_fopen_max/" \
- -e "s/DEFAULT_FILENAME_MAX/$default_filename_max/" \
- $srcdir/sysdeps/unix/sysv/linux/stdio_lim.h.in > stdio_lim.h.new
- if test -r stdio_lim.h.new && cmp -s stdio_lim.h.new stdio_lim.h
- then
- echo stdio_lim.h unchanged
- rm -f stdio_lim.h.new
- else
- mv -f stdio_lim.h.new stdio_lim.h
- fi
-else
- # We remove the old one if we cannot generate the new one during
- # configure.
- rm -f stdio_lim.h
-fi
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.S b/sysdeps/unix/sysv/linux/i386/sysdep.S
index a686495818..5a615efecb 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.S
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.S
@@ -25,15 +25,8 @@
it somewhere else.
...and this place is here. */
- .bss
- .globl errno
- .type errno,@object
- .size errno,4
-errno: .zero 4
- .globl _errno
- .type _errno,@object
+ .comm errno,4,4
_errno = errno /* This name is expected by hj's libc.so.5 startup code. */
- .text
/* The following code is only used in the shared library when we
compile the reentrant version. Otherwise each system call defines
diff --git a/sysdeps/unix/sysv/linux/mk-stdiolim.c b/sysdeps/unix/sysv/linux/mk-stdiolim.c
deleted file mode 100644
index 23295f007d..0000000000
--- a/sysdeps/unix/sysv/linux/mk-stdiolim.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <linux/limits.h>
-
-DEFAULT_FOPEN_MAX:OPEN_MAX
-DEFAULT_FILENAME_MAX:PATH_MAX
diff --git a/sysdeps/unix/sysv/linux/powerpc/Dist b/sysdeps/unix/sysv/linux/powerpc/Dist
index 27a951f169..4410266d71 100644
--- a/sysdeps/unix/sysv/linux/powerpc/Dist
+++ b/sysdeps/unix/sysv/linux/powerpc/Dist
@@ -4,3 +4,5 @@ termbits.h
kernel_stat.h
kernel_termios.h
sys/kernel_termios.h
+init-first.h
+syscall.h
diff --git a/sysdeps/unix/sysv/linux/sparc/Dist b/sysdeps/unix/sysv/linux/sparc/Dist
index c31f140137..d93c648651 100644
--- a/sysdeps/unix/sysv/linux/sparc/Dist
+++ b/sysdeps/unix/sysv/linux/sparc/Dist
@@ -4,3 +4,4 @@ pipe.S
fork.S
kernel_stat.h
kernel_sigaction.h
+init-first.h