patches/gcc/4.1.2/100-uclibc-conf.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Jan 12 19:24:03 2010 +0100 (2010-01-12)
changeset 1761 88020b2c3246
parent 1 eeea35fbf182
permissions -rw-r--r--
scripts/functions: change handling of nochdir

- 'nochdir' must be the first option
- have systematic pushd/popd, even if nochdir
     1 --- gcc-4.1.2.orig/gcc/config/t-linux-uclibc	1970-01-01 01:00:00.000000000 +0100
     2 +++ gcc-4.1.2/gcc/config/t-linux-uclibc	2007-03-04 23:25:07.000000000 +0100
     3 @@ -0,0 +1,5 @@
     4 +# Remove glibc specific files added in t-linux
     5 +SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
     6 +
     7 +# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
     8 +LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
     9 --- gcc-4.1.2.orig/gcc/config.gcc	2006-10-16 01:12:23.000000000 +0200
    10 +++ gcc-4.1.2/gcc/config.gcc	2007-03-04 23:25:07.000000000 +0100
    11 @@ -1884,7 +1884,7 @@
    12  	;;
    13  sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
    14  sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
    15 -  sh-*-linux* | sh[346lbe]*-*-linux* | \
    16 +  sh*-*-linux* | sh[346lbe]*-*-linux* | \
    17    sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
    18     sh64-*-netbsd* | sh64l*-*-netbsd*)
    19  	tmake_file="${tmake_file} sh/t-sh sh/t-elf"
    20 @@ -2338,6 +2338,12 @@
    21  	;;
    22  esac
    23  
    24 +# Rather than hook into each target, just do it after all the linux
    25 +# targets have been processed
    26 +case ${target} in
    27 +*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
    28 +esac
    29 +
    30  case ${target} in
    31  i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
    32  	tmake_file="${tmake_file} i386/t-gmm_malloc"
    33 --- gcc-4.1.2.orig/boehm-gc/configure	2007-02-14 06:17:22.000000000 +0100
    34 +++ gcc-4.1.2/boehm-gc/configure	2007-03-04 23:25:07.000000000 +0100
    35 @@ -4320,6 +4320,11 @@
    36    lt_cv_deplibs_check_method=pass_all
    37    ;;
    38  
    39 +linux-uclibc*)
    40 +  lt_cv_deplibs_check_method=pass_all
    41 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
    42 +  ;;
    43 +
    44  netbsd* | knetbsd*-gnu)
    45    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
    46      lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
    47 --- gcc-4.1.2.orig/configure	2006-11-21 18:48:36.000000000 +0100
    48 +++ gcc-4.1.2/configure	2007-03-04 23:25:07.000000000 +0100
    49 @@ -1133,7 +1133,7 @@
    50      ;;
    51  "")
    52      case "${target}" in
    53 -    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
    54 +    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
    55          # Enable libmudflap by default in GNU and friends.
    56  	;;
    57      *-*-freebsd*)
    58 --- gcc-4.1.2.orig/configure.in	2006-11-21 18:48:36.000000000 +0100
    59 +++ gcc-4.1.2/configure.in	2007-03-04 23:25:07.000000000 +0100
    60 @@ -341,7 +341,7 @@
    61      ;;
    62  "")
    63      case "${target}" in
    64 -    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
    65 +    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
    66          # Enable libmudflap by default in GNU and friends.
    67  	;;
    68      *-*-freebsd*)
    69 --- gcc-4.1.2.orig/contrib/regression/objs-gcc.sh	2005-08-15 02:41:31.000000000 +0200
    70 +++ gcc-4.1.2/contrib/regression/objs-gcc.sh	2007-03-04 23:25:07.000000000 +0100
    71 @@ -105,6 +105,10 @@
    72   then
    73    make all-gdb all-dejagnu all-ld || exit 1
    74    make install-gdb install-dejagnu install-ld || exit 1
    75 +elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
    76 + then
    77 +  make all-gdb all-dejagnu all-ld || exit 1
    78 +  make install-gdb install-dejagnu install-ld || exit 1
    79  elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
    80    make bootstrap || exit 1
    81    make install || exit 1
    82 --- gcc-4.1.2.orig/gcc/config/alpha/linux-elf.h	2005-06-25 03:22:41.000000000 +0200
    83 +++ gcc-4.1.2/gcc/config/alpha/linux-elf.h	2007-03-04 23:25:07.000000000 +0100
    84 @@ -27,7 +27,11 @@
    85  #define SUBTARGET_EXTRA_SPECS \
    86  { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
    87  
    88 +#if defined USE_UCLIBC
    89 +#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
    90 +#else
    91  #define ELF_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
    92 +#endif
    93  
    94  #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax}		\
    95    %{O*:-O3} %{!O*:-O1}						\
    96 --- gcc-4.1.2.orig/gcc/config/arm/linux-elf.h	2005-10-10 03:04:31.000000000 +0200
    97 +++ gcc-4.1.2/gcc/config/arm/linux-elf.h	2007-03-04 23:25:07.000000000 +0100
    98 @@ -51,7 +51,11 @@
    99  
   100  #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
   101  
   102 +#ifdef USE_UCLIBC
   103 +#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
   104 +#else
   105  #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
   106 +#endif
   107  
   108  #define LINUX_TARGET_LINK_SPEC  "%{h*} %{version:-v} \
   109     %{b} \
   110 --- gcc-4.1.2.orig/gcc/config/cris/linux.h	2005-06-25 03:22:41.000000000 +0200
   111 +++ gcc-4.1.2/gcc/config/cris/linux.h	2007-03-04 23:25:07.000000000 +0100
   112 @@ -73,6 +73,25 @@
   113  #undef CRIS_DEFAULT_CPU_VERSION
   114  #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
   115  
   116 +#ifdef USE_UCLIBC
   117 +
   118 +#undef CRIS_SUBTARGET_VERSION
   119 +#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
   120 +
   121 +#undef CRIS_LINK_SUBTARGET_SPEC
   122 +#define CRIS_LINK_SUBTARGET_SPEC \
   123 + "-mcrislinux\
   124 +  -rpath-link include/asm/../..%s\
   125 +  %{shared} %{static}\
   126 +  %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
   127 +  %{!shared: \
   128 +    %{!static: \
   129 +      %{rdynamic:-export-dynamic} \
   130 +      %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
   131 +  %{!r:%{O2|O3: --gc-sections}}"
   132 +
   133 +#else  /* USE_UCLIBC */
   134 +
   135  #undef CRIS_SUBTARGET_VERSION
   136  #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
   137  
   138 @@ -87,6 +106,8 @@
   139    %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
   140    %{!r:%{O2|O3: --gc-sections}}"
   141  
   142 +#endif  /* USE_UCLIBC */
   143 +
   144  
   145  /* Node: Run-time Target */
   146  
   147 --- gcc-4.1.2.orig/gcc/config/i386/linux.h	2005-08-10 19:53:01.000000000 +0200
   148 +++ gcc-4.1.2/gcc/config/i386/linux.h	2007-03-04 23:25:07.000000000 +0100
   149 @@ -107,6 +107,11 @@
   150  #define LINK_EMULATION "elf_i386"
   151  #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
   152  
   153 +#if defined USE_UCLIBC
   154 +#undef DYNAMIC_LINKER
   155 +#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
   156 +#endif
   157 +
   158  #undef  SUBTARGET_EXTRA_SPECS
   159  #define SUBTARGET_EXTRA_SPECS \
   160    { "link_emulation", LINK_EMULATION },\
   161 --- gcc-4.1.2.orig/gcc/config/i386/linux64.h	2005-08-10 19:53:01.000000000 +0200
   162 +++ gcc-4.1.2/gcc/config/i386/linux64.h	2007-03-04 23:25:07.000000000 +0100
   163 @@ -54,14 +54,21 @@
   164     When the -shared link option is used a final link is not being
   165     done.  */
   166  
   167 +#ifdef USE_UCLIBC
   168 +#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
   169 +#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
   170 +#else
   171 +#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
   172 +#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
   173 +#endif
   174  #undef	LINK_SPEC
   175  #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
   176    %{shared:-shared} \
   177    %{!shared: \
   178      %{!static: \
   179        %{rdynamic:-export-dynamic} \
   180 -      %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
   181 -      %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
   182 +      %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
   183 +      %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
   184      %{static:-static}}"
   185  
   186  /* Similar to standard Linux, but adding -ffast-math support.  */
   187 --- gcc-4.1.2.orig/gcc/config/ia64/linux.h	2006-12-12 16:24:07.000000000 +0100
   188 +++ gcc-4.1.2/gcc/config/ia64/linux.h	2007-03-04 23:25:07.000000000 +0100
   189 @@ -37,13 +37,18 @@
   190  /* Define this for shared library support because it isn't in the main
   191     linux.h file.  */
   192  
   193 +#ifdef USE_UCLIBC
   194 +#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
   195 +#else
   196 +#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
   197 +#endif
   198  #undef LINK_SPEC
   199  #define LINK_SPEC "\
   200    %{shared:-shared} \
   201    %{!shared: \
   202      %{!static: \
   203        %{rdynamic:-export-dynamic} \
   204 -      %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
   205 +      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
   206        %{static:-static}}"
   207  
   208  #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
   209 --- gcc-4.1.2.orig/gcc/config/m68k/linux.h	2005-06-25 03:22:41.000000000 +0200
   210 +++ gcc-4.1.2/gcc/config/m68k/linux.h	2007-03-04 23:25:07.000000000 +0100
   211 @@ -123,12 +123,17 @@
   212  
   213  /* If ELF is the default format, we should not use /lib/elf.  */
   214  
   215 +#ifdef USE_UCLIBC
   216 +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
   217 +#else
   218 +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
   219 +#endif
   220  #undef	LINK_SPEC
   221  #define LINK_SPEC "-m m68kelf %{shared} \
   222    %{!shared: \
   223      %{!static: \
   224        %{rdynamic:-export-dynamic} \
   225 -      %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
   226 +      %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
   227      %{static}}"
   228  
   229  /* For compatibility with linux/a.out */
   230 --- gcc-4.1.2.orig/gcc/config/mips/linux.h	2006-12-17 14:57:31.000000000 +0100
   231 +++ gcc-4.1.2/gcc/config/mips/linux.h	2007-03-04 23:25:07.000000000 +0100
   232 @@ -105,6 +105,11 @@
   233  
   234  /* Borrowed from sparc/linux.h */
   235  #undef LINK_SPEC
   236 +#ifdef USE_UCLIBC
   237 +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
   238 +#else
   239 +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
   240 +#endif
   241  #define LINK_SPEC \
   242   "%(endian_spec) \
   243    %{shared:-shared} \
   244 @@ -112,7 +117,7 @@
   245      %{!ibcs: \
   246        %{!static: \
   247          %{rdynamic:-export-dynamic} \
   248 -        %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
   249 +        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
   250          %{static:-static}}}"
   251  
   252  #undef SUBTARGET_ASM_SPEC
   253 --- gcc-4.1.2.orig/gcc/config/pa/pa-linux.h	2007-01-12 03:23:38.000000000 +0100
   254 +++ gcc-4.1.2/gcc/config/pa/pa-linux.h	2007-03-04 23:25:07.000000000 +0100
   255 @@ -49,13 +49,18 @@
   256  /* Define this for shared library support because it isn't in the main
   257     linux.h file.  */
   258  
   259 +#ifdef USE_UCLIBC
   260 +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
   261 +#else
   262 +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
   263 +#endif
   264  #undef LINK_SPEC
   265  #define LINK_SPEC "\
   266    %{shared:-shared} \
   267    %{!shared: \
   268      %{!static: \
   269        %{rdynamic:-export-dynamic} \
   270 -      %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
   271 +      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
   272        %{static:-static}}"
   273  
   274  /* glibc's profiling functions don't need gcc to allocate counters.  */
   275 --- gcc-4.1.2.orig/gcc/config/rs6000/linux.h	2006-02-10 21:58:33.000000000 +0100
   276 +++ gcc-4.1.2/gcc/config/rs6000/linux.h	2007-03-04 23:25:07.000000000 +0100
   277 @@ -72,7 +72,11 @@
   278  #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
   279  
   280  #undef	LINK_OS_DEFAULT_SPEC
   281 +#ifdef USE_UCLIBC
   282 +#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
   283 +#else
   284  #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
   285 +#endif
   286  
   287  #define LINK_GCC_C_SEQUENCE_SPEC \
   288    "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
   289 --- gcc-4.1.2.orig/gcc/config/rs6000/sysv4.h	2006-02-10 21:58:33.000000000 +0100
   290 +++ gcc-4.1.2/gcc/config/rs6000/sysv4.h	2007-03-04 23:25:08.000000000 +0100
   291 @@ -866,6 +866,7 @@
   292    mcall-linux  : %(link_os_linux)       ; \
   293    mcall-gnu    : %(link_os_gnu)         ; \
   294    mcall-netbsd : %(link_os_netbsd)      ; \
   295 +  mcall-linux-uclibc : %(link_os_linux_uclibc); \
   296    mcall-openbsd: %(link_os_openbsd)     ; \
   297                 : %(link_os_default)     }"
   298  
   299 @@ -1043,6 +1044,10 @@
   300    %{rdynamic:-export-dynamic} \
   301    %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
   302  
   303 +#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
   304 +  %{rdynamic:-export-dynamic} \
   305 +  %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
   306 +
   307  #if defined(HAVE_LD_EH_FRAME_HDR)
   308  # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
   309  #endif
   310 @@ -1209,6 +1214,7 @@
   311    { "link_os_sim",		LINK_OS_SIM_SPEC },			\
   312    { "link_os_freebsd",		LINK_OS_FREEBSD_SPEC },			\
   313    { "link_os_linux",		LINK_OS_LINUX_SPEC },			\
   314 +  { "link_os_linux_uclibc",	LINK_OS_LINUX_UCLIBC_SPEC },		\
   315    { "link_os_gnu",		LINK_OS_GNU_SPEC },			\
   316    { "link_os_netbsd",		LINK_OS_NETBSD_SPEC },			\
   317    { "link_os_openbsd",		LINK_OS_OPENBSD_SPEC },			\
   318 --- gcc-4.1.2.orig/gcc/config/s390/linux.h	2006-12-12 16:24:07.000000000 +0100
   319 +++ gcc-4.1.2/gcc/config/s390/linux.h	2007-03-04 23:25:08.000000000 +0100
   320 @@ -77,6 +77,13 @@
   321  #define MULTILIB_DEFAULTS { "m31" }
   322  #endif
   323  
   324 +#ifdef USE_UCLIBC
   325 +#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
   326 +#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
   327 +#else
   328 +#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
   329 +#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
   330 +#endif
   331  #undef  LINK_SPEC
   332  #define LINK_SPEC \
   333    "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
   334 @@ -86,8 +93,8 @@
   335        %{!static: \
   336  	%{rdynamic:-export-dynamic} \
   337  	%{!dynamic-linker: \
   338 -          %{m31:-dynamic-linker /lib/ld.so.1} \
   339 -          %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
   340 +          %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
   341 +          %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
   342  
   343  #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
   344  
   345 --- gcc-4.1.2.orig/gcc/config/sh/linux.h	2005-06-25 03:22:41.000000000 +0200
   346 +++ gcc-4.1.2/gcc/config/sh/linux.h	2007-03-04 23:25:08.000000000 +0100
   347 @@ -56,12 +56,21 @@
   348  #undef SUBTARGET_LINK_EMUL_SUFFIX
   349  #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
   350  #undef SUBTARGET_LINK_SPEC
   351 +#ifdef USE_UCLIBC
   352 +#define SUBTARGET_LINK_SPEC \
   353 +  "%{shared:-shared} \
   354 +   %{!static: \
   355 +     %{rdynamic:-export-dynamic} \
   356 +     %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
   357 +   %{static:-static}"
   358 +#else
   359  #define SUBTARGET_LINK_SPEC \
   360    "%{shared:-shared} \
   361     %{!static: \
   362       %{rdynamic:-export-dynamic} \
   363       %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
   364     %{static:-static}"
   365 +#endif
   366  
   367  /* Output assembler code to STREAM to call the profiler.  */
   368  
   369 --- gcc-4.1.2.orig/gcc/config/sparc/linux.h	2006-02-11 09:38:51.000000000 +0100
   370 +++ gcc-4.1.2/gcc/config/sparc/linux.h	2007-03-04 23:25:08.000000000 +0100
   371 @@ -125,6 +125,11 @@
   372  
   373  /* If ELF is the default format, we should not use /lib/elf.  */
   374  
   375 +#ifdef USE_UCLIBC
   376 +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
   377 +#else
   378 +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
   379 +#endif
   380  #undef  LINK_SPEC
   381  #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
   382    %{!mno-relax:%{!r:-relax}} \
   383 @@ -132,7 +137,7 @@
   384      %{!ibcs: \
   385        %{!static: \
   386          %{rdynamic:-export-dynamic} \
   387 -        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
   388 +        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
   389          %{static:-static}}}"
   390  
   391  /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
   392 --- gcc-4.1.2.orig/gcc/config/sparc/linux64.h	2006-02-11 09:38:51.000000000 +0100
   393 +++ gcc-4.1.2/gcc/config/sparc/linux64.h	2007-03-04 23:25:08.000000000 +0100
   394 @@ -162,12 +162,17 @@
   395    { "link_arch_default", LINK_ARCH_DEFAULT_SPEC },	  \
   396    { "link_arch",	 LINK_ARCH_SPEC },
   397      
   398 +#ifdef USE_UCLIBC
   399 +#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
   400 +#else
   401 +#define ELF_DYNAMIC_LINKER  "/lib/ld-linux.so.2"
   402 +#endif
   403  #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
   404    %{!shared: \
   405      %{!ibcs: \
   406        %{!static: \
   407          %{rdynamic:-export-dynamic} \
   408 -        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
   409 +        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
   410          %{static:-static}}} \
   411  "
   412  
   413 --- gcc-4.1.2.orig/libffi/configure	2007-02-14 06:17:22.000000000 +0100
   414 +++ gcc-4.1.2/libffi/configure	2007-03-04 23:25:08.000000000 +0100
   415 @@ -3457,6 +3457,11 @@
   416    lt_cv_deplibs_check_method=pass_all
   417    ;;
   418  
   419 +linux-uclibc*)
   420 +  lt_cv_deplibs_check_method=pass_all
   421 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
   422 +  ;;
   423 +
   424  netbsd* | knetbsd*-gnu)
   425    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
   426      lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
   427 --- gcc-4.1.2.orig/libgfortran/configure	2006-12-06 11:55:37.000000000 +0100
   428 +++ gcc-4.1.2/libgfortran/configure	2007-03-04 23:25:08.000000000 +0100
   429 @@ -3699,6 +3699,11 @@
   430    lt_cv_deplibs_check_method=pass_all
   431    ;;
   432  
   433 +linux-uclibc*)
   434 +  lt_cv_deplibs_check_method=pass_all
   435 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
   436 +  ;;
   437 +
   438  netbsd* | knetbsd*-gnu)
   439    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
   440      lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
   441 --- gcc-4.1.2.orig/libjava/configure	2007-02-14 06:17:22.000000000 +0100
   442 +++ gcc-4.1.2/libjava/configure	2007-03-04 23:25:08.000000000 +0100
   443 @@ -5137,6 +5137,11 @@
   444    lt_cv_deplibs_check_method=pass_all
   445    ;;
   446  
   447 +linux-uclibc*)
   448 +  lt_cv_deplibs_check_method=pass_all
   449 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
   450 +  ;;
   451 +
   452  netbsd* | knetbsd*-gnu)
   453    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
   454      lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
   455 --- gcc-4.1.2.orig/libmudflap/configure	2005-10-05 01:54:38.000000000 +0200
   456 +++ gcc-4.1.2/libmudflap/configure	2007-03-04 23:25:08.000000000 +0100
   457 @@ -5382,6 +5382,11 @@
   458    lt_cv_deplibs_check_method=pass_all
   459    ;;
   460  
   461 +linux-uclibc*)
   462 +  lt_cv_deplibs_check_method=pass_all
   463 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
   464 +  ;;
   465 +
   466  netbsd* | knetbsd*-gnu)
   467    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
   468      lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
   469 --- gcc-4.1.2.orig/libobjc/configure	2007-02-14 06:17:22.000000000 +0100
   470 +++ gcc-4.1.2/libobjc/configure	2007-03-04 23:25:08.000000000 +0100
   471 @@ -3312,6 +3312,11 @@
   472    lt_cv_deplibs_check_method=pass_all
   473    ;;
   474  
   475 +linux-uclibc*)
   476 +  lt_cv_deplibs_check_method=pass_all
   477 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
   478 +  ;;
   479 +
   480  netbsd* | knetbsd*-gnu)
   481    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
   482      lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
   483 --- gcc-4.1.2.orig/libtool.m4	2005-07-16 04:30:53.000000000 +0200
   484 +++ gcc-4.1.2/libtool.m4	2007-03-04 23:25:08.000000000 +0100
   485 @@ -743,6 +743,11 @@
   486    lt_cv_deplibs_check_method=pass_all
   487    ;;
   488  
   489 +linux-uclibc*)
   490 +  lt_cv_deplibs_check_method=pass_all
   491 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
   492 +  ;;
   493 +
   494  netbsd* | knetbsd*-gnu)
   495    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
   496      [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
   497 --- gcc-4.1.2.orig/ltconfig	2006-07-04 22:30:34.000000000 +0200
   498 +++ gcc-4.1.2/ltconfig	2007-03-04 23:25:08.000000000 +0100
   499 @@ -603,6 +603,7 @@
   500  
   501  # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
   502  case $host_os in
   503 +linux-uclibc*) ;;
   504  linux-gnu*) ;;
   505  linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
   506  esac
   507 @@ -1274,6 +1275,23 @@
   508    dynamic_linker='GNU/Linux ld.so'
   509    ;;
   510  
   511 +linux-uclibc*)
   512 +  version_type=linux
   513 +  need_lib_prefix=no
   514 +  need_version=no
   515 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
   516 +  soname_spec='${libname}${release}.so$major'
   517 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   518 +  shlibpath_var=LD_LIBRARY_PATH
   519 +  shlibpath_overrides_runpath=no
   520 +  # This implies no fast_install, which is unacceptable.
   521 +  # Some rework will be needed to allow for fast_install
   522 +  # before this can be enabled.
   523 +  hardcode_into_libs=yes
   524 +  # Assume using the uClibc dynamic linker.
   525 +  dynamic_linker="uClibc ld.so"
   526 +  ;;
   527 +
   528  netbsd*)
   529    need_lib_prefix=no
   530    need_version=no
   531 --- gcc-4.1.2.orig/zlib/configure	2005-09-12 19:02:07.000000000 +0200
   532 +++ gcc-4.1.2/zlib/configure	2007-03-04 23:25:08.000000000 +0100
   533 @@ -3426,6 +3426,11 @@
   534    lt_cv_deplibs_check_method=pass_all
   535    ;;
   536  
   537 +linux-uclibc*)
   538 +  lt_cv_deplibs_check_method=pass_all
   539 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
   540 +  ;;
   541 +
   542  netbsd* | knetbsd*-gnu)
   543    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
   544      lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'