r4700 - in glibc-package/trunk/debian: . control.in patches patches/mips script.in sysdeps
Author: aurel32
Date: 2011-06-04 13:16:32 +0000 (Sat, 04 Jun 2011)
New Revision: 4700
Added:
glibc-package/trunk/debian/patches/mips/submitted-dl-platform.diff
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/control
glibc-package/trunk/debian/control.in/opt
glibc-package/trunk/debian/patches/series
glibc-package/trunk/debian/script.in/nohwcap.sh
glibc-package/trunk/debian/sysdeps/mipsel.mk
Log:
* Add a loongson2f optimized library. Closes: #601419.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2011-06-04 12:41:33 UTC (rev 4699)
+++ glibc-package/trunk/debian/changelog 2011-06-04 13:16:32 UTC (rev 4700)
@@ -35,6 +35,9 @@
ELF_RTYPE_CLASS_COPY lookups.
* Replace patches/any/local-dl-deps.diff by upstream version
patches/any/cvs-dl-deps.diff.
+ * Add patches/mips/submitted-dl-platform.diff from Robert Millan to
+ add dl-platform support for MIPS.
+ * Add a loongson2f optimized library. Closes: #601419.
[ Steve Langasek ]
* Tighten the dependency on dpkg to a multiarch aware version.
Modified: glibc-package/trunk/debian/control
===================================================================
--- glibc-package/trunk/debian/control 2011-06-04 12:41:33 UTC (rev 4699)
+++ glibc-package/trunk/debian/control 2011-06-04 13:16:32 UTC (rev 4700)
@@ -777,6 +777,22 @@
needs to be installed on Alpha EV67/68 and EV7 machines. If you install
this on an older machine, it won't even be used.
+Package: libc6-loongson2f
+Architecture: mipsel
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc6 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries (Loongson 2F optimized)
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for the Loongson 2F. It only
+ needs to be installed on Lemote Loongson 2F machines. If you install
+ this on a non-Loongson, it won't even be used.
+
Package: libnss-dns-udeb
XC-Package-Type: udeb
Architecture: any
Modified: glibc-package/trunk/debian/control.in/opt
===================================================================
--- glibc-package/trunk/debian/control.in/opt 2011-06-04 12:41:33 UTC (rev 4699)
+++ glibc-package/trunk/debian/control.in/opt 2011-06-04 13:16:32 UTC (rev 4700)
@@ -98,3 +98,19 @@
needs to be installed on Alpha EV67/68 and EV7 machines. If you install
this on an older machine, it won't even be used.
+Package: libc6-loongson2f
+Architecture: mipsel
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc6 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries (Loongson 2F optimized)
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for the Loongson 2F. It only
+ needs to be installed on Lemote Loongson 2F machines. If you install
+ this on a non-Loongson, it won't even be used.
+
Added: glibc-package/trunk/debian/patches/mips/submitted-dl-platform.diff
===================================================================
--- glibc-package/trunk/debian/patches/mips/submitted-dl-platform.diff (rev 0)
+++ glibc-package/trunk/debian/patches/mips/submitted-dl-platform.diff 2011-06-04 13:16:32 UTC (rev 4700)
@@ -0,0 +1,162 @@
+http://sources.redhat.com/bugzilla/show_bug.cgi?id=12193
+
+--- a/ports/sysdeps/mips/dl-machine.h
++++ b/ports/sysdeps/mips/dl-machine.h
+@@ -305,6 +305,18 @@
+ # define ARCH_LA_PLTEXIT mips_n64_gnu_pltexit
+ # endif
+
++/* We define an initialization function. This is called very early in
++ _dl_sysdep_start. */
++#define DL_PLATFORM_INIT dl_platform_init ()
++
++static inline void __attribute__ ((unused))
++dl_platform_init (void)
++{
++ if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0')
++ /* Avoid an empty string which would disturb us. */
++ GLRO(dl_platform) = NULL;
++}
++
+ /* For a non-writable PLT, rewrite the .got.plt entry at RELOC_ADDR to
+ point at the symbol with address VALUE. For a writable PLT, rewrite
+ the corresponding PLT entry instead. */
+--- a/ports/sysdeps/mips/dl-procinfo.c
++++ b/ports/sysdeps/mips/dl-procinfo.c
+@@ -0,0 +1,64 @@
++/* Data for Mips version of processor capability information.
++ Copyright (C) 2007 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Robert Millan <rmh@gnu.org>.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* This information must be kept in sync with the _DL_PLATFORM_COUNT
++ definitions in procinfo.h.
++
++ If anything should be added here check whether the size of each string
++ is still ok with the given array size.
++
++ All the #ifdefs in the definitions are quite irritating but
++ necessary if we want to avoid duplicating the information. There
++ are three different modes:
++
++ - PROCINFO_DECL is defined. This means we are only interested in
++ declarations.
++
++ - PROCINFO_DECL is not defined:
++
++ + if SHARED is defined the file is included in an array
++ initializer. The .element = { ... } syntax is needed.
++
++ + if SHARED is not defined a normal array initialization is
++ needed.
++ */
++
++#ifndef PROCINFO_CLASS
++#define PROCINFO_CLASS
++#endif
++
++#if !defined PROCINFO_DECL && defined SHARED
++ ._dl_mips_platforms
++#else
++PROCINFO_CLASS const char _dl_mips_platforms[4][11]
++#endif
++#ifndef PROCINFO_DECL
++= {
++ "loongson2e", "loongson2f", "octeon", "octeon2"
++ }
++#endif
++#if !defined SHARED || defined PROCINFO_DECL
++;
++#else
++,
++#endif
++
++#undef PROCINFO_DECL
++#undef PROCINFO_CLASS
+diff -Nur eglibc-2.11.2/ports/sysdeps/mips/dl-procinfo.h eglibc-2.11.2.new/ports/sysdeps/mips/dl-procinfo.h
+--- eglibc-2.11.2/ports/sysdeps/mips/dl-procinfo.h 1970-01-01 01:00:00.000000000 +0100
++++ eglibc-2.11.2.new/ports/sysdeps/mips/dl-procinfo.h 2010-11-03 19:16:37.000000000 +0100
+@@ -0,0 +1,68 @@
++/* Mips version of processor capability information handling macros.
++ Copyright (C) 2007 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Robert Millan <rmh@gnu.org>.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef _DL_PROCINFO_H
++#define _DL_PROCINFO_H 1
++
++#include <ldsodefs.h>
++
++
++/* Mask to filter out platforms. */
++#define _DL_HWCAP_PLATFORM (-1ULL)
++
++#define _DL_PLATFORMS_COUNT 1
++
++static inline const char *
++__attribute__ ((unused))
++_dl_platform_string (int idx)
++{
++ return GLRO(dl_mips_platforms)[idx];
++};
++
++static inline int
++__attribute__ ((unused, always_inline))
++_dl_string_platform (const char *str)
++{
++ int i;
++
++ if (str != NULL)
++ for (i = 0; i < _DL_PLATFORMS_COUNT; ++i)
++ {
++ if (strcmp (str, _dl_platform_string (i)) == 0)
++ return i;
++ }
++ return -1;
++};
++
++/* We cannot provide a general printing function. */
++#define _dl_procinfo(word) -1
++
++/* There are no hardware capabilities defined. */
++#define _dl_hwcap_string(idx) ""
++
++/* By default there is no important hardware capability. */
++#define HWCAP_IMPORTANT (0)
++
++/* We don't have any hardware capabilities. */
++#define _DL_HWCAP_COUNT 0
++
++#define _dl_string_hwcap(str) (-1)
++
++#endif /* dl-procinfo.h */
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2011-06-04 12:41:33 UTC (rev 4699)
+++ glibc-package/trunk/debian/patches/series 2011-06-04 13:16:32 UTC (rev 4700)
@@ -165,6 +165,7 @@
mips/local-lowlevellock.diff
mips/local-r10k.diff
mips/submitted-rld_map.diff
+mips/submitted-dl-platform.diff
powerpc/local-libgcc_eh-ld.so.diff
Modified: glibc-package/trunk/debian/script.in/nohwcap.sh
===================================================================
--- glibc-package/trunk/debian/script.in/nohwcap.sh 2011-06-04 12:41:33 UTC (rev 4699)
+++ glibc-package/trunk/debian/script.in/nohwcap.sh 2011-06-04 13:16:32 UTC (rev 4700)
@@ -16,6 +16,9 @@
kfreebsd-i386)
hwcappkgs="libc0.1-i686"
;;
+ mipsel)
+ hwcappkgs="libc6-loongson2f"
+ ;;
sparc)
hwcappkgs="libc6-sparcv9 libc6-sparcv9b"
;;
Modified: glibc-package/trunk/debian/sysdeps/mipsel.mk
===================================================================
--- glibc-package/trunk/debian/sysdeps/mipsel.mk 2011-06-04 12:41:33 UTC (rev 4699)
+++ glibc-package/trunk/debian/sysdeps/mipsel.mk 2011-06-04 13:16:32 UTC (rev 4700)
@@ -26,6 +26,17 @@
mips64_libdir = /usr/lib64
mips64_extra_config_options := $(extra_config_options) --disable-profile
+# build a loongson-2f optimized library
+EGLIBC_PASSES += loongson2f
+DEB_ARCH_REGULAR_PACKAGES += libc6-loongson2f
+loongson2f_add-ons = ports nptl $(add-ons)
+loongson2f_configure_target = mips32el-linux-gnu
+loongson2f_CC = $(CC) -mabi=32
+loongson2f_CXX = $(CXX) -mabi=32
+loongson2f_extra_cflags = -march=loongson2f -mtune=loongson2f -O2
+loongson2f_extra_config_options = $(extra_config_options) --disable-profile
+loongson2f_slibdir = /lib/$(DEB_HOST_MULTIARCH)/loongson2f
+
# Need to put a tri-arch aware version of ldd in the base package
define mipsn32_extra_install
cp debian/tmp-mipsn32/usr/bin/ldd debian/tmp-libc/usr/bin
Reply to: