patches/uClibc/0.9.32/130-nptl-pthread-Correct-path-for-machine-specific-pt-initfini.c.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Dec 12 21:41:16 2011 +0200 (2011-12-12)
branch1.13
changeset 2845 0dc9d4931246
permissions -rw-r--r--
scripts: unset CONFIG_SITE

Some distributions (eg. openSUSE 12.1) systematically export
the CONFIG_SITE environment variable to point to a custom
script setting misc paths for ./configure.

This can, and does, break when cross-compiling for architectures
that are not supported by this script.

The simple workaround is to unset this variable.
NB: buildroot has a similar fix:
http://git.buildroot.org/buildroot/commit/?id=12c9f7dd6dee9c6029b4f9a12d6aac1516911ab4

Reported-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 21f4f28e60ec0342133086c9a51e7f0e5b181fb8)
yann@2518
     1
commit ebe6c38d7e60e8a43d8b926c17a561a5a3e06a22
yann@2518
     2
Author: Khem Raj <raj.khem@gmail.com>
yann@2518
     3
Date:   Mon Jun 13 17:13:52 2011 -0700
yann@2518
     4
yann@2518
     5
    nptl/pthread: Correct path for machine specific pt-initfini.c
yann@2518
     6
    
yann@2518
     7
    Signed-off-by: Khem Raj <raj.khem@gmail.com>
yann@2518
     8
    Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
yann@2518
     9
yann@2518
    10
diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in
yann@2518
    11
index 398eaea..ca84642 100644
yann@2518
    12
--- a/libpthread/nptl/sysdeps/pthread/Makefile.in
yann@2518
    13
+++ b/libpthread/nptl/sysdeps/pthread/Makefile.in
yann@2518
    14
@@ -75,8 +75,8 @@ CFLAGS-pt-initfini.c = -S -g0 $(PICFLAG) -fno-inline-functions	\
yann@2518
    15
 			$(patsubst -f%,-fno-%,$(call check_gcc,-fexceptions,))
yann@2518
    16
 
yann@2518
    17
 #ASFLAGS += $(PICFLAG) -I$(top_srcdir)include -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)
yann@2518
    18
-ifneq ($(wildcard $(libpthread_DIR)/sysdeps/linux/$(TARGET_ARCH)/pt-initfini.c),)
yann@2518
    19
-PTHREAD_INITFINI := $(libpthread_DIR)/sysdeps/linux/$(TARGET_ARCH)/pt-initfini.c
yann@2518
    20
+ifneq ($(wildcard $(libpthread_pthread_DIR)/../unix/sysv/linux/$(TARGET_ARCH)/pt-initfini.c),)
yann@2518
    21
+PTHREAD_INITFINI := $(libpthread_pthread_DIR)/../unix/sysv/linux/$(TARGET_ARCH)/pt-initfini.c
yann@2518
    22
 else
yann@2518
    23
 PTHREAD_INITFINI := $(libpthread_pthread_DIR)/pt-initfini.c
yann@2518
    24
 endif