]> gcc.gnu.org Git - gcc.git/blame - ltcf-gcj.sh
Don't use CLASS_LIKELY_SPILLED in local-alloc
[gcc.git] / ltcf-gcj.sh
CommitLineData
4f4caf92
AO
1#### This script is meant to be sourced by ltconfig.
2
3# $Id: ltcf-gcj.sh,v 1.1.2.5 2000/07/20 02:29:15 oliva Exp $
4
5# ltcf-gcj.sh - Create a GCJ compiler specific configuration
6#
7# Copyright (C) 1996-1999,2000 Free Software Foundation, Inc.
8# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9#
10# Original GCJ support by:
11# Alexandre Oliva <oliva@lsd.ic.unicamp.br>
12#
13# This file is free software; you can redistribute it and/or modify it
14# under the terms of the GNU General Public License as published by
15# the Free Software Foundation; either version 2 of the License, or
16# (at your option) any later version.
17#
18# This program is distributed in the hope that it will be useful, but
19# WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21# General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with this program; if not, write to the Free Software
25# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26#
27# As a special exception to the GNU General Public License, if you
28# distribute this file as part of a program that contains a
29# configuration script generated by Autoconf, you may include it under
30# the same distribution terms that you use for the rest of that program.
31
32
33# Source file extension for Java test sources.
34ac_ext=java
35
36# Object file extension for compiled Java test sources.
37objext=o
38
39# Code to be used in simple compile tests
40lt_simple_compile_test_code="class foo {}"
41
42# Code to be used in simple link tests
43lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {} (0); }'
44
45## Linker Characteristics
46case "$host_os" in
47cygwin* | mingw*)
48 # FIXME: the MSVC++ port hasn't been tested in a loooong time
49 # When not using gcc, we currently assume that we are using
50 # Microsoft Visual C++.
51 if test "$with_gcc" != yes; then
52 with_gnu_ld=no
53 fi
54 ;;
55
56esac
57
58ld_shlibs=yes
59if test "$with_gnu_ld" = yes; then
60 # If archive_cmds runs LD, not CC, wlarc should be empty
61 wlarc='${wl}'
62
63 # See if GNU ld supports shared libraries.
64 case "$host_os" in
65 aix3* | aix4*)
66 # On AIX, the GNU linker is very broken
67 ld_shlibs=no
68 cat <<EOF 1>&2
69
70*** Warning: the GNU linker, at least up to release 2.9.1, is reported
71*** to be unable to reliably create shared libraries on AIX.
72*** Therefore, libtool is disabling shared libraries support. If you
73*** really care for shared libraries, you may want to modify your PATH
74*** so that a non-GNU linker is found, and then restart.
75
76EOF
77 ;;
78
79 amigaos*)
80 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
81 hardcode_libdir_flag_spec='-L$libdir'
82 hardcode_minus_L=yes
83
84 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
85 # that the semantics of dynamic libraries on AmigaOS, at least up
86 # to version 4, is to share data among multiple programs linked
87 # with the same dynamic library. Since this doesn't match the
88 # behavior of shared libraries on other platforms, we can use
89 # them.
90 ld_shlibs=no
91 ;;
92
93 beos*)
94 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
95 allow_undefined_flag=unsupported
96 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
97 # support --undefined. This deserves some investigation. FIXME
98 archive_cmds='$CC -nostart $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib'
99 else
100 ld_shlibs=no
101 fi
102 ;;
103
104 cygwin* | mingw*)
105 # hardcode_libdir_flag_spec is actually meaningless, as there is
106 # no search path for DLLs.
107 hardcode_libdir_flag_spec='-L$libdir'
108 allow_undefined_flag=unsupported
109 always_export_symbols=yes
110
111 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
112 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
113 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
114 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
115 else $CC -o impgen impgen.c ; fi)~
116 $output_objdir/impgen $dir/$soname > $output_objdir/$soname-def'
117
118 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
119
120 # cygwin and mingw dlls have different entry points and sets of symbols
121 # to exclude.
122 # FIXME: what about values for MSVC?
123 dll_entry=__cygwin_dll_entry@12
124 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
125 case "$host_os" in
126 mingw*)
127 # mingw values
128 dll_entry=_DllMainCRTStartup@12
129 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
130 ;;
131 esac
132
133 # mingw and cygwin differ, and it's simplest to just exclude the union
134 # of the two symbol sets.
135 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
136
137 # recent cygwin and mingw systems supply a stub DllMain which the user
138 # can override, but on older systems we have to supply one (in ltdll.c)
139 if test "x$lt_cv_need_dllmain" = "xyes"; then
140 ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
141 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~
142 test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
143 else
144 ltdll_obj=
145 ltdll_cmds=
146 fi
147
148 # Extract the symbol export list from an `--export-all' def file,
149 # then regenerate the def file from the symbol export list, so that
150 # the compiled dll only exports the symbol export list.
151 # Be careful not to strip the DATA tag left be newer dlltools.
152 export_symbols_cmds="$ltdll_cmds"'
153 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
154 sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
155
156 # If DATA tags from a recent dlltool are present, honour them!
157 archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~
158 _lt_hint=1;
159 cat $export_symbols | while read symbol; do
160 set dummy \$symbol;
161 case \$# in
162 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
163 *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
164 esac;
165 _lt_hint=`expr 1 + \$_lt_hint`;
166 done~
167 '"$ltdll_cmds"'
168 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
169 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
170 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
171 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
172 $CC $output_objdir/$soname-exp '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags'
173 ;;
174
175 netbsd*)
176 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
177 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
178 wlarc=
179 else
180 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
181 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
182 fi
183 ;;
184
185 solaris* | sysv5*)
186 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
187 ld_shlibs=no
188 cat <<EOF 1>&2
189
190*** Warning: The releases 2.8.* of the GNU linker cannot reliably
191*** create shared libraries on Solaris systems. Therefore, libtool
192*** is disabling shared libraries support. We urge you to upgrade GNU
193*** binutils to release 2.9.1 or newer. Another option is to modify
194*** your PATH or compiler configuration so that the native linker is
195*** used, and then restart.
196
197EOF
198 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
199 archive_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib'
200 archive_expsym_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
201 else
202 ld_shlibs=no
203 fi
204 ;;
205
206 sunos4*)
207 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
208 wlarc=
209 hardcode_direct=yes
210 hardcode_shlibpath_var=no
211 ;;
212
213 *)
214 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
215 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
216 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
217 else
218 ld_shlibs=no
219 fi
220 ;;
221 esac
222
223 if test "$ld_shlibs" = yes; then
224 runpath_var=LD_RUN_PATH
225 hardcode_libdir_flag_spec="$wlarc"'--rpath '"$wlarc"'$libdir'
226 export_dynamic_flag_spec="$wlarc"'--export-dynamic'
227 case $host_os in
228 cygwin* | mingw*)
229 # dlltool doesn't understand --whole-archive et. al.
230 whole_archive_flag_spec=
231 ;;
232 *)
233 # ancient GNU ld didn't support --whole-archive et. al.
234 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
235 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
236 else
237 whole_archive_flag_spec=
238 fi
239 ;;
240 esac
241 fi
242else
243 # PORTME fill in a description of your system's linker (not GNU ld)
244 case "$host_os" in
245 aix3*)
246 allow_undefined_flag=unsupported
247 always_export_symbols=yes
248 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
249 # Note: this linker hardcodes the directories in LIBPATH if there
250 # are no directories specified by -L.
251 hardcode_minus_L=yes
252 if test "$with_gcc" = yes && test -z "$link_static_flag"; then
253 # Neither direct hardcoding nor static linking is supported with a
254 # broken collect2.
255 hardcode_direct=unsupported
256 fi
257 ;;
258
259 aix4*)
260 hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
261 hardcode_libdir_separator=':'
262 if test "$with_gcc" = yes; then
263 collect2name=`${CC} -print-prog-name=collect2`
264 if test -f "$collect2name" && \
265 strings "$collect2name" | grep resolve_lib_name >/dev/null
266 then
267 # We have reworked collect2
268 hardcode_direct=yes
269 else
270 # We have old collect2
271 hardcode_direct=unsupported
272 # It fails to find uninstalled libraries when the uninstalled
273 # path is not listed in the libpath. Setting hardcode_minus_L
274 # to unsupported forces relinking
275 hardcode_minus_L=yes
276 hardcode_libdir_flag_spec='-L$libdir'
277 hardcode_libdir_separator=
278 fi
279 shared_flag='-shared'
280 else
281 shared_flag='${wl}-bM:SRE'
282 hardcode_direct=yes
283 fi
284 allow_undefined_flag=' ${wl}-berok'
285 archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
286 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
287 case "$host_os" in aix4.[01]|aix4.[01].*)
288 # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
289 always_export_symbols=yes ;;
290 esac
291 ;;
292
293 amigaos*)
294 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
295 hardcode_libdir_flag_spec='-L$libdir'
296 hardcode_minus_L=yes
297 # see comment about different semantics on the GNU ld section
298 ld_shlibs=no
299 ;;
300
301 cygwin* | mingw*)
302 # When not using gcc, we currently assume that we are using
303 # Microsoft Visual C++.
304 # hardcode_libdir_flag_spec is actually meaningless, as there is
305 # no search path for DLLs.
306 hardcode_libdir_flag_spec=' '
307 allow_undefined_flag=unsupported
308 # Tell ltmain to make .lib files, not .a files.
309 libext=lib
310 # FIXME: Setting linknames here is a bad hack.
311 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
312 # The linker will automatically build a .lib file if we build a DLL.
313 old_archive_from_new_cmds='true'
314 # FIXME: Should let the user specify the lib program.
315 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
316 fix_srcfile_path='`cygpath -w $srcfile`'
317 ;;
318
319 freebsd1*)
320 ld_shlibs=no
321 ;;
322
323 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
324 # support. Future versions do this automatically, but an explicit c++rt0.o
325 # does not break anything, and helps significantly (at the cost of a little
326 # extra space).
327 freebsd2.2*)
328 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
329 hardcode_libdir_flag_spec='-R$libdir'
330 hardcode_direct=yes
331 hardcode_shlibpath_var=no
332 ;;
333
334 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
335 freebsd2*)
336 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
337 hardcode_direct=yes
338 hardcode_minus_L=yes
339 hardcode_shlibpath_var=no
340 ;;
341
342 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
343 freebsd*)
344 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
345 hardcode_libdir_flag_spec='-R$libdir'
346 hardcode_direct=yes
347 hardcode_shlibpath_var=no
348 ;;
349
350 hpux9* | hpux10* | hpux11*)
351 case "$host_os" in
352 hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
353 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
354 esac
355 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
356 hardcode_libdir_separator=:
357 hardcode_direct=yes
358 hardcode_minus_L=yes # Not in the search PATH, but as the default
359 # location of the library.
360 export_dynamic_flag_spec='${wl}-E'
361 ;;
362
363 irix5* | irix6*)
364 if test "$with_gcc" = yes; then
365 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
366 else
367 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
368 fi
369 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
370 hardcode_libdir_separator=:
371 link_all_deplibs=yes
372 ;;
373
374 netbsd*)
375 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
376 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
377 else
378 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
379 fi
380 hardcode_libdir_flag_spec='${wl}-R$libdir'
381 hardcode_direct=yes
382 hardcode_shlibpath_var=no
383 ;;
384
385 openbsd*)
386 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
387 hardcode_libdir_flag_spec='-R$libdir'
388 hardcode_direct=yes
389 hardcode_shlibpath_var=no
390 ;;
391
392 os2*)
393 hardcode_libdir_flag_spec='-L$libdir'
394 hardcode_minus_L=yes
395 allow_undefined_flag=unsupported
396 archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
397 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
398 ;;
399
400 osf3*)
401 if test "$with_gcc" = yes; then
402 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
403 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
404 else
405 allow_undefined_flag=' -expect_unresolved \*'
406 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
407 fi
408 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
409 hardcode_libdir_separator=:
410 ;;
411
412 osf4* | osf5*) # as osf3* with the addition of -msym flag
413 if test "$with_gcc" = yes; then
414 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
415 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
416 else
417 allow_undefined_flag=' -expect_unresolved \*'
418 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
419 fi
420 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
421 hardcode_libdir_separator=:
422 ;;
423
424 sco3.2v5*)
425 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
426 hardcode_shlibpath_var=no
427 runpath_var=LD_RUN_PATH
428 hardcode_runpath_var=yes
429 ;;
430
431 solaris*)
432 no_undefined_flag=' -z text'
433 # $CC -shared without GNU ld will not create a library from C++
434 # object files and a static libstdc++, better avoid it by now
435 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
436 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
437 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
438 hardcode_libdir_flag_spec='-R$libdir'
439 hardcode_shlibpath_var=no
440 case "$host_os" in
441 solaris2.[0-5] | solaris2.[0-5].*) ;;
442 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
443 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
444 esac
445 link_all_deplibs=yes
446 ;;
447
448 sunos4*)
449 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
450 hardcode_libdir_flag_spec='-L$libdir'
451 hardcode_direct=yes
452 hardcode_minus_L=yes
453 hardcode_shlibpath_var=no
454 ;;
455
456 sysv4)
457 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
458 runpath_var='LD_RUN_PATH'
459 hardcode_shlibpath_var=no
460 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
461 ;;
462
463 sysv4.3*)
464 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
465 hardcode_shlibpath_var=no
466 export_dynamic_flag_spec='-Bexport'
467 ;;
468
469 sysv5*)
470 no_undefined_flag=' -z text'
471 # $CC -shared without GNU ld will not create a library from C++
472 # object files and a static libstdc++, better avoid it by now
473 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
474 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
475 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
476 hardcode_libdir_flag_spec=
477 hardcode_shlibpath_var=no
478 runpath_var='LD_RUN_PATH'
479 ;;
480
481 uts4*)
482 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
483 hardcode_libdir_flag_spec='-L$libdir'
484 hardcode_shlibpath_var=no
485 ;;
486
487 dgux*)
488 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
489 hardcode_libdir_flag_spec='-L$libdir'
490 hardcode_shlibpath_var=no
491 ;;
492
493 sysv4*MP*)
494 if test -d /usr/nec; then
495 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
496 hardcode_shlibpath_var=no
497 runpath_var=LD_RUN_PATH
498 hardcode_runpath_var=yes
499 ld_shlibs=yes
500 fi
501 ;;
502
503 sysv4.2uw2*)
504 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
505 hardcode_direct=yes
506 hardcode_minus_L=no
507 hardcode_shlibpath_var=no
508 hardcode_runpath_var=yes
509 runpath_var=LD_RUN_PATH
510 ;;
511
512 unixware7*)
513 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
514 runpath_var='LD_RUN_PATH'
515 hardcode_shlibpath_var=no
516 ;;
517
518 *)
519 ld_shlibs=no
520 ;;
521 esac
522fi
523
524## Compiler Characteristics: PIC flags, static flags, etc
525
526# We don't use cached values here since only the C compiler
527# characteristics should be cached.
528 ac_cv_prog_cc_pic=
529 ac_cv_prog_cc_shlib=
530 ac_cv_prog_cc_wl=
531 ac_cv_prog_cc_static=
532 ac_cv_prog_cc_no_builtin=
533 ac_cv_prog_cc_can_build_shared=$can_build_shared
534
535 ac_cv_prog_cc_wl='-Wl,'
536 ac_cv_prog_cc_static='-static'
537
538 case "$host_os" in
539 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
540 # PIC is the default for these OSes.
541 ;;
542 aix*)
543 # Below there is a dirty hack to force normal static linking with -ldl
544 # The problem is because libdl dynamically linked with both libc and
545 # libC (AIX C++ library), which obviously doesn't included in libraries
546 # list by gcc. This cause undefined symbols with -static flags.
547 # This hack allows C programs to be linked with "-static -ldl", but
548 # we not sure about C++ programs.
549 ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
550 ;;
551 cygwin* | mingw* | os2*)
552 # This hack is so that the source file can tell whether it is being
553 # built for inclusion in a dll (and should export symbols for example).
554 ac_cv_prog_cc_pic='-DDLL_EXPORT'
555 ;;
556 amigaos*)
557 # FIXME: we need at least 68020 code to build shared libraries, but
558 # adding the `-m68020' flag to GCC prevents building anything better,
559 # like `-m68040'.
560 ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
561 ;;
562 sysv4*MP*)
563 if test -d /usr/nec; then
564 ac_cv_prog_cc_pic=-Kconform_pic
565 fi
566 ;;
567 *)
568 ac_cv_prog_cc_pic='-fPIC'
569 ;;
570 esac
571
572# GCJ did not exist at the time GCC didn't implicitly link libc in.
573need_lc=no
This page took 0.094718 seconds and 5 git commands to generate.