chiark / gitweb /
[PATCH] klibc: version 0.211
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Sat, 5 Mar 2005 06:36:51 +0000 (07:36 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 06:48:48 +0000 (23:48 -0700)
24 files changed:
klibc/MCONFIG
klibc/Makefile
klibc/include/arch/sparc/klibc/archsignal.h
klibc/include/sys/times.h
klibc/klcc.in
klibc/klibc.spec.in
klibc/klibc/Makefile
klibc/klibc/SYSCALLS.def
klibc/klibc/arch/i386/MCONFIG
klibc/klibc/arch/i386/crt0.S
klibc/klibc/arch/i386/exits.S
klibc/klibc/arch/i386/libgcc/__ashldi3.S
klibc/klibc/arch/i386/libgcc/__ashrdi3.S
klibc/klibc/arch/i386/libgcc/__lshrdi3.S
klibc/klibc/arch/i386/libgcc/__muldi3.S
klibc/klibc/arch/i386/libgcc/__negdi2.S
klibc/klibc/arch/i386/open.S
klibc/klibc/arch/i386/setjmp.S
klibc/klibc/arch/i386/syscall.S
klibc/klibc/arch/i386/sysstub.ph
klibc/klibc/arch/x86_64/MCONFIG
klibc/klibc/open.c
klibc/klibc/sigaction.c
klibc/version

index a7b2cb1bf36865eed26215e1674086c457c7fec8..c83349948354e5e877968757fc630e47ea6f97e8 100644 (file)
@@ -3,6 +3,14 @@
 # Makefile configuration, without explicit rules
 #
 
 # Makefile configuration, without explicit rules
 #
 
+# CROSS is the prefix used for system tools like gcc, ld etc.
+CROSS   = 
+
+# KCROSS is the prefix we use for klibc installations.  This is usually
+# the same as CROSS, but may be different, e.g. to install an i386
+# cross-compilation suite on an x86-64 system, using the same gcc/binutils.
+KCROSS ?= $(CROSS)
+
 # Location for installation
 prefix      = /usr
 bindir      = $(prefix)/bin
 # Location for installation
 prefix      = /usr
 bindir      = $(prefix)/bin
@@ -22,7 +30,6 @@ KRNLSRC = $(SRCROOT)/linux
 KRNLOBJ = $(SRCROOT)/linux
 
 ARCH    = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 KRNLOBJ = $(SRCROOT)/linux
 
 ARCH    = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
-CROSS   = 
 CC     = $(CROSS)gcc
 LD      = $(CROSS)ld
 KLIBSRC = $(SRCROOT)/klibc
 CC     = $(CROSS)gcc
 LD      = $(CROSS)ld
 KLIBSRC = $(SRCROOT)/klibc
index eb8f55570d15c430e9741b9cf48e0178e6ad0010..812ea92f474f48d4a29fa7854125c856cde17a4b 100644 (file)
@@ -17,6 +17,7 @@ $(CROSS)klibc.config: Makefile
        rm -f $@
        echo 'ARCH=$(ARCH)' >> $@
        echo 'CROSS=$(CROSS)' >> $@
        rm -f $@
        echo 'ARCH=$(ARCH)' >> $@
        echo 'CROSS=$(CROSS)' >> $@
+       echo 'KCROSS=$(KCROSS)' >> $@
        echo "CC=$(shell bash -c 'type -p $(CC)')" >> $@
        echo "LD=$(shell bash -c 'type -p $(LD)')" >> $@
        echo 'REQFLAGS=$(filter-out -I%,$(REQFLAGS))' >> $@
        echo "CC=$(shell bash -c 'type -p $(CC)')" >> $@
        echo "LD=$(shell bash -c 'type -p $(LD)')" >> $@
        echo 'REQFLAGS=$(filter-out -I%,$(REQFLAGS))' >> $@
@@ -49,19 +50,20 @@ local-install: $(CROSS)klcc
        mkdir -p $(INSTALLROOT)$(mandir)/man1
        mkdir -p $(INSTALLROOT)$(SHLIBDIR)
        mkdir -p $(INSTALLROOT)$(INSTALLDIR)
        mkdir -p $(INSTALLROOT)$(mandir)/man1
        mkdir -p $(INSTALLROOT)$(SHLIBDIR)
        mkdir -p $(INSTALLROOT)$(INSTALLDIR)
-       -rm -rf $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)include
-       mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)include
-       mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)lib
-       mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)bin
-       set -xe ; for d in linux asm asm-generic ; do \
+       -rm -rf $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
+       mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
+       mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
+       mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
+       set -xe ; for d in linux asm-$(ARCH) asm-generic $(ASMARCH); do \
          mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)include/$$d ; \
          mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)include/$$d ; \
-         cp -rfL $(KRNLSRC)/include/$$d/.  $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)include/$$d/. ; \
-         cp -rfL $(KRNLOBJ)/include/$$d/.  $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)include/$$d/. ; \
-         [ ! -d $(KRNLOBJ)/include2/$$d ] || \
-           cp -rfL $(KRNLOBJ)/include2/$$d/. $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)include/$$d/. ; \
+         for r in $(KRNLSRC)/include $(KRNLOBJ)/include $(KRNLOBJ)/include2 ; do \
+           [ ! -d $$r/$$d ] || \
+             cp -rfL $$r/$$d/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/$$d/. ; \
+         done ; \
        done
        done
-       cp -rf include/. $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)include/.
-       $(INSTALL_DATA) klcc.1 $(INSTALLROOT)$(mandir)/man1/$(CROSS)klcc.1
-       $(INSTALL_EXEC) $(CROSS)klcc $(INSTALLROOT)$(bindir)
+       cd $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include && ln -sf asm-$(ARCH) asm
+       cp -rf include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
+       $(INSTALL_DATA) klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1
+       $(INSTALL_EXEC) $(KCROSS)klcc $(INSTALLROOT)$(bindir)
 
 -include MCONFIG
 
 -include MCONFIG
index 6af37090332ab8ed6b645901e3fc69bb928fb06f..3be67a21588749852ff1f15eba8e5bbafe277410 100644 (file)
@@ -8,6 +8,31 @@
 #ifndef _KLIBC_ARCHSIGNAL_H
 #define _KLIBC_ARCHSIGNAL_H
 
 #ifndef _KLIBC_ARCHSIGNAL_H
 #define _KLIBC_ARCHSIGNAL_H
 
-/* No special stuff for this architecture */
+/* Hidden definitions */
+
+struct __new_sigaction {
+        __sighandler_t  sa_handler;
+        unsigned long   sa_flags;
+        void            (*sa_restorer)(void);   /* Not used by Linux/SPARC */
+        __new_sigset_t  sa_mask;
+};
+
+struct k_sigaction {
+        struct __new_sigaction  sa;
+        void                    __user *ka_restorer;
+};
+
+struct __old_sigaction {
+        __sighandler_t  sa_handler;
+        __old_sigset_t  sa_mask;
+        unsigned long   sa_flags;
+        void            (*sa_restorer) (void);  /* not used by Linux/SPARC */
+};
+
+typedef struct sigaltstack {
+        void            __user *ss_sp;
+        int             ss_flags;
+        size_t          ss_size;
+} stack_t;
 
 #endif
 
 #endif
index 657f9c4b1cb487a914efe6025d9c9536caf81744..dd86531669d0a070cbe3ccbb699e16d3f48d1cbd 100644 (file)
@@ -5,10 +5,10 @@
 #ifndef _SYS_TIMES_H
 #define _SYS_TIMES_H
 
 #ifndef _SYS_TIMES_H
 #define _SYS_TIMES_H
 
+#include <klibc/extern.h>
+#include <sys/types.h>
 #include <linux/times.h>
 
 __extern clock_t times(struct tms *);
 #include <linux/times.h>
 
 __extern clock_t times(struct tms *);
-__extern int gettimeofday(struct timeval *, struct timezone *);
-__extern int settimeofday(const struct timeval *, const struct timezone *);
 
 #endif /* _SYS_TIMES_H */
 
 #endif /* _SYS_TIMES_H */
index 713843c37c4bf4fa75fadde0990fe76255e1abae..bdd03e73b3399642fd7cba15e273d5330f64d4e5 100644 (file)
@@ -1,19 +1,19 @@
 # -*- perl -*-
 
 # Standard includes
 # -*- perl -*-
 
 # Standard includes
-@includes = ("-I${INSTALLDIR}/${CROSS}include/arch/${ARCH}",
-            "-I${INSTALLDIR}/${CROSS}include/bits${BITSIZE}",
-            "-I${INSTALLDIR}/${CROSS}include");
+@includes = ("-I${INSTALLDIR}/${KCROSS}include/arch/${ARCH}",
+            "-I${INSTALLDIR}/${KCROSS}include/bits${BITSIZE}",
+            "-I${INSTALLDIR}/${KCROSS}include");
 
 # Default optimization options (for compiles without -g)
 @optopt =  @OPTFLAGS;
 @goptopt = ('-O');
 
 # Options and libraries to pass to ld; shared versus static
 
 # Default optimization options (for compiles without -g)
 @optopt =  @OPTFLAGS;
 @goptopt = ('-O');
 
 # Options and libraries to pass to ld; shared versus static
-@staticopt = ("$INSTALLDIR/${CROSS}lib/crt0.o");
-@staticlib = ("$INSTALLDIR/${CROSS}lib/libc.a");
-@sharedopt = (@EMAIN, "$INSTALLDIR/${CROSS}lib/interp.o");
-@sharedlib = ('-R', "$INSTALLDIR/lib/${CROSS}libc.so");
+@staticopt = ("$INSTALLDIR/${KCROSS}lib/crt0.o");
+@staticlib = ("$INSTALLDIR/${KCROSS}lib/libc.a");
+@sharedopt = (@EMAIN, "$INSTALLDIR/${KCROSS}lib/interp.o");
+@sharedlib = ('-R', "$INSTALLDIR/${KCROSS}lib/libc.so");
 
 # Returns the language (-x option string) for a specific extension.
 sub filename2lang($) {
 
 # Returns the language (-x option string) for a specific extension.
 sub filename2lang($) {
index 237771532a56a31adfb20077e90de37162656eb4..cab496b917fbfe7bcba7a07bfff22ff58394e9cb 100644 (file)
@@ -19,13 +19,21 @@ Vendor: Starving Linux Artists
 %description
 %{name} is intended to be a minimalistic libc subset for use with
 initramfs.  It is deliberately written for small size, minimal
 %description
 %{name} is intended to be a minimalistic libc subset for use with
 initramfs.  It is deliberately written for small size, minimal
-entanglement, and portability, not speed.  It is definitely a work in
-progress, and a lot of things are still missing.
+entanglement, and portability, not speed.
+
+%package devel
+Summary: Libraries and tools needed to compile applications against klibc.
+Group: Development/Libraries
+Requires: klibc = %{version}-%{release}
+
+%description devel
+This package contains the link libraries, header files, and gcc
+wrapper scripts needed to compile applications against klibc.
 
 %package utils
 Summary: Small utilities built with klibc.
 Group: Utilities/System
 
 %package utils
 Summary: Small utilities built with klibc.
 Group: Utilities/System
-Requires: klibc = %{version}
+Requires: klibc = %{version}-%{release}
 
 %description utils
 This package contains a collection of programs that are linked against
 
 %description utils
 This package contains a collection of programs that are linked against
@@ -62,8 +70,11 @@ make  ARCH=%{_target_cpu} prefix=%{_prefix} bindir=%{_bindir} \
        INSTALLDIR=%{klibcdir} mandir=%{_mandir} INSTALLROOT=%{buildroot} \
        install
 
        INSTALLDIR=%{klibcdir} mandir=%{_mandir} INSTALLROOT=%{buildroot} \
        install
 
-# Install the docs
+# Make the .so file in /lib a hardlink (they will be expanded as two
+# files automatically if it crosses filesystems when extracted.)
+ln -f %{buildroot}%{klibcdir}/lib/klibc-*.so %{buildroot}/lib
 
 
+# Install the docs
 mkdir -p %{buildroot}%{bindocdir} %{buildroot}%{libdocdir}
 install -m 444 README %{buildroot}%{libdocdir}
 install -m 444 klibc/README %{buildroot}%{libdocdir}/README.klibc
 mkdir -p %{buildroot}%{bindocdir} %{buildroot}%{libdocdir}
 install -m 444 README %{buildroot}%{libdocdir}
 install -m 444 klibc/README %{buildroot}%{libdocdir}/README.klibc
@@ -77,12 +88,25 @@ install -m 444 kinit/README %{buildroot}%{bindocdir}/README.kinit
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+#
+# Note: libc.so and interp.o are technically -devel files, but
+# put them in this package until we can make really, really sure
+# the dependency system can avoid confusion.  (In fact, it would be
+# good to eventually get them out of here, so that multiple runtimes
+# can be installed should it be necessary.)
+#
 %files
 %defattr(-,root,root,-)
 %files
 %defattr(-,root,root,-)
-%{klibcdir}/lib
+/lib/klibc-*.so
+%{klibcdir}/lib/*.so
+%{klibcdir}/lib/interp.o
+
+%files devel
+%defattr(-,root,root,-)
 %{klibcdir}/include
 %{klibcdir}/include
+%{klibcdir}/lib/*.a
+%{klibcdir}/lib/crt0.o
 %{_bindir}/klcc
 %{_bindir}/klcc
-/lib/klibc-*.so
 %doc %{_mandir}/man1/*
 %doc %{libdocdir}/*
 
 %doc %{_mandir}/man1/*
 %doc %{libdocdir}/*
 
index a9aedc58f0440e0d68647a3c62c260f684116dae..c412a9ffea33b15e94048d05c6dd1f55dd5c9af4 100644 (file)
@@ -116,7 +116,7 @@ $(SOLIB).hash: $(SOLIB) sha1hash
 
 $(SOHASH): $(SOLIB) $(SOLIB).hash
        cp -f $(SOLIB) $@
 
 $(SOHASH): $(SOLIB) $(SOLIB).hash
        cp -f $(SOLIB) $@
-       $(STRIP) $@
+       $(STRIPCMD) $@
        rm -f klibc-??????????????????????.so
        ln -f $@ klibc-`cat $(SOLIB).hash`.so
 
        rm -f klibc-??????????????????????.so
        ln -f $@ klibc-`cat $(SOLIB).hash`.so
 
index 3918bcb012122a3768e9751b842ddfbf499e1359..e8b9a7f176670b5f67d965de19621422fa32588a 100644 (file)
@@ -146,13 +146,15 @@ ssize_t pwrite64,pwrite::pwrite(int, void *, size_t, off_t)
 ; Signal operations
 ;
 int kill(pid_t, int)
 ; Signal operations
 ;
 int kill(pid_t, int)
+; We really should get rid of the non-rt_* of these, but that takes
+; sanitizing <signal.h> for all architectures, sigh...
 <?> int sigaction(int, const struct sigaction *, struct sigaction *)
 <?> int sigaction(int, const struct sigaction *, struct sigaction *)
-int rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t)
 <?> int sigsuspend(const sigset_t *)
 <?> int sigsuspend(const sigset_t *)
+<?> int sigpending(sigset_t *)
+<?> int sigprocmask(int, const sigset_t *, sigset_t *)
+int rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t)
 int rt_sigsuspend(const sigset_t *, size_t)
 int rt_sigsuspend(const sigset_t *, size_t)
-<?> int sigpending(sigset_t)
 int rt_sigpending(sigset_t *, size_t)
 int rt_sigpending(sigset_t *, size_t)
-<?> int sigprocmask(int, const sigset_t *, sigset_t *)
 int rt_sigprocmask(int, const sigset_t *, sigset_t *, size_t)
 <?> unsigned int alarm(unsigned int)
 int getitimer(int, struct itimerval *)
 int rt_sigprocmask(int, const sigset_t *, sigset_t *, size_t)
 <?> unsigned int alarm(unsigned int)
 int getitimer(int, struct itimerval *)
index 8310e26381d08f9614649e338e942ea50346da29..ecd1307d7fd6c4592a8625c68e420a1c30a9b61c 100644 (file)
@@ -8,16 +8,16 @@
 #
 
 # Enable this to compile with register parameters; only safe for
 #
 
 # Enable this to compile with register parameters; only safe for
-# gcc > 3
-REGPARM_OPT := -mregparm=3 -DREGPARM=3
+# gcc >= 3
+REGPARM_OPT := -mregparm=3 -D_REGPARM=3
 
 gcc_major := $(shell echo __GNUC__ | $(CC) -E -xc - | tail -n 1)
 
 
 gcc_major := $(shell echo __GNUC__ | $(CC) -E -xc - | tail -n 1)
 
-OPTFLAGS  = -march=i386 -Os -g
+OPTFLAGS  = -march=i386 -Os -g -fomit-frame-pointer
 LDFLAGS   = -m elf_i386
 
 LDFLAGS   = -m elf_i386
 
-ifneq ($(shell if [ $(gcc_major) -gt 2 ] ; then echo "new"; fi ;),)
-REGPARM  := $(REGPARM_OPT)
+ifneq ($(gcc_major),2)
+REQFLAGS += $(REGPARM_OPT)
 OPTFLAGS += -falign-functions=0 -falign-jumps=0 -falign-loops=0
 ARCHREQFLAGS += -m32
 else
 OPTFLAGS += -falign-functions=0 -falign-jumps=0 -falign-loops=0
 ARCHREQFLAGS += -m32
 else
index 0f3a7db35edacad3b2d0cc5db4132c459d1c7094..fb02c694c094a10c82261e88e81922bf7087ce5d 100644 (file)
@@ -20,7 +20,7 @@ _start:
        push %ebp               # Keep gdb from getting confused
        push %ebp               # Keep gdb from getting confused
        # Push the arguments and called __libc_init()
        push %ebp               # Keep gdb from getting confused
        push %ebp               # Keep gdb from getting confused
        # Push the arguments and called __libc_init()
-#ifndef REGPARM
+#ifndef _REGPARM
        push %edx               # atexit() function
        push %eax               # ELF array
 #endif
        push %edx               # atexit() function
        push %eax               # ELF array
 #endif
index 59ff563ad8da131512b8c1ea2f626223f0a159a3..ed23d98bcb7b39e67c03ef813ce9766be9237389 100644 (file)
@@ -28,7 +28,7 @@ exit:
        .globl _exit
        .type _exit,@function
 _exit:
        .globl _exit
        .type _exit,@function
 _exit:
-#ifdef REGPARM
+#ifdef _REGPARM
        movl %eax,%ebx
 #else
        popl %ebx
        movl %eax,%ebx
 #else
        popl %ebx
index 80ed4be3cf01afa24c28b70cef3355234376d355..61982eb0eb1f049ad19997996770af92e00d24c1 100644 (file)
@@ -8,7 +8,7 @@
        .globl __ashldi3
        .type __ashldi3,@function
 __ashldi3:
        .globl __ashldi3
        .type __ashldi3,@function
 __ashldi3:
-#ifndef REGPARM
+#ifndef _REGPARM
        movl  4(%esp),%eax
        movl  8(%esp),%edx
        movb  12(%esp),%cl
        movl  4(%esp),%eax
        movl  8(%esp),%edx
        movb  12(%esp),%cl
index ba43f9022a9809d94ecb47b461d0e01d28e8d729..4ac2af69a1d82aea16d2e69290a67ab594a8835c 100644 (file)
@@ -8,7 +8,7 @@
        .globl __ashrdi3
        .type __ashrdi3,@function
 __ashrdi3:
        .globl __ashrdi3
        .type __ashrdi3,@function
 __ashrdi3:
-#ifndef REGPARM
+#ifndef _REGPARM
        movl  4(%esp),%eax
        movl  8(%esp),%edx
        movb  12(%esp),%cl
        movl  4(%esp),%eax
        movl  8(%esp),%edx
        movb  12(%esp),%cl
index 6e521ace2cd3c1a68173bc7d7536d97065bc968a..730ee43178f1000576177f1f635ad644b93768ef 100644 (file)
@@ -8,7 +8,7 @@
        .globl __lshrdi3
        .type __lshrdi3,@function
 __lshrdi3:
        .globl __lshrdi3
        .type __lshrdi3,@function
 __lshrdi3:
-#ifndef REGPARM
+#ifndef _REGPARM
        movl  4(%esp),%eax
        movl  8(%esp),%edx
        movb  12(%esp),%cl
        movl  4(%esp),%eax
        movl  8(%esp),%edx
        movb  12(%esp),%cl
index c164588b16b5aadfba7fe3c662d677b1de6e4b93..81e23b190e94f363c3a56a737b2531a96ab14ac6 100644 (file)
@@ -10,7 +10,7 @@
        .type __muldi3,@function
 __muldi3:
        push  %esi
        .type __muldi3,@function
 __muldi3:
        push  %esi
-#ifndef REGPARM
+#ifndef _REGPARM
        movl  8(%esp),%eax
        movl  %eax,%esi
        movl  16(%esp),%ecx
        movl  8(%esp),%eax
        movl  %eax,%esi
        movl  16(%esp),%ecx
index 6c95cb235c379c46699f83979ee08c8c75f336b0..c4f2cd517e849114fb3995dacf8231a63ab12bb6 100644 (file)
@@ -9,7 +9,7 @@
        .globl __negdi2
        .type __negdi2,@function
 __negdi2:
        .globl __negdi2
        .type __negdi2,@function
 __negdi2:
-#ifndef REGPARM
+#ifndef _REGPARM
        movl 4(%esp),%eax
        movl 8(%esp),%edx
 #endif
        movl 4(%esp),%eax
        movl 8(%esp),%edx
 #endif
index 4f492a156621e2a4f3b7c965694f59e35949616b..54dd6151d17c56b68514b6059bb57a4ddf970c84 100644 (file)
@@ -15,7 +15,7 @@
        .type   open,@function
 
 open:
        .type   open,@function
 
 open:
-#ifdef REGPARM
+#ifdef _REGPARM
        movl    4(%esp),%eax
        movl    8(%esp),%edx
        movl    12(%esp),%ecx
        movl    4(%esp),%eax
        movl    8(%esp),%edx
        movl    12(%esp),%ecx
index bea900c51976b030f9a9fbaad7cf13065f3c6137..2f3033f5bd43d53bb4119f68132f27ed7cf8415a 100644 (file)
@@ -19,7 +19,7 @@
        .globl setjmp
        .type setjmp, @function
 setjmp:
        .globl setjmp
        .type setjmp, @function
 setjmp:
-#ifdef REGPARM
+#ifdef _REGPARM
        movl %eax,%edx
 #else
        movl 4(%esp),%edx
        movl %eax,%edx
 #else
        movl 4(%esp),%edx
@@ -42,7 +42,7 @@ setjmp:
        .globl longjmp
        .type longjmp, @function
 longjmp:
        .globl longjmp
        .type longjmp, @function
 longjmp:
-#ifdef REGPARM
+#ifdef _REGPARM
        xchgl %eax,%edx
 #else
        movl 4(%esp),%edx               # jmp_ptr address
        xchgl %eax,%edx
 #else
        movl 4(%esp),%edx               # jmp_ptr address
index f8fa7b4dd3aab71402575bad1ccd4b218ca666e7..0634e8208aeadc5abd888d4fce153f3ab523fc5c 100644 (file)
@@ -14,7 +14,7 @@
        .globl  __syscall_common
        .type   __syscall_common,@function
 __syscall_common:
        .globl  __syscall_common
        .type   __syscall_common,@function
 __syscall_common:
-#ifdef REGPARM
+#ifdef _REGPARM
        xchgl   %ebx,(%esp)
 #else
        popl    %eax
        xchgl   %ebx,(%esp)
 #else
        popl    %eax
@@ -24,7 +24,7 @@ __syscall_common:
        pushl   %edi
        pushl   %ebp
 
        pushl   %edi
        pushl   %ebp
 
-#ifdef REGPARM
+#ifdef _REGPARM
        xchgl   %eax,%ebx
        xchgl   %ecx,%edx
        movl    ARG(0),%esi
        xchgl   %eax,%ebx
        xchgl   %ecx,%edx
        movl    ARG(0),%esi
index eaa818091140e98fce79d9c531d33bdc79226249..1ba7f36bac989af51cdb4457ac48730242fecf84 100644 (file)
@@ -16,7 +16,7 @@ sub make_sysstub($$$$@) {
     print OUT "${fname}:\n";
 
     if ( $stype eq 'varadic' ) {
     print OUT "${fname}:\n";
 
     if ( $stype eq 'varadic' ) {
-       print OUT "#ifdef REGPARM\n";
+       print OUT "#ifdef _REGPARM\n";
        print OUT "\tmovl  4(%esp),%eax\n";
        print OUT "\tmovl  8(%esp),%edx\n";
        print OUT "\tmovl 12(%esp),%ecx\n";
        print OUT "\tmovl  4(%esp),%eax\n";
        print OUT "\tmovl  8(%esp),%edx\n";
        print OUT "\tmovl 12(%esp),%ecx\n";
index a2a23676336b8ac21175d5028847adf2bcfbfeec..13b6e391f9910e5b9df3ad275c84ecfad8fb7340 100644 (file)
@@ -26,3 +26,6 @@ LDFLAGS      = -m elf_x86_64
 # 2 MB - normal binaries start at 4 MB
 SHAREDFLAGS     = -Ttext 0x00200200
 
 # 2 MB - normal binaries start at 4 MB
 SHAREDFLAGS     = -Ttext 0x00200200
 
+# Additional asm- directories needed during installation
+ASMARCH = asm-i386
+
index d52b53a6992af4400622212947d50864d3a89e49..cb1f5195dbe815b48f2b107db782b779c7a7ee66 100644 (file)
@@ -8,8 +8,9 @@
 #define _KLIBC_IN_OPEN_C
 #include <unistd.h>
 #include <fcntl.h>
 #define _KLIBC_IN_OPEN_C
 #include <unistd.h>
 #include <fcntl.h>
+#include <bitsize.h>
 
 
-#if BITSIZE == 32 && !defined(__i386__)
+#if _BITSIZE == 32 && !defined(__i386__)
 
 extern int __open(const char *, int, mode_t);
 
 
 extern int __open(const char *, int, mode_t);
 
index 885bc6a4a416ab275a8feb14e3b1164d11900356..819ffd4fe82efbc812d14d300fcdb95b2b4d54a5 100644 (file)
@@ -5,7 +5,7 @@
 #include <signal.h>
 #include <sys/syscall.h>
 
 #include <signal.h>
 #include <sys/syscall.h>
 
-#if !defined(__NR_sigaction)
+#ifndef __NR_sigaction
 
 int sigaction(int sig, const struct sigaction *act, struct sigaction *oact)
 {
 
 int sigaction(int sig, const struct sigaction *act, struct sigaction *oact)
 {
index 58be07ab5e7b8058c059374b843228bf2053ab09..1f3970210034cfcbc8cf19d7a8599ee4283f77c0 100644 (file)
@@ -1 +1 @@
-0.205
+0.211