chiark / gitweb /
[PATCH] klibc: version 0.214
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Mon, 7 Mar 2005 06:04:46 +0000 (07:04 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 06:51:00 +0000 (23:51 -0700)
klibc/MCONFIG
klibc/Makefile
klibc/include/klibc/compiler.h
klibc/klcc.in
klibc/klibc/arch/sparc/MCONFIG
klibc/klibc/arch/sparc/Makefile.inc
klibc/klibc/arch/sparc/crt0.S
klibc/version

index c83349948354e5e877968757fc630e47ea6f97e8..7a24b821adf5192d104716754f3fb43e469a21a8 100644 (file)
@@ -59,7 +59,7 @@ HOST_LIBS    =
 # Static library paths
 CRT0      = $(KLIBOBJ)/crt0.o
 KLIBC     = $(KLIBOBJ)/libc.a
-LIBGCC    = $(shell $(CC) --print-libgcc)
+LIBGCC    = $(shell $(CC) $(REQFLAGS) $(OPTFLAGS) --print-libgcc)
 
 # Shared library paths
 CRTSHARED = $(KLIBOBJ)/interp.o
index 812ea92f474f48d4a29fa7854125c856cde17a4b..a512aa308aeda11c05d2f7454bc3d4d64a803ba0 100644 (file)
@@ -54,7 +54,7 @@ local-install: $(CROSS)klcc
        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 \
+       set -xe ; for d in linux scsi asm-$(ARCH) asm-generic $(ASMARCH); do \
          mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)include/$$d ; \
          for r in $(KRNLSRC)/include $(KRNLOBJ)/include $(KRNLOBJ)/include2 ; do \
            [ ! -d $$r/$$d ] || \
index 823996e7773cf9a53e2f3c2560948a36787275a6..ee697adf0832610085fae3c18fe40287bc3e9327 100644 (file)
@@ -22,7 +22,7 @@
 
 /* How to declare a function that *must* be inlined */
 #ifdef __GNUC__
-# if __GNUC_MAJOR__ >= 3
+# if __GNUC__ >= 3
 #  define __must_inline static __inline__ __attribute__((always_inline))
 # else
 #  define __must_inline extern __inline__
 #endif
 
 /* malloc() function (returns unaliased pointer) */
-#if defined(__GNUC__) && (__GNUC_MAJOR__ >= 3)
+#if defined(__GNUC__) && (__GNUC__ >= 3)
 # define __mallocfunc __attribute__((malloc))
 #else
 # define __mallocfunc
 #endif
 
 /* likely/unlikely */
-#if defined(__GNUC__) && (__GNUC_MAJOR__ > 2 || (__GNUC_MAJOR__ == 2 && __GNUC_MINOR__ >= 95))
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
 # define __likely(x)   __builtin_expect((x), 1)
 # define __unlikely(x) __builtin_expect((x), 0)
 #else
index bdd03e73b3399642fd7cba15e273d5330f64d4e5..d8721c9a6bacda613cc19cff9c52dd83c0643b62 100644 (file)
@@ -77,6 +77,11 @@ sub mysystem(@) {
     return system(@_);
 }
 
+#
+# Initialization
+# 
+open(NULL, '+<', '/dev/null') or die "$0: cannot open /dev/null\n";
+
 #
 # Begin parsing options.
 #
@@ -191,10 +196,17 @@ if ( $operation ne '' ) {
        }
     }
 
+    # Get the libgcc pathname for the *current* gcc
+    open(LIBGCC, '-|', $CC, @ccopt, '-print-libgcc-file-name')
+       or die "$0: cannot get libgcc filename\n";
+    $libgcc = <LIBGCC>;
+    chomp $libgcc;
+    close(LIBGCC);
+
     if ( $shared ) {
-       $rv = mysystem($LD, @LDFLAGS, @sharedopt, @ldopt, @outopt, @objs, @sharedlib);
+       $rv = mysystem($LD, @LDFLAGS, @sharedopt, @ldopt, @outopt, @objs, @sharedlib, $libgcc);
     } else {
-       $rv = mysystem($LD, @LDFLAGS, @staticopt, @ldopt, @outopt, @objs, @staticlib);
+       $rv = mysystem($LD, @LDFLAGS, @staticopt, @ldopt, @outopt, @objs, @staticlib, $libgcc);
     }
 
     unlink(@rmobjs);
index 55f8b198c2aed3df3528a7eb9218349e6cdcbb9d..3a5cbaa2e717edf6d4d1f473142f9587d988a8f9 100644 (file)
@@ -7,7 +7,7 @@
 # accordingly.
 #
 
-OPTFLAGS = -Os
+OPTFLAGS = -Os -m32 -mptr32
 BITSIZE  = 32
 
 # Extra linkflags when building the shared version of the library
index 6ea66114fa7eb68d7922b5795b12b9688430a499..bea1dbc94e83d4be2363df0714995b4c08b5a042 100644 (file)
@@ -16,7 +16,12 @@ ARCHOBJS = \
        arch/$(ARCH)/umul.o \
        arch/$(ARCH)/setjmp.o \
        arch/$(ARCH)/syscall.o \
-       arch/$(ARCH)/sysfork.o
+       arch/$(ARCH)/sysfork.o \
+       libgcc/__divdi3.o \
+       libgcc/__moddi3.o \
+       libgcc/__udivdi3.o \
+       libgcc/__umoddi3.o \
+       libgcc/__udivmoddi4.o
 
 arch/$(ARCH)/sdiv.S: arch/$(ARCH)/divrem.m4
        @echo 'building $@ from $^'
index 148cb4b4e9925a8c32a2fc71c3295ca4b711309f..63db1889618cd69b6bc3b34d4e2ee2f865cc2b84 100644 (file)
@@ -1,2 +1,2 @@
 #define TARGET_PTR_SIZE        32
-#include "arch/sparc/crt0i.S"
+#include "crt0i.S"
index 1f3970210034cfcbc8cf19d7a8599ee4283f77c0..136a629e2d96a8eae35522570bd18af677d66d7e 100644 (file)
@@ -1 +1 @@
-0.211
+0.214