]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/glibc/glibc-2.3.2/glibc23-sse-oldkernel.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / glibc / glibc-2.3.2 / glibc23-sse-oldkernel.patch
1 --- glibc-2.3.2/sysdeps/i386/dl-machine.h.orig  2003-11-01 15:52:17.000000000 -0500
2 +++ glibc-2.3.2/sysdeps/i386/dl-machine.h       2003-11-01 15:52:55.000000000 -0500
3 @@ -25,6 +25,7 @@
4  #include <sys/param.h>
5  #include <sysdep.h>
6  #include <tls.h>
7 +#include <dl-procinfo.h>
8  
9  /* Return nonzero iff ELF header is compatible with the running host.  */
10  static inline int __attribute__ ((unused))
11 @@ -357,6 +358,10 @@ dl_platform_init (void)
12    if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0')
13      /* Avoid an empty string which would disturb us.  */
14      GL(dl_platform) = NULL;
15 +
16 +#ifdef DL_ADJUST_PROCINFO
17 +  DL_ADJUST_PROCINFO;
18 +#endif
19  }
20  
21  static inline Elf32_Addr
22 --- glibc-2.3.2/sysdeps/unix/sysv/linux/i386/dl-procinfo.h.orig 2003-11-01 15:50:41.000000000 -0500
23 +++ glibc-2.3.2/sysdeps/unix/sysv/linux/i386/dl-procinfo.h      2003-11-01 15:51:48.000000000 -0500
24 @@ -126,4 +126,20 @@ _dl_string_platform (const char *str)
25    return -1;
26  };
27  
28 +#define DL_ADJUST_PROCINFO dl_adjust_procinfo ()
29 +
30 +static inline void
31 +__attribute__ ((unused, always_inline))
32 +dl_adjust_procinfo (void)
33 +{
34 +  if (GL(dl_osversion) < 0x020400)
35 +    {
36 +      /* Unfortunately, while the capability is named OSFXSR, it's
37 +        actually hardware FXSR direct from CPUID.  And we can't test
38 +        CR4 ourselves, because we're in protected mode.  Disable it
39 +        for kernels which might not have actually enabled OSFXSR.  */
40 +      GL(dl_hwcap) &= ~(HWCAP_I386_OSFXSR | HWCAP_I386_XMM | HWCAP_I386_XMM2);
41 +    }
42 +}
43 +
44  #endif /* dl-procinfo.h */
45 --- glibc-2.3.2/sysdeps/generic/libc-start.c.orig       2003-11-02 23:11:51.000000000 -0500
46 +++ glibc-2.3.2/sysdeps/generic/libc-start.c    2003-11-02 23:34:42.000000000 -0500
47 @@ -23,6 +23,10 @@
48  #include <bp-start.h>
49  #include <bp-sym.h>
50  
51 +#include <dl-osinfo.h>
52 +#include <dl-librecon.h>
53 +#include <dl-machine.h>
54 +
55  extern void __libc_init_first (int argc, char **argv, char **envp);
56  
57  extern int __libc_multiple_libcs;
58 @@ -123,15 +127,28 @@ LIBC_START_MAIN (int (*main) (int, char 
59  #  endif
60    _dl_aux_init (auxvec);
61  # endif
62 -# ifdef DL_SYSDEP_OSCHECK
63    if (!__libc_multiple_libcs)
64      {
65 +# ifdef DL_SYSDEP_OSCHECK
66        /* This needs to run to initiliaze _dl_osversion before TLS
67          setup might check it.  */
68        DL_SYSDEP_OSCHECK (__libc_fatal);
69 -    }
70  # endif
71  
72 +  /* Moved here so that we can frob hwcap early enough.  */
73 +# ifdef DL_OSVERSION_INIT
74 +      DL_OSVERSION_INIT;
75 +# endif
76 +
77 +# ifdef DL_PLATFORM_INIT
78 +      DL_PLATFORM_INIT;
79 +# endif
80 +
81 +      /* Now determine the length of the platform string.  */
82 +      if (_dl_platform != NULL)
83 +       _dl_platformlen = strlen (_dl_platform);
84 +    }
85 +
86    /* Initialize the thread library at least a bit since the libgcc
87       functions are using thread functions if these are available and
88       we need to setup errno.  If there is no thread library and we
89 --- glibc-2.3.2/elf/dl-support.c.orig   2003-11-02 22:55:47.000000000 -0500
90 +++ glibc-2.3.2/elf/dl-support.c        2003-11-02 23:24:40.000000000 -0500
91 @@ -252,18 +252,6 @@ _dl_non_dynamic_init (void)
92        if (__access ("/etc/suid-debug", F_OK) != 0)
93         unsetenv ("MALLOC_CHECK_");
94      }
95 -
96 -#ifdef DL_PLATFORM_INIT
97 -  DL_PLATFORM_INIT;
98 -#endif
99 -
100 -#ifdef DL_OSVERSION_INIT
101 -  DL_OSVERSION_INIT;
102 -#endif
103 -
104 -  /* Now determine the length of the platform string.  */
105 -  if (_dl_platform != NULL)
106 -    _dl_platformlen = strlen (_dl_platform);
107  }
108  
109