gnu/gcc34: initial commit
[grimoire-witchcraft.git] / gnu / gcc34 / patches / kbsd-gnu.dpatch
blob9dff6ffbb80157ce55e63af12e1ef3a51aecb6ac
1 diff -Nur gcc-3.4.4.old/configure gcc-3.4.4/configure
2 --- gcc-3.4.4.old/configure     2005-03-08 18:31:40.000000000 +0100
3 +++ gcc-3.4.4/configure 2005-06-23 16:09:40.000000000 +0200
4 @@ -1935,7 +1935,7 @@
5    powerpc-*-netware*)
6      target_makefile_frag="config/mt-netware"
7      ;;
8 -  *-*-linux*)
9 +  *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
10      target_makefile_frag="config/mt-linux"
11      ;;
12    *-*-aix4.[3456789]* | *-*-aix[56789].*)
13 diff -Nur gcc-3.4.4.old/configure.in gcc-3.4.4/configure.in
14 --- gcc-3.4.4.old/configure.in  2005-03-08 18:31:40.000000000 +0100
15 +++ gcc-3.4.4/configure.in      2005-06-23 16:09:40.000000000 +0200
16 @@ -1174,7 +1174,7 @@
17    powerpc-*-netware*)
18      target_makefile_frag="config/mt-netware"
19      ;;
20 -  *-*-linux*)
21 +  *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
22      target_makefile_frag="config/mt-linux"
23      ;;
24    *-*-aix4.[[3456789]]* | *-*-aix[[56789]].*)
25 diff -Nur gcc-3.4.4.old/gcc/config/i386/kfreebsd-gnu.h gcc-3.4.4/gcc/config/i386/kfreebsd-gnu.h
26 --- gcc-3.4.4.old/gcc/config/i386/kfreebsd-gnu.h        1970-01-01 01:00:00.000000000 +0100
27 +++ gcc-3.4.4/gcc/config/i386/kfreebsd-gnu.h    2005-06-23 16:09:40.000000000 +0200
28 @@ -0,0 +1,26 @@
29 +/* Definitions for Intel 386 running kFreeBSD-based GNU systems with ELF format
30 +   Copyright (C) 2004
31 +   Free Software Foundation, Inc.
32 +   Contributed by Robert Millan.
34 +This file is part of GCC.
36 +GCC is free software; you can redistribute it and/or modify
37 +it under the terms of the GNU General Public License as published by
38 +the Free Software Foundation; either version 2, or (at your option)
39 +any later version.
41 +GCC is distributed in the hope that it will be useful,
42 +but WITHOUT ANY WARRANTY; without even the implied warranty of
43 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
44 +GNU General Public License for more details.
46 +You should have received a copy of the GNU General Public License
47 +along with GCC; see the file COPYING.  If not, write to
48 +the Free Software Foundation, 59 Temple Place - Suite 330,
49 +Boston, MA 02111-1307, USA.  */
51 +#undef LINK_EMULATION
52 +#define LINK_EMULATION "elf_i386_fbsd"
53 +#undef REG_NAME
54 +#define REG_NAME(reg) sc_ ## reg
55 diff -Nur gcc-3.4.4.old/gcc/config/i386/knetbsd-gnu.h gcc-3.4.4/gcc/config/i386/knetbsd-gnu.h
56 --- gcc-3.4.4.old/gcc/config/i386/knetbsd-gnu.h 1970-01-01 01:00:00.000000000 +0100
57 +++ gcc-3.4.4/gcc/config/i386/knetbsd-gnu.h     2005-06-23 16:09:41.000000000 +0200
58 @@ -0,0 +1,24 @@
59 +/* Definitions for Intel 386 running kNetBSD-based GNU systems with ELF format
60 +   Copyright (C) 2004
61 +   Free Software Foundation, Inc.
62 +   Contributed by Robert Millan.
64 +This file is part of GCC.
66 +GCC is free software; you can redistribute it and/or modify
67 +it under the terms of the GNU General Public License as published by
68 +the Free Software Foundation; either version 2, or (at your option)
69 +any later version.
71 +GCC is distributed in the hope that it will be useful,
72 +but WITHOUT ANY WARRANTY; without even the implied warranty of
73 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
74 +GNU General Public License for more details.
76 +You should have received a copy of the GNU General Public License
77 +along with GCC; see the file COPYING.  If not, write to
78 +the Free Software Foundation, 59 Temple Place - Suite 330,
79 +Boston, MA 02111-1307, USA.  */
81 +#undef REG_NAME
82 +#define REG_NAME(reg) sc_ ## reg
83 diff -Nur gcc-3.4.4.old/gcc/config/i386/linux.h gcc-3.4.4/gcc/config/i386/linux.h
84 --- gcc-3.4.4.old/gcc/config/i386/linux.h       2003-11-29 04:08:10.000000000 +0100
85 +++ gcc-3.4.4/gcc/config/i386/linux.h   2005-06-23 16:09:41.000000000 +0200
86 @@ -108,24 +108,30 @@
88  /* If ELF is the default format, we should not use /lib/elf.  */
90 +#ifndef LINK_EMULATION
91 +# define LINK_EMULATION "elf_i386"
92 +#endif
93 +#ifndef DYNAMIC_LINKER
94 +# ifdef USE_GNULIBC_1
95 +#  define DYNAMIC_LINKER "/lib/ld-linux.so.1"
96 +# else
97 +#  define DYNAMIC_LINKER "/lib/ld-linux.so.2"
98 +# endif
99 +#endif
101 +#undef  SUBTARGET_EXTRA_SPECS
102 +#define SUBTARGET_EXTRA_SPECS \
103 +  { "link_emulation", LINK_EMULATION },\
104 +  { "dynamic_linker", DYNAMIC_LINKER }
106  #undef LINK_SPEC
107 -#ifdef USE_GNULIBC_1
108 -#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
109 -  %{!shared: \
110 -    %{!ibcs: \
111 -      %{!static: \
112 -       %{rdynamic:-export-dynamic} \
113 -       %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
114 -       %{static:-static}}}"
115 -#else
116 -#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
117 +#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
118    %{!shared: \
119      %{!ibcs: \
120        %{!static: \
121         %{rdynamic:-export-dynamic} \
122 -       %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
123 +       %{!dynamic-linker:-dynamic-linker %(dynamic_linker)}} \
124         %{static:-static}}}"
125 -#endif
127  /* A C statement (sans semicolon) to output to the stdio stream
128     FILE the assembler definition of uninitialized global DECL named
129 @@ -217,6 +223,8 @@
130  #include <signal.h>
131  #include <sys/ucontext.h>
133 +#define REG_NAME(reg) reg
135  #define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)              \
136    do {                                                                 \
137      unsigned char *pc_ = (CONTEXT)->ra;                                        \
138 @@ -245,28 +253,28 @@
139      else                                                               \
140        break;                                                           \
141                                                                         \
142 -    new_cfa_ = sc_->esp;                                               \
143 +    new_cfa_ = sc_->REG_NAME(esp);                                             \
144      (FS)->cfa_how = CFA_REG_OFFSET;                                    \
145      (FS)->cfa_reg = 4;                                                 \
146      (FS)->cfa_offset = new_cfa_ - (long) (CONTEXT)->cfa;               \
147                                                                         \
148      /* The SVR4 register numbering macros aren't usable in libgcc.  */ \
149      (FS)->regs.reg[0].how = REG_SAVED_OFFSET;                          \
150 -    (FS)->regs.reg[0].loc.offset = (long)&sc_->eax - new_cfa_;         \
151 +    (FS)->regs.reg[0].loc.offset = (long)&sc_->REG_NAME(eax) - new_cfa_;       \
152      (FS)->regs.reg[3].how = REG_SAVED_OFFSET;                          \
153 -    (FS)->regs.reg[3].loc.offset = (long)&sc_->ebx - new_cfa_;         \
154 +    (FS)->regs.reg[3].loc.offset = (long)&sc_->REG_NAME(ebx) - new_cfa_;       \
155      (FS)->regs.reg[1].how = REG_SAVED_OFFSET;                          \
156 -    (FS)->regs.reg[1].loc.offset = (long)&sc_->ecx - new_cfa_;         \
157 +    (FS)->regs.reg[1].loc.offset = (long)&sc_->REG_NAME(ecx) - new_cfa_;       \
158      (FS)->regs.reg[2].how = REG_SAVED_OFFSET;                          \
159 -    (FS)->regs.reg[2].loc.offset = (long)&sc_->edx - new_cfa_;         \
160 +    (FS)->regs.reg[2].loc.offset = (long)&sc_->REG_NAME(edx) - new_cfa_;       \
161      (FS)->regs.reg[6].how = REG_SAVED_OFFSET;                          \
162 -    (FS)->regs.reg[6].loc.offset = (long)&sc_->esi - new_cfa_;         \
163 +    (FS)->regs.reg[6].loc.offset = (long)&sc_->REG_NAME(esi) - new_cfa_;       \
164      (FS)->regs.reg[7].how = REG_SAVED_OFFSET;                          \
165 -    (FS)->regs.reg[7].loc.offset = (long)&sc_->edi - new_cfa_;         \
166 +    (FS)->regs.reg[7].loc.offset = (long)&sc_->REG_NAME(edi) - new_cfa_;       \
167      (FS)->regs.reg[5].how = REG_SAVED_OFFSET;                          \
168 -    (FS)->regs.reg[5].loc.offset = (long)&sc_->ebp - new_cfa_;         \
169 +    (FS)->regs.reg[5].loc.offset = (long)&sc_->REG_NAME(ebp) - new_cfa_;       \
170      (FS)->regs.reg[8].how = REG_SAVED_OFFSET;                          \
171 -    (FS)->regs.reg[8].loc.offset = (long)&sc_->eip - new_cfa_;         \
172 +    (FS)->regs.reg[8].loc.offset = (long)&sc_->REG_NAME(eip) - new_cfa_;       \
173      (FS)->retaddr_column = 8;                                          \
174      goto SUCCESS;                                                      \
175    } while (0)
176 diff -Nur gcc-3.4.4.old/gcc/config/kfreebsd-gnu.h gcc-3.4.4/gcc/config/kfreebsd-gnu.h
177 --- gcc-3.4.4.old/gcc/config/kfreebsd-gnu.h     1970-01-01 01:00:00.000000000 +0100
178 +++ gcc-3.4.4/gcc/config/kfreebsd-gnu.h 2005-06-23 16:09:41.000000000 +0200
179 @@ -0,0 +1,36 @@
180 +/* Definitions for kFreeBSD-based GNU systems with ELF format
181 +   Copyright (C) 2004
182 +   Free Software Foundation, Inc.
183 +   Contributed by Robert Millan.
185 +This file is part of GCC.
187 +GCC is free software; you can redistribute it and/or modify
188 +it under the terms of the GNU General Public License as published by
189 +the Free Software Foundation; either version 2, or (at your option)
190 +any later version.
192 +GCC is distributed in the hope that it will be useful,
193 +but WITHOUT ANY WARRANTY; without even the implied warranty of
194 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
195 +GNU General Public License for more details.
197 +You should have received a copy of the GNU General Public License
198 +along with GCC; see the file COPYING.  If not, write to
199 +the Free Software Foundation, 59 Temple Place - Suite 330,
200 +Boston, MA 02111-1307, USA.  */
202 +#undef LINUX_TARGET_OS_CPP_BUILTINS    
203 +#define LINUX_TARGET_OS_CPP_BUILTINS()         \
204 +  do                                           \
205 +    {                                          \
206 +       builtin_define ("__FreeBSD_kernel__");  \
207 +       builtin_define ("__GLIBC__");           \
208 +       builtin_define_std ("unix");            \
209 +       builtin_assert ("system=unix");         \
210 +       builtin_assert ("system=posix");        \
211 +    }                                          \
212 +  while (0)
214 +#undef DYNAMIC_LINKER
215 +#define DYNAMIC_LINKER "/lib/ld.so.1"
216 diff -Nur gcc-3.4.4.old/gcc/config/knetbsd-gnu.h gcc-3.4.4/gcc/config/knetbsd-gnu.h
217 --- gcc-3.4.4.old/gcc/config/knetbsd-gnu.h      1970-01-01 01:00:00.000000000 +0100
218 +++ gcc-3.4.4/gcc/config/knetbsd-gnu.h  2005-06-23 16:09:41.000000000 +0200
219 @@ -0,0 +1,36 @@
220 +/* Definitions for kNetBSD-based GNU systems with ELF format
221 +   Copyright (C) 2004
222 +   Free Software Foundation, Inc.
223 +   Contributed by Robert Millan.
225 +This file is part of GCC.
227 +GCC is free software; you can redistribute it and/or modify
228 +it under the terms of the GNU General Public License as published by
229 +the Free Software Foundation; either version 2, or (at your option)
230 +any later version.
232 +GCC is distributed in the hope that it will be useful,
233 +but WITHOUT ANY WARRANTY; without even the implied warranty of
234 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
235 +GNU General Public License for more details.
237 +You should have received a copy of the GNU General Public License
238 +along with GCC; see the file COPYING.  If not, write to
239 +the Free Software Foundation, 59 Temple Place - Suite 330,
240 +Boston, MA 02111-1307, USA.  */
242 +#undef LINUX_TARGET_OS_CPP_BUILTINS    
243 +#define LINUX_TARGET_OS_CPP_BUILTINS()         \
244 +  do                                           \
245 +    {                                          \
246 +       builtin_define ("__NetBSD_kernel__");   \
247 +       builtin_define ("__GLIBC__");           \
248 +       builtin_define_std ("unix");            \
249 +       builtin_assert ("system=unix");         \
250 +       builtin_assert ("system=posix");        \
251 +    }                                          \
252 +  while (0)
254 +#undef DYNAMIC_LINKER
255 +#define DYNAMIC_LINKER "/lib/ld.so.1"
256 diff -Nur gcc-3.4.4.old/gcc/config.gcc gcc-3.4.4/gcc/config.gcc
257 --- gcc-3.4.4.old/gcc/config.gcc        2005-04-25 06:47:59.000000000 +0200
258 +++ gcc-3.4.4/gcc/config.gcc    2005-06-23 16:09:41.000000000 +0200
259 @@ -434,21 +434,10 @@
260    esac
261    fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h"
262    ;;
263 -*-*-kfreebsd*-gnu)
264 -  # Must come before *-*-gnu*
265 -  xm_defines=POSIX # needed for cross-compiling from FreeBSD?
266 -  extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
267 -  # GNU tools are the only tools.
268 -  gas=yes
269 -  gnu_ld=yes
270 -  case ${enable_threads} in
271 -    "" | yes | posix) thread_file='posix' ;;
272 -  esac
273 -  ;;
274  *-*-linux*libc1* | *-*-linux*aout*)
275    # Avoid the generic linux case.
276    ;;
277 -*-*-linux*)
278 +*-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
279    # Must come before *-*-gnu* (because of *-*-linux-gnu* systems).
280    extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
281    gas=yes
282 @@ -998,23 +987,21 @@
283                 thread_file='single'
284         fi
285         ;;
286 -i[34567]86-*-linux*)   # Intel 80386's running GNU/Linux
287 +i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu)
288 +                       # Intel 80386's running GNU/*
289                         # with ELF format using glibc 2
290 -                       # aka GNU/Linux C library 6
291         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
292         tmake_file="t-slibgcc-elf-ver t-linux i386/t-crtstuff"
293 +       case ${target} in
294 +       i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h i386/knetbsd-gnu.h" ;;
295 +       i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
296 +       esac
297         ;;
298  x86_64-*-linux*)
299         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h \
300                  i386/x86-64.h i386/linux64.h"
301         tmake_file="t-slibgcc-elf-ver t-linux i386/t-linux64"
302         ;;
303 -i[34567]86-*-kfreebsd*-gnu) # must be before i[34567]86-*-gnu*
304 -       tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h kfreebsdgnu.h i386/kfreebsdgnu.h"
305 -       tmake_file="t-slibgcc-elf-ver t-kfreebsd-gnu i386/t-crtstuff"
306 -       float_format=i386
307 -       use_fixproto=no
308 -       ;;
309  i[34567]86-*-gnu*)
310         ;;
311  i[34567]86-pc-msdosdjgpp*)
312 diff -Nur gcc-3.4.4.old/libstdc++-v3/configure gcc-3.4.4/libstdc++-v3/configure
313 --- gcc-3.4.4.old/libstdc++-v3/configure        2005-02-01 07:29:28.000000000 +0100
314 +++ gcc-3.4.4/libstdc++-v3/configure    2005-06-23 16:09:41.000000000 +0200
315 @@ -3944,7 +3944,7 @@
316    lt_cv_deplibs_check_method=pass_all
317    ;;
319 -freebsd* )
320 +freebsd* | kfreebsd*-gnu)
321    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
322      case $host_cpu in
323      i*86 )
324 @@ -4012,7 +4012,7 @@
325    lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
326    ;;
328 -netbsd*)
329 +netbsd* | knetbsd*-gnu)
330    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
331      lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
332    else
333 diff -Nur gcc-3.4.4.old/libtool.m4 gcc-3.4.4/libtool.m4
334 --- gcc-3.4.4.old/libtool.m4    2004-05-18 11:08:37.000000000 +0200
335 +++ gcc-3.4.4/libtool.m4        2005-06-23 16:09:41.000000000 +0200
336 @@ -621,7 +621,7 @@
337    lt_cv_deplibs_check_method=pass_all
338    ;;
340 -freebsd* )
341 +freebsd* | kfreebsd*-gnu)
342    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
343      case $host_cpu in
344      i*86 )
345 @@ -689,7 +689,7 @@
346    lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
347    ;;
349 -netbsd*)
350 +netbsd* | knetbsd*-gnu)
351    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
352      [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
353    else
354 diff -Nur gcc-3.4.4.old/ltcf-c.sh gcc-3.4.4/ltcf-c.sh
355 --- gcc-3.4.4.old/ltcf-c.sh     2003-11-19 06:29:32.000000000 +0100
356 +++ gcc-3.4.4/ltcf-c.sh 2005-06-23 16:09:41.000000000 +0200
357 @@ -175,7 +175,7 @@
358        $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
359      ;;
361 -  netbsd*)
362 +  netbsd* | knetbsd*-gnu)
363      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
364        archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
365        wlarc=
366 @@ -442,7 +442,7 @@
367      ;;
369    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
370 -  freebsd*)
371 +  freebsd* | kfreebsd*-gnu)
372      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
373      hardcode_libdir_flag_spec='-R$libdir'
374      hardcode_direct=yes
375 @@ -489,7 +489,7 @@
376      link_all_deplibs=yes
377      ;;
379 -  netbsd*)
380 +  netbsd* | knetbsd*-gnu)
381      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
382        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
383      else
384 diff -Nur gcc-3.4.4.old/ltcf-cxx.sh gcc-3.4.4/ltcf-cxx.sh
385 --- gcc-3.4.4.old/ltcf-cxx.sh   2003-11-19 06:29:32.000000000 +0100
386 +++ gcc-3.4.4/ltcf-cxx.sh       2005-06-23 16:09:41.000000000 +0200
387 @@ -289,7 +289,7 @@
388      # C++ shared libraries reported to be fairly broken before switch to ELF
389      ld_shlibs=no
390      ;;
391 -  freebsd*)
392 +  freebsd* | kfreebsd*-gnu)
393      # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
394      # conventions
395      ld_shlibs=yes
396 @@ -449,7 +449,7 @@
397          ;;
398      esac
399      ;;
400 -  netbsd*)
401 +  netbsd* | knetbsd*-gnu)
402      # NetBSD uses g++ - do we need to do anything?
403      ;;
404    osf3*)
405 @@ -804,7 +804,7 @@
406            ;;
407        esac
408        ;;
409 -    freebsd*)
410 +    freebsd* | kfreebsd*-gnu)
411        # FreeBSD uses GNU C++
412        ;;
413      gnu*)
414 diff -Nur gcc-3.4.4.old/ltcf-gcj.sh gcc-3.4.4/ltcf-gcj.sh
415 --- gcc-3.4.4.old/ltcf-gcj.sh   2003-11-19 06:29:32.000000000 +0100
416 +++ gcc-3.4.4/ltcf-gcj.sh       2005-06-23 16:09:41.000000000 +0200
417 @@ -178,7 +178,7 @@
418        $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
419      ;;
421 -  netbsd*)
422 +  netbsd* | knetbsd*-gnu)
423      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
424        archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
425        wlarc=
426 @@ -445,7 +445,7 @@
427      ;;
429    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
430 -  freebsd*)
431 +  freebsd* | kfreebsd*-gnu)
432      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
433      hardcode_libdir_flag_spec='-R$libdir'
434      hardcode_direct=yes
435 @@ -476,7 +476,7 @@
436      link_all_deplibs=yes
437      ;;
439 -  netbsd*)
440 +  netbsd* | knetbsd*-gnu)
441      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
442        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
443      else
444 diff -Nur gcc-3.4.4.old/ltconfig gcc-3.4.4/ltconfig
445 --- gcc-3.4.4.old/ltconfig      2004-03-05 22:05:41.000000000 +0100
446 +++ gcc-3.4.4/ltconfig  2005-06-23 16:09:41.000000000 +0200
447 @@ -1168,6 +1168,17 @@
448    hardcode_into_libs=yes
449    ;;
451 +kfreebsd*-gnu | knetbsd*-gnu)
452 +  version_type=linux
453 +  need_lib_prefix=no
454 +  need_version=no
455 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
456 +  soname_spec='${libname}${release}.so$major'
457 +  shlibpath_var=LD_LIBRARY_PATH
458 +  shlibpath_overrides_runpath=yes
459 +  hardcode_into_libs=yes
460 +  ;;
462  hpux9* | hpux10* | hpux11*)
463    # Give a soname corresponding to the major version so that dld.sl refuses to
464    # link against other versions.