patches/glibc/2.7/240-sh-lowlevellock-asm.patch
author "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
Thu Jul 28 22:09:31 2011 +0200 (2011-07-28)
changeset 2573 424fa2092ace
permissions -rw-r--r--
scripts/libc: do not build add-ons by default

Currently, no --enable-add-ons option is passed to libc configure when
"$(do_libc_add_ons_list ,)" is empty, which makes configure automatically search
for present add-ons. In that case, all present add-ons are built, although
no add-on was selected by the user in the config. Moreover, this can make the
configure fail if some non-standard add-ons like eglibc-localedef are present.

This behavior also leads to an inconsistency from a user point of view between
the following cases:
- LIBC_ADDONS_LIST="", LIBC_GLIBC_USE_PORTS=n and THREADS="none" in the config,
which makes "$(do_libc_add_ons_list ,)" return "", so all present add-ons
are built.
- LIBC_ADDONS_LIST="", LIBC_GLIBC_USE_PORTS=n and THREADS!="none" in the
config, which makes "$(do_libc_add_ons_list ,)" return the add-on supporting
the chosen threading implementation, e.g. "nptl", so only this add-on is
built.

This patch disables the building of all add-ons in that case.

It is still possible to build all present add-ons by adding --enable-add-ons to
LIBC_GLIBC_EXTRA_CONFIG_ARRAY.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
yann@962
     1
--- glibc-2.7/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S.orig	2007-08-03 16:44:15.000000000 +0100
yann@962
     2
+++ glibc-2.7/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S	2008-08-19 21:08:19.000000000 +0100
yann@962
     3
@@ -76,7 +76,7 @@
yann@962
     4
 	add	tmp2, tmp 	; \
yann@962
     5
 	mov.l	@tmp, tmp2	; \
yann@962
     6
 	bra	98f		; \
yann@962
     7
-	 mov	#FUTEX_PRIVATE_FLAG, tmp
yann@962
     8
+	 mov	#FUTEX_PRIVATE_FLAG, tmp ; \
yann@962
     9
 99:	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
yann@962
    10
 98:	extu.b	tmp, tmp	; \
yann@962
    11
 	xor	tmp, reg	; \
yann@962
    12
@@ -88,7 +88,7 @@
yann@962
    13
 	add	tmp2, tmp 	; \
yann@962
    14
 	mov.l	@tmp, tmp2	; \
yann@962
    15
 	bra	98f		; \
yann@962
    16
-	 mov	#FUTEX_PRIVATE_FLAG, tmp
yann@962
    17
+	 mov	#FUTEX_PRIVATE_FLAG, tmp ; \
yann@962
    18
 99:	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
yann@962
    19
 98:	extu.b	tmp, tmp	; \
yann@962
    20
 	xor	tmp, reg	; \
yann@962
    21
@@ -96,13 +96,13 @@
yann@962
    22
 	mov	#FUTEX_WAIT, tmp ; \
yann@962
    23
 	or	tmp, reg
yann@962
    24
 # endif
yann@962
    25
-# define LOAD_FUTEX_WAKE(reg,tmp) \
yann@962
    26
+# define LOAD_FUTEX_WAKE(reg,tmp,tmp2) \
yann@962
    27
 	stc	gbr, tmp	; \
yann@962
    28
 	mov.w	99f, tmp2	; \
yann@962
    29
 	add	tmp2, tmp 	; \
yann@962
    30
 	mov.l	@tmp, tmp2	; \
yann@962
    31
 	bra	98f		; \
yann@962
    32
-	 mov	#FUTEX_PRIVATE_FLAG, tmp
yann@962
    33
+	 mov	#FUTEX_PRIVATE_FLAG, tmp ; \
yann@962
    34
 99:	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
yann@962
    35
 98:	extu.b	tmp, tmp	; \
yann@962
    36
 	xor	tmp, reg	; \
yann@962
    37
--- glibc-2.7/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S.orig	2007-08-03 16:44:57.000000000 +0100
yann@962
    38
+++ glibc-2.7/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S	2008-08-19 21:08:22.000000000 +0100
yann@962
    39
@@ -42,7 +42,7 @@
yann@962
    40
 	add	tmp2, tmp 	; \
yann@962
    41
 	mov.l	@tmp, tmp2	; \
yann@962
    42
 	bra	98f		; \
yann@962
    43
-	 mov	#FUTEX_PRIVATE_FLAG, tmp
yann@962
    44
+	 mov	#FUTEX_PRIVATE_FLAG, tmp ; \
yann@962
    45
 99:	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
yann@962
    46
 98:	extu.b	tmp, tmp	; \
yann@962
    47
 	xor	tmp, reg	; \
yann@962
    48
@@ -54,7 +54,7 @@
yann@962
    49
 	add	tmp2, tmp 	; \
yann@962
    50
 	mov.l	@tmp, tmp2	; \
yann@962
    51
 	bra	98f		; \
yann@962
    52
-	 mov	#FUTEX_PRIVATE_FLAG, tmp
yann@962
    53
+	 mov	#FUTEX_PRIVATE_FLAG, tmp ; \
yann@962
    54
 99:	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
yann@962
    55
 98:	extu.b	tmp, tmp	; \
yann@962
    56
 	xor	tmp, reg	; \