*** empty log message ***
[deliverable/binutils-gdb.git] / ltcf-gcj.sh
CommitLineData
9df3ca55
AO
1#### This script is meant to be sourced by ltconfig.
2
3# ltcf-gcj.sh - Create a GCJ compiler specific configuration
4#
b7e4a931 5# Copyright (C) 1996-1999, 2000, 2001, 2003 Free Software Foundation, Inc.
9df3ca55
AO
6# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7#
8# Original GCJ support by:
9# Alexandre Oliva <oliva@lsd.ic.unicamp.br>
10#
11# This file is free software; you can redistribute it and/or modify it
12# under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful, but
17# WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19# General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24#
25# As a special exception to the GNU General Public License, if you
26# distribute this file as part of a program that contains a
27# configuration script generated by Autoconf, you may include it under
28# the same distribution terms that you use for the rest of that program.
29
30
31# Source file extension for Java test sources.
32ac_ext=java
33
34# Object file extension for compiled Java test sources.
35objext=o
36
37# Code to be used in simple compile tests
38lt_simple_compile_test_code="class foo {}"
39
40# Code to be used in simple link tests
ef099754 41lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
9df3ca55
AO
42
43## Linker Characteristics
469b781c 44case $host_os in
9df3ca55
AO
45cygwin* | mingw*)
46 # FIXME: the MSVC++ port hasn't been tested in a loooong time
47 # When not using gcc, we currently assume that we are using
48 # Microsoft Visual C++.
49 if test "$with_gcc" != yes; then
50 with_gnu_ld=no
51 fi
52 ;;
53
54esac
55
56ld_shlibs=yes
57if test "$with_gnu_ld" = yes; then
58 # If archive_cmds runs LD, not CC, wlarc should be empty
59 wlarc='${wl}'
60
61 # See if GNU ld supports shared libraries.
469b781c 62 case $host_os in
4a02fdb2
JH
63 aix3* | aix4* | aix5*)
64 # On AIX/PPC, the GNU linker is very broken
65 if test "$host_cpu" != ia64; then
66 ld_shlibs=no
67 cat <<EOF 1>&2
9df3ca55
AO
68
69*** Warning: the GNU linker, at least up to release 2.9.1, is reported
70*** to be unable to reliably create shared libraries on AIX.
71*** Therefore, libtool is disabling shared libraries support. If you
72*** really care for shared libraries, you may want to modify your PATH
73*** so that a non-GNU linker is found, and then restart.
74
75EOF
4a02fdb2 76 fi
9df3ca55
AO
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 $compiler_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 && \
3866be5d 114 if test "x$BUILD_CC" != "x" ; then $BUILD_CC -o impgen impgen.c ; \
9df3ca55 115 else $CC -o impgen impgen.c ; fi)~
8cc32590 116 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
9df3ca55
AO
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~
469b781c 125 case $host_os in
9df3ca55
AO
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
469b781c
AO
156 # If the export-symbols file already is a .def file (1st line
157 # is EXPORTS), use it as is.
9df3ca55 158 # If DATA tags from a recent dlltool are present, honour them!
469b781c
AO
159 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
160 cp $export_symbols $output_objdir/$soname-def;
161 else
162 echo EXPORTS > $output_objdir/$soname-def;
163 _lt_hint=1;
164 cat $export_symbols | while read symbol; do
165 set dummy \$symbol;
166 case \[$]# in
167 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
168 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
169 esac;
170 _lt_hint=`expr 1 + \$_lt_hint`;
171 done;
172 fi~
9df3ca55 173 '"$ltdll_cmds"'
8cc32590 174 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
9df3ca55 175 $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~
8cc32590
AO
176 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
177 $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 --output-lib $output_objdir/$libname.dll.a~
178 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
9df3ca55
AO
179 ;;
180
61edac0c 181 netbsd* | knetbsd*-gnu)
9df3ca55
AO
182 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
183 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
184 wlarc=
185 else
6be7c12c
AO
186 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
187 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9df3ca55
AO
188 fi
189 ;;
190
191 solaris* | sysv5*)
192 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
193 ld_shlibs=no
194 cat <<EOF 1>&2
195
196*** Warning: The releases 2.8.* of the GNU linker cannot reliably
197*** create shared libraries on Solaris systems. Therefore, libtool
198*** is disabling shared libraries support. We urge you to upgrade GNU
199*** binutils to release 2.9.1 or newer. Another option is to modify
200*** your PATH or compiler configuration so that the native linker is
201*** used, and then restart.
202
203EOF
204 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
205 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
206 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
207 else
208 ld_shlibs=no
209 fi
210 ;;
211
212 sunos4*)
213 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
214 wlarc=
215 hardcode_direct=yes
216 hardcode_shlibpath_var=no
217 ;;
218
219 *)
220 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
221 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
222 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
223 else
224 ld_shlibs=no
225 fi
226 ;;
227 esac
228
229 if test "$ld_shlibs" = yes; then
230 runpath_var=LD_RUN_PATH
231 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
232 export_dynamic_flag_spec='${wl}--export-dynamic'
233 case $host_os in
234 cygwin* | mingw*)
235 # dlltool doesn't understand --whole-archive et. al.
236 whole_archive_flag_spec=
237 ;;
238 *)
239 # ancient GNU ld didn't support --whole-archive et. al.
240 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
241 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
242 else
243 whole_archive_flag_spec=
244 fi
245 ;;
246 esac
247 fi
248else
249 # PORTME fill in a description of your system's linker (not GNU ld)
469b781c 250 case $host_os in
9df3ca55
AO
251 aix3*)
252 allow_undefined_flag=unsupported
253 always_export_symbols=yes
254 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'
255 # Note: this linker hardcodes the directories in LIBPATH if there
256 # are no directories specified by -L.
257 hardcode_minus_L=yes
258 if test "$with_gcc" = yes && test -z "$link_static_flag"; then
259 # Neither direct hardcoding nor static linking is supported with a
260 # broken collect2.
261 hardcode_direct=unsupported
262 fi
263 ;;
264
469b781c
AO
265 aix4* | aix5*)
266 hardcode_direct=yes
9df3ca55 267 hardcode_libdir_separator=':'
469b781c
AO
268 link_all_deplibs=yes
269 # When large executables or shared objects are built, AIX ld can
270 # have problems creating the table of contents. If linking a library
271 # or program results in "error TOC overflow" add -mminimal-toc to
272 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
273 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9df3ca55 274 if test "$with_gcc" = yes; then
469b781c
AO
275 case $host_os in aix4.[012]|aix4.[012].*)
276 # We only want to do this on AIX 4.2 and lower, the check
277 # below for broken collect2 doesn't work under 4.3+
278 collect2name=`${CC} -print-prog-name=collect2`
279 if test -f "$collect2name" && \
280 strings "$collect2name" | grep resolve_lib_name >/dev/null
281 then
282 # We have reworked collect2
283 hardcode_direct=yes
284 else
285 # We have old collect2
286 hardcode_direct=unsupported
287 # It fails to find uninstalled libraries when the uninstalled
288 # path is not listed in the libpath. Setting hardcode_minus_L
289 # to unsupported forces relinking
290 hardcode_minus_L=yes
291 hardcode_libdir_flag_spec='-L$libdir'
292 hardcode_libdir_separator=
293 fi
294 esac
9df3ca55
AO
295 shared_flag='-shared'
296 else
469b781c
AO
297 # not using gcc
298 if test "$host_cpu" = ia64; then
299 shared_flag='${wl}-G'
300 else
301 shared_flag='${wl}-bM:SRE'
302 fi
9df3ca55 303 fi
7487e485 304
469b781c
AO
305 if test "$host_cpu" = ia64; then
306 # On IA64, the linker does run time linking by default, so we don't
307 # have to do anything special.
308 aix_use_runtimelinking=no
4a02fdb2
JH
309 if test $with_gnu_ld = no; then
310 exp_sym_flag='-Bexport'
311 no_entry_flag=""
312 fi
469b781c
AO
313 else
314 # Test if we are trying to use run time linking, or normal AIX style linking.
315 # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
316 aix_use_runtimelinking=no
317 for ld_flag in $LDFLAGS; do
318 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
319 aix_use_runtimelinking=yes
320 break
321 fi
322 done
323 exp_sym_flag='-bexport'
324 no_entry_flag='-bnoentry'
325 fi
326 # -bexpall does not export symbols beginning with underscore (_)
327 always_export_symbols=yes
328 if test "$aix_use_runtimelinking" = yes; then
329 # Warning - without using the other run time loading flags (-brtl), -berok will
330 # link without error, but may produce a broken library.
331 allow_undefined_flag=' ${wl}-berok'
332 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
333 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
334 else
335 if test "$host_cpu" = ia64; then
4a02fdb2
JH
336 if test $with_gnu_ld = no; then
337 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
338 allow_undefined_flag="-z nodefs"
339 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
340 fi
469b781c
AO
341 else
342 allow_undefined_flag=' ${wl}-berok'
343 # -bexpall does not export symbols beginning with underscore (_)
344 always_export_symbols=yes
345 # Exported symbols can be pulled into shared objects from archives
346 whole_archive_flag_spec=' '
347 build_libtool_need_lc=yes
348 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
349 # This is similar to how AIX traditionally builds it's shared libraries.
350 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
351 fi
352 fi
353 ;;
9df3ca55
AO
354
355 amigaos*)
356 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)'
357 hardcode_libdir_flag_spec='-L$libdir'
358 hardcode_minus_L=yes
359 # see comment about different semantics on the GNU ld section
360 ld_shlibs=no
361 ;;
362
363 cygwin* | mingw*)
364 # When not using gcc, we currently assume that we are using
365 # Microsoft Visual C++.
366 # hardcode_libdir_flag_spec is actually meaningless, as there is
367 # no search path for DLLs.
368 hardcode_libdir_flag_spec=' '
369 allow_undefined_flag=unsupported
370 # Tell ltmain to make .lib files, not .a files.
371 libext=lib
372 # FIXME: Setting linknames here is a bad hack.
373 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
374 # The linker will automatically build a .lib file if we build a DLL.
375 old_archive_from_new_cmds='true'
376 # FIXME: Should let the user specify the lib program.
377 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
469b781c 378 fix_srcfile_path='`cygpath -w "$srcfile"`'
9df3ca55
AO
379 ;;
380
381 freebsd1*)
382 ld_shlibs=no
383 ;;
384
385 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
386 # support. Future versions do this automatically, but an explicit c++rt0.o
387 # does not break anything, and helps significantly (at the cost of a little
388 # extra space).
389 freebsd2.2*)
390 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
391 hardcode_libdir_flag_spec='-R$libdir'
392 hardcode_direct=yes
393 hardcode_shlibpath_var=no
394 ;;
395
396 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
397 freebsd2*)
398 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
399 hardcode_direct=yes
400 hardcode_minus_L=yes
401 hardcode_shlibpath_var=no
402 ;;
403
404 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
61edac0c 405 freebsd* | kfreebsd*-gnu)
9df3ca55
AO
406 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
407 hardcode_libdir_flag_spec='-R$libdir'
408 hardcode_direct=yes
409 hardcode_shlibpath_var=no
410 ;;
411
412 hpux9* | hpux10* | hpux11*)
469b781c 413 case $host_os in
9df3ca55
AO
414 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' ;;
415 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
416 esac
417 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
418 hardcode_libdir_separator=:
419 hardcode_direct=yes
420 hardcode_minus_L=yes # Not in the search PATH, but as the default
421 # location of the library.
422 export_dynamic_flag_spec='${wl}-E'
423 ;;
424
425 irix5* | irix6*)
426 if test "$with_gcc" = yes; then
427 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'
428 else
429 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
430 fi
431 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
432 hardcode_libdir_separator=:
433 link_all_deplibs=yes
434 ;;
435
61edac0c 436 netbsd* | knetbsd*-gnu)
9df3ca55
AO
437 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
438 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
439 else
6be7c12c 440 archive_cmds='$LD -shared -nodefaultlibs -o $lib $libobjs $deplibs $linker_flags' # ELF
9df3ca55
AO
441 fi
442 hardcode_libdir_flag_spec='${wl}-R$libdir'
443 hardcode_direct=yes
444 hardcode_shlibpath_var=no
445 ;;
446
447 openbsd*)
448 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
449 hardcode_libdir_flag_spec='-R$libdir'
450 hardcode_direct=yes
451 hardcode_shlibpath_var=no
452 ;;
453
454 os2*)
455 hardcode_libdir_flag_spec='-L$libdir'
456 hardcode_minus_L=yes
457 allow_undefined_flag=unsupported
458 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'
459 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
460 ;;
461
462 osf3*)
463 if test "$with_gcc" = yes; then
464 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
465 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'
466 else
467 allow_undefined_flag=' -expect_unresolved \*'
468 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'
469 fi
470 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
471 hardcode_libdir_separator=:
472 ;;
473
474 osf4* | osf5*) # as osf3* with the addition of -msym flag
475 if test "$with_gcc" = yes; then
476 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
477 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'
478 else
479 allow_undefined_flag=' -expect_unresolved \*'
480 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'
481 fi
482 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
483 hardcode_libdir_separator=:
484 ;;
485
486 sco3.2v5*)
487 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
488 hardcode_shlibpath_var=no
489 runpath_var=LD_RUN_PATH
490 hardcode_runpath_var=yes
491 ;;
492
493 solaris*)
8cc32590 494 no_undefined_flag=' ${wl}-z ${wl}defs'
b7e4a931 495 archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9df3ca55 496 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
b7e4a931 497 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
8cc32590
AO
498
499 # Commands to make compiler produce verbose output that lists
500 # what "hidden" libraries, object files and flags are used when
501 # linking a shared library.
502 output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
503
504 hardcode_libdir_flag_spec='${wl}-R $wl$libdir'
9df3ca55 505 hardcode_shlibpath_var=no
469b781c 506 case $host_os in
9df3ca55
AO
507 solaris2.[0-5] | solaris2.[0-5].*) ;;
508 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
8cc32590 509 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;;
9df3ca55
AO
510 esac
511 link_all_deplibs=yes
512 ;;
513
514 sunos4*)
515 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
516 hardcode_libdir_flag_spec='-L$libdir'
517 hardcode_direct=yes
518 hardcode_minus_L=yes
519 hardcode_shlibpath_var=no
520 ;;
521
522 sysv4)
523 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
524 runpath_var='LD_RUN_PATH'
525 hardcode_shlibpath_var=no
526 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
527 ;;
528
529 sysv4.3*)
530 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
531 hardcode_shlibpath_var=no
532 export_dynamic_flag_spec='-Bexport'
533 ;;
534
535 sysv5*)
536 no_undefined_flag=' -z text'
537 # $CC -shared without GNU ld will not create a library from C++
538 # object files and a static libstdc++, better avoid it by now
539 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
540 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
541 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
542 hardcode_libdir_flag_spec=
543 hardcode_shlibpath_var=no
544 runpath_var='LD_RUN_PATH'
545 ;;
546
547 uts4*)
548 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
549 hardcode_libdir_flag_spec='-L$libdir'
550 hardcode_shlibpath_var=no
551 ;;
552
553 dgux*)
554 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
555 hardcode_libdir_flag_spec='-L$libdir'
556 hardcode_shlibpath_var=no
557 ;;
558
559 sysv4*MP*)
560 if test -d /usr/nec; then
561 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
562 hardcode_shlibpath_var=no
563 runpath_var=LD_RUN_PATH
564 hardcode_runpath_var=yes
565 ld_shlibs=yes
566 fi
567 ;;
568
569 sysv4.2uw2*)
570 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
571 hardcode_direct=yes
572 hardcode_minus_L=no
573 hardcode_shlibpath_var=no
574 hardcode_runpath_var=yes
575 runpath_var=LD_RUN_PATH
576 ;;
577
6be7c12c
AO
578 sysv5uw7* | unixware7*)
579 no_undefined_flag='${wl}-z ${wl}text'
580 if test "$GCC" = yes; then
581 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
582 else
583 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
584 fi
9df3ca55
AO
585 runpath_var='LD_RUN_PATH'
586 hardcode_shlibpath_var=no
587 ;;
588
589 *)
590 ld_shlibs=no
591 ;;
592 esac
593fi
594
595## Compiler Characteristics: PIC flags, static flags, etc
596
597# We don't use cached values here since only the C compiler
598# characteristics should be cached.
599 ac_cv_prog_cc_pic=
600 ac_cv_prog_cc_shlib=
601 ac_cv_prog_cc_wl=
602 ac_cv_prog_cc_static=
603 ac_cv_prog_cc_no_builtin=
604 ac_cv_prog_cc_can_build_shared=$can_build_shared
605
606 ac_cv_prog_cc_wl='-Wl,'
607 ac_cv_prog_cc_static='-static'
608
469b781c 609 case $host_os in
9df3ca55
AO
610 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
611 # PIC is the default for these OSes.
612 ;;
613 aix*)
614 # Below there is a dirty hack to force normal static linking with -ldl
615 # The problem is because libdl dynamically linked with both libc and
616 # libC (AIX C++ library), which obviously doesn't included in libraries
617 # list by gcc. This cause undefined symbols with -static flags.
618 # This hack allows C programs to be linked with "-static -ldl", but
619 # we not sure about C++ programs.
620 ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
621 ;;
7389ff65
AO
622 *djgpp*)
623 # DJGPP does not suppot shared libraries at all
624 ac_cv_prog_cc_pic=
625 ;;
9df3ca55
AO
626 cygwin* | mingw* | os2*)
627 # This hack is so that the source file can tell whether it is being
628 # built for inclusion in a dll (and should export symbols for example).
629 ac_cv_prog_cc_pic='-DDLL_EXPORT'
630 ;;
631 amigaos*)
632 # FIXME: we need at least 68020 code to build shared libraries, but
633 # adding the `-m68020' flag to GCC prevents building anything better,
634 # like `-m68040'.
635 ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
636 ;;
637 sysv4*MP*)
638 if test -d /usr/nec; then
639 ac_cv_prog_cc_pic=-Kconform_pic
640 fi
641 ;;
642 *)
643 ac_cv_prog_cc_pic='-fPIC'
644 ;;
645 esac
646
647# GCJ did not exist at the time GCC didn't implicitly link libc in.
648need_lc=no
469b781c
AO
649
650# All existing releases of GCJ support `-c -o'.
651lt_cv_compiler_c_o=yes
This page took 0.20609 seconds and 4 git commands to generate.