Bug#601419: libc6: please build a loongson-2f optimized library

2010-11-04 Thread Robert Millan
See http://sources.redhat.com/bugzilla/show_bug.cgi?id=12193

-- 
Robert Millan



-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktinmu6=x5fq7-barvdqxqfoph=qhp03zq_o2p...@mail.gmail.com



Bug#601419: libc6: please build a loongson-2f optimized library

2010-11-04 Thread Aurelien Jarno
Robert Millan a écrit :
 See http://sources.redhat.com/bugzilla/show_bug.cgi?id=12193
 

I am not sure you want to define an octeon2 platform. Contrary to
longsoon which has specific instructions, octeon is following the
standard MIPS instruction sets.

It would make more sense to export MIPS32, 32R2, 64 and 64R2
capabilities. Having a MIPS32 optimized library eglibc makes a lot of
sense for the vast majority of CPU we target (except longsoon).


-- 
Aurelien Jarno  GPG: 1024D/F1BCDB73
aurel...@aurel32.net http://www.aurel32.net



-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4cd2ef17.6090...@aurel32.net



Bug#601419: libc6: please build a loongson-2f optimized library

2010-11-04 Thread Robert Millan
2010/11/4 Aurelien Jarno aurel...@aurel32.net:
 Robert Millan a écrit :
 See http://sources.redhat.com/bugzilla/show_bug.cgi?id=12193


 I am not sure you want to define an octeon2 platform. Contrary to
 longsoon which has specific instructions, octeon is following the
 standard MIPS instruction sets.

 It would make more sense to export MIPS32, 32R2, 64 and 64R2
 capabilities. Having a MIPS32 optimized library eglibc makes a lot of
 sense for the vast majority of CPU we target (except longsoon).

Thanks for the correction. Do you mind if I add this to upstream's
bug log?

-- 
Robert Millan



--
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktikqnlsfvv2ezvhttbpc8ksmbpv_kn_pnkwcs...@mail.gmail.com



Bug#601419: libc6: please build a loongson-2f optimized library

2010-11-04 Thread Aurelien Jarno
On Thu, Nov 04, 2010 at 07:31:14PM +0100, Robert Millan wrote:
 2010/11/4 Aurelien Jarno aurel...@aurel32.net:
  Robert Millan a écrit :
  See http://sources.redhat.com/bugzilla/show_bug.cgi?id=12193
 
 
  I am not sure you want to define an octeon2 platform. Contrary to
  longsoon which has specific instructions, octeon is following the
  standard MIPS instruction sets.
 
  It would make more sense to export MIPS32, 32R2, 64 and 64R2
  capabilities. Having a MIPS32 optimized library eglibc makes a lot of
  sense for the vast majority of CPU we target (except longsoon).
 
 Thanks for the correction. Do you mind if I add this to upstream's
 bug log?
 

No problem from my side.

-- 
Aurelien Jarno  GPG: 1024D/F1BCDB73
aurel...@aurel32.net http://www.aurel32.net



-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20101104183821.ge17...@hall.aurel32.net



Bug#601419: libc6: please build a loongson-2f optimized library

2010-11-03 Thread Robert Millan
2010/11/1 Robert Millan r...@debian.org:
 2010/10/31 Aurelien Jarno aurel...@aurel32.net:
 Wrong, for alpha we have code to add hardware capabilities support.

 I'm a bit confused now.  I looked at the code in debian/patches/, and

Never mind, I figured it out.  It seems Linux should set AT_PLATFORM
variable, which it doesn't yet.



--
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktin7zfansyvxxz1yvtriuj09zdga5tpknkmj4...@mail.gmail.com



Bug#601419: libc6: please build a loongson-2f optimized library

2010-11-01 Thread Robert Millan
2010/10/31 Aurelien Jarno aurel...@aurel32.net:
 Wrong, for alpha we have code to add hardware capabilities support.

I'm a bit confused now.  I looked at the code in debian/patches/, and
it adds some functions internal declarations, but I can't see where's
the actual hardware detection.

Can you give me some pointer?  I know how to probe for loongson
but I'm unsure where should this code be plugged.  I assume similar
changes to the ones in debian/patches/alpha/ will be needed, but
still something seems missing.



-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlkti=brgctx-v1wd2=1elp5r1vwv9wll3gd5y7l...@mail.gmail.com



Bug#601419: libc6: please build a loongson-2f optimized library

2010-10-31 Thread Robert Millan
2010/10/30 Aurelien Jarno aurel...@aurel32.net:
 I don't see any loongson-2f hardware capabilities in the current
 (e)glibc code.

Yes.  Note that it isn't the only one in this situation (libc6.1-alphaev67).

 How is it handled?

One could use LD_LIBRARY_PATH, or enable it system-wide with:

  echo /lib/loongson-2f  /etc/ld.so.conf.d/loongson-2f.conf
  ldconfig

Both approaches are tested on my Yeeloong.



-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktin5ok3jmi4som8ifaogwizgz473_+ynndow4...@mail.gmail.com



Bug#601419: libc6: please build a loongson-2f optimized library

2010-10-31 Thread Aurelien Jarno
On Sun, Oct 31, 2010 at 01:44:18PM +0100, Robert Millan wrote:
 2010/10/30 Aurelien Jarno aurel...@aurel32.net:
  I don't see any loongson-2f hardware capabilities in the current
  (e)glibc code.
 
 Yes.  Note that it isn't the only one in this situation (libc6.1-alphaev67).

Wrong, for alpha we have code to add hardware capabilities support.

  How is it handled?
 
 One could use LD_LIBRARY_PATH, or enable it system-wide with:
 
   echo /lib/loongson-2f  /etc/ld.so.conf.d/loongson-2f.conf
   ldconfig

Then the description for the package is wrong. Also I don't really like
this solution, we should support hardware capabilities so that users
have nothing to do.

-- 
Aurelien Jarno  GPG: 1024D/F1BCDB73
aurel...@aurel32.net http://www.aurel32.net



-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20101031130440.ga5...@volta.aurel32.net



Bug#601419: libc6: please build a loongson-2f optimized library

2010-10-30 Thread Aurelien Jarno
On Tue, Oct 26, 2010 at 12:18:44AM +0200, Robert Millan wrote:
 Package: libc6
 Version: 2.11.2-6
 Severity: wishlist
 Tags: patch
 
 Please could you build a loongson-2f optimized library?
 
 A (tested) patch is attached.
 

I don't see any loongson-2f hardware capabilities in the current 
(e)glibc code. How is it handled? Is the library used on loongson-2f
CPU? Only on them?

-- 
Aurelien Jarno  GPG: 1024D/F1BCDB73
aurel...@aurel32.net http://www.aurel32.net



-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20101030091944.ga6...@volta.aurel32.net



Bug#601419: libc6: please build a loongson-2f optimized library

2010-10-25 Thread Robert Millan
Package: libc6
Version: 2.11.2-6
Severity: wishlist
Tags: patch

Please could you build a loongson-2f optimized library?

A (tested) patch is attached.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: mipsel (mips64)

Kernel: Linux 2.6.35.7-libre2-lemote (PREEMPT)
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libc6 depends on:
ii  libc-bin  2.11.2-6   Embedded GNU C Library: Binaries
ii  libgcc1   1:4.4.5-2  GCC support library

libc6 recommends no packages.

Versions of packages libc6 suggests:
ii  debconf [debconf-2.0] 1.5.35 Debian configuration management sy
pn  glibc-doc none (no description available)
ii  locales   2.11.2-6   Embedded GNU C Library: National L

-- debconf information excluded
diff -ur -x control eglibc-2.11.2/debian/control.in/opt eglibc-2.11.2.new/debian/control.in/opt
--- eglibc-2.11.2/debian/control.in/opt	2010-10-22 14:13:56.0 +0200
+++ eglibc-2.11.2.new/debian/control.in/opt	2010-10-20 11:58:09.0 +0200
@@ -107,3 +107,18 @@
  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-loongson-2f
+Architecture: mipsel
+Section: libs
+Priority: extra
+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.
+
diff -ur -x control eglibc-2.11.2/debian/script.in/nohwcap.sh eglibc-2.11.2.new/debian/script.in/nohwcap.sh
--- eglibc-2.11.2/debian/script.in/nohwcap.sh	2010-10-22 14:13:56.0 +0200
+++ eglibc-2.11.2.new/debian/script.in/nohwcap.sh	2010-10-20 11:58:09.0 +0200
@@ -16,6 +16,9 @@
 kfreebsd-i386)
 hwcappkgs=libc0.1-i686
 ;;
+mipsel)
+	hwcappkgs=libc6-loongson-2f
+	;;
 sparc)
 hwcappkgs=libc6-sparcv9 libc6-sparcv9b
 ;;
diff -ur -x control eglibc-2.11.2/debian/sysdeps/mipsel.mk eglibc-2.11.2.new/debian/sysdeps/mipsel.mk
--- eglibc-2.11.2/debian/sysdeps/mipsel.mk	2010-10-22 14:13:56.0 +0200
+++ eglibc-2.11.2.new/debian/sysdeps/mipsel.mk	2010-10-21 12:50:06.0 +0200
@@ -24,6 +24,18 @@
 mips64_libdir = /usr/lib64
 mips64_extra_config_options := $(extra_config_options) --disable-profile
 
+# build a loongson-2f optimized library
+EGLIBC_PASSES += loongson-2f
+DEB_ARCH_REGULAR_PACKAGES += libc6-loongson-2f
+loongson-2f_add-ons = ports nptl $(add-ons)
+loongson-2f_configure_target = mips32el-linux-gnu
+loongson-2f_CC = $(CC) -mabi=32
+loongson-2f_CXX = $(CXX) -mabi=32
+loongson-2f_extra_cflags = -march=loongson2f -mtune=loongson2f -O2
+loongson-2f_extra_config_options = $(extra_config_options) --disable-profile
+loongson-2f_rtlddir = /lib
+loongson-2f_slibdir = /lib/loongson-2f
+
 # 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