1
#### This script is meant to be sourced by ltconfig.
3
# ltcf-gcj.sh - Create a GCJ compiler specific configuration
5
# Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
6
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8
# Original GCJ support by:
9
# Alexandre Oliva <oliva@lsd.ic.unicamp.br>
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.
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.
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.
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.
31
# Source file extension for Java test sources.
34
# Object file extension for compiled Java test sources.
37
# Code to be used in simple compile tests
38
lt_simple_compile_test_code="class foo {}"
40
# Code to be used in simple link tests
41
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
43
## Linker Characteristics
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
57
if test "$with_gnu_ld" = yes; then
58
# If archive_cmds runs LD, not CC, wlarc should be empty
61
# See if GNU ld supports shared libraries.
64
# On AIX, the GNU linker is very broken
68
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
69
*** to be unable to reliably create shared libraries on AIX.
70
*** Therefore, libtool is disabling shared libraries support. If you
71
*** really care for shared libraries, you may want to modify your PATH
72
*** so that a non-GNU linker is found, and then restart.
78
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)'
79
hardcode_libdir_flag_spec='-L$libdir'
82
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
83
# that the semantics of dynamic libraries on AmigaOS, at least up
84
# to version 4, is to share data among multiple programs linked
85
# with the same dynamic library. Since this doesn't match the
86
# behavior of shared libraries on other platforms, we can use
92
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
93
allow_undefined_flag=unsupported
94
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
95
# support --undefined. This deserves some investigation. FIXME
96
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
103
# hardcode_libdir_flag_spec is actually meaningless, as there is
104
# no search path for DLLs.
105
hardcode_libdir_flag_spec='-L$libdir'
106
allow_undefined_flag=unsupported
107
always_export_symbols=yes
109
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
110
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
111
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
112
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
113
else $CC -o impgen impgen.c ; fi)~
114
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
116
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
118
# cygwin and mingw dlls have different entry points and sets of symbols
120
# FIXME: what about values for MSVC?
121
dll_entry=__cygwin_dll_entry@12
122
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
126
dll_entry=_DllMainCRTStartup@12
127
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
131
# mingw and cygwin differ, and it's simplest to just exclude the union
132
# of the two symbol sets.
133
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
135
# recent cygwin and mingw systems supply a stub DllMain which the user
136
# can override, but on older systems we have to supply one (in ltdll.c)
137
if test "x$lt_cv_need_dllmain" = "xyes"; then
138
ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
139
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~
140
test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
146
# Extract the symbol export list from an `--export-all' def file,
147
# then regenerate the def file from the symbol export list, so that
148
# the compiled dll only exports the symbol export list.
149
# Be careful not to strip the DATA tag left be newer dlltools.
150
export_symbols_cmds="$ltdll_cmds"'
151
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
152
sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
154
# If the export-symbols file already is a .def file (1st line
155
# is EXPORTS), use it as is.
156
# If DATA tags from a recent dlltool are present, honour them!
157
archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
158
cp $export_symbols $output_objdir/$soname-def;
160
echo EXPORTS > $output_objdir/$soname-def;
162
cat $export_symbols | while read symbol; do
165
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
166
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
168
_lt_hint=`expr 1 + \$_lt_hint`;
172
$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~
173
$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~
174
$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~
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 --output-lib $output_objdir/$libname.dll.a~
176
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
180
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
181
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
184
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
185
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
190
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
194
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
195
*** create shared libraries on Solaris systems. Therefore, libtool
196
*** is disabling shared libraries support. We urge you to upgrade GNU
197
*** binutils to release 2.9.1 or newer. Another option is to modify
198
*** your PATH or compiler configuration so that the native linker is
199
*** used, and then restart.
202
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
203
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
204
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
211
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
214
hardcode_shlibpath_var=no
218
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
219
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
220
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
227
if test "$ld_shlibs" = yes; then
228
runpath_var=LD_RUN_PATH
229
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
230
export_dynamic_flag_spec='${wl}--export-dynamic'
233
# dlltool doesn't understand --whole-archive et. al.
234
whole_archive_flag_spec=
237
# ancient GNU ld didn't support --whole-archive et. al.
238
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
239
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
241
whole_archive_flag_spec=
247
# PORTME fill in a description of your system's linker (not GNU ld)
250
allow_undefined_flag=unsupported
251
always_export_symbols=yes
252
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'
253
# Note: this linker hardcodes the directories in LIBPATH if there
254
# are no directories specified by -L.
256
if test "$with_gcc" = yes && test -z "$link_static_flag"; then
257
# Neither direct hardcoding nor static linking is supported with a
259
hardcode_direct=unsupported
265
hardcode_libdir_separator=':'
267
# When large executables or shared objects are built, AIX ld can
268
# have problems creating the table of contents. If linking a library
269
# or program results in "error TOC overflow" add -mminimal-toc to
270
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
271
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
272
if test "$with_gcc" = yes; then
273
case $host_os in aix4.[012]|aix4.[012].*)
274
# We only want to do this on AIX 4.2 and lower, the check
275
# below for broken collect2 doesn't work under 4.3+
276
collect2name=`${CC} -print-prog-name=collect2`
277
if test -f "$collect2name" && \
278
strings "$collect2name" | grep resolve_lib_name >/dev/null
280
# We have reworked collect2
283
# We have old collect2
284
hardcode_direct=unsupported
285
# It fails to find uninstalled libraries when the uninstalled
286
# path is not listed in the libpath. Setting hardcode_minus_L
287
# to unsupported forces relinking
289
hardcode_libdir_flag_spec='-L$libdir'
290
hardcode_libdir_separator=
293
shared_flag='-shared'
296
if test "$host_cpu" = ia64; then
297
shared_flag='${wl}-G'
299
shared_flag='${wl}-bM:SRE'
303
if test "$host_cpu" = ia64; then
304
# On IA64, the linker does run time linking by default, so we don't
305
# have to do anything special.
306
aix_use_runtimelinking=no
307
exp_sym_flag='-Bexport'
310
# Test if we are trying to use run time linking, or normal AIX style linking.
311
# If -brtl is somewhere in LDFLAGS, we need to do run time linking.
312
aix_use_runtimelinking=no
313
for ld_flag in $LDFLAGS; do
314
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
315
aix_use_runtimelinking=yes
319
exp_sym_flag='-bexport'
320
no_entry_flag='-bnoentry'
322
# -bexpall does not export symbols beginning with underscore (_)
323
always_export_symbols=yes
324
if test "$aix_use_runtimelinking" = yes; then
325
# Warning - without using the other run time loading flags (-brtl), -berok will
326
# link without error, but may produce a broken library.
327
allow_undefined_flag=' ${wl}-berok'
328
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
329
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"
331
if test "$host_cpu" = ia64; then
332
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
333
allow_undefined_flag="-z nodefs"
334
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"
336
allow_undefined_flag=' ${wl}-berok'
337
# -bexpall does not export symbols beginning with underscore (_)
338
always_export_symbols=yes
339
# Exported symbols can be pulled into shared objects from archives
340
whole_archive_flag_spec=' '
341
build_libtool_need_lc=yes
342
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
343
# This is similar to how AIX traditionally builds it's shared libraries.
344
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'
350
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)'
351
hardcode_libdir_flag_spec='-L$libdir'
353
# see comment about different semantics on the GNU ld section
358
# When not using gcc, we currently assume that we are using
359
# Microsoft Visual C++.
360
# hardcode_libdir_flag_spec is actually meaningless, as there is
361
# no search path for DLLs.
362
hardcode_libdir_flag_spec=' '
363
allow_undefined_flag=unsupported
364
# Tell ltmain to make .lib files, not .a files.
366
# FIXME: Setting linknames here is a bad hack.
367
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
368
# The linker will automatically build a .lib file if we build a DLL.
369
old_archive_from_new_cmds='true'
370
# FIXME: Should let the user specify the lib program.
371
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
372
fix_srcfile_path='`cygpath -w "$srcfile"`'
379
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
380
# support. Future versions do this automatically, but an explicit c++rt0.o
381
# does not break anything, and helps significantly (at the cost of a little
384
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
385
hardcode_libdir_flag_spec='-R$libdir'
387
hardcode_shlibpath_var=no
390
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
392
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
395
hardcode_shlibpath_var=no
398
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
400
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
401
hardcode_libdir_flag_spec='-R$libdir'
403
hardcode_shlibpath_var=no
406
hpux9* | hpux10* | hpux11*)
408
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' ;;
409
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
411
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
412
hardcode_libdir_separator=:
414
hardcode_minus_L=yes # Not in the search PATH, but as the default
415
# location of the library.
416
export_dynamic_flag_spec='${wl}-E'
420
if test "$with_gcc" = yes; then
421
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'
423
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
425
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
426
hardcode_libdir_separator=:
431
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
432
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
434
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
436
hardcode_libdir_flag_spec='${wl}-R$libdir'
438
hardcode_shlibpath_var=no
442
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
443
hardcode_libdir_flag_spec='-R$libdir'
445
hardcode_shlibpath_var=no
449
hardcode_libdir_flag_spec='-L$libdir'
451
allow_undefined_flag=unsupported
452
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'
453
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
457
if test "$with_gcc" = yes; then
458
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
459
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'
461
allow_undefined_flag=' -expect_unresolved \*'
462
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'
464
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
465
hardcode_libdir_separator=:
468
osf4* | osf5*) # as osf3* with the addition of -msym flag
469
if test "$with_gcc" = yes; then
470
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
471
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'
473
allow_undefined_flag=' -expect_unresolved \*'
474
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'
476
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
477
hardcode_libdir_separator=:
481
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
482
hardcode_shlibpath_var=no
483
runpath_var=LD_RUN_PATH
484
hardcode_runpath_var=yes
488
no_undefined_flag=' -z text'
489
# $CC -shared without GNU ld will not create a library from C++
490
# object files and a static libstdc++, better avoid it by now
491
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
492
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
493
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
494
hardcode_libdir_flag_spec='-R$libdir'
495
hardcode_shlibpath_var=no
497
solaris2.[0-5] | solaris2.[0-5].*) ;;
498
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
499
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
505
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
506
hardcode_libdir_flag_spec='-L$libdir'
509
hardcode_shlibpath_var=no
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
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
520
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
521
hardcode_shlibpath_var=no
522
export_dynamic_flag_spec='-Bexport'
526
no_undefined_flag=' -z text'
527
# $CC -shared without GNU ld will not create a library from C++
528
# object files and a static libstdc++, better avoid it by now
529
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
530
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
531
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
532
hardcode_libdir_flag_spec=
533
hardcode_shlibpath_var=no
534
runpath_var='LD_RUN_PATH'
538
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
539
hardcode_libdir_flag_spec='-L$libdir'
540
hardcode_shlibpath_var=no
544
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
545
hardcode_libdir_flag_spec='-L$libdir'
546
hardcode_shlibpath_var=no
550
if test -d /usr/nec; then
551
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
552
hardcode_shlibpath_var=no
553
runpath_var=LD_RUN_PATH
554
hardcode_runpath_var=yes
560
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
563
hardcode_shlibpath_var=no
564
hardcode_runpath_var=yes
565
runpath_var=LD_RUN_PATH
569
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
570
runpath_var='LD_RUN_PATH'
571
hardcode_shlibpath_var=no
580
## Compiler Characteristics: PIC flags, static flags, etc
582
# We don't use cached values here since only the C compiler
583
# characteristics should be cached.
587
ac_cv_prog_cc_static=
588
ac_cv_prog_cc_no_builtin=
589
ac_cv_prog_cc_can_build_shared=$can_build_shared
591
ac_cv_prog_cc_wl='-Wl,'
592
ac_cv_prog_cc_static='-static'
595
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
596
# PIC is the default for these OSes.
599
# Below there is a dirty hack to force normal static linking with -ldl
600
# The problem is because libdl dynamically linked with both libc and
601
# libC (AIX C++ library), which obviously doesn't included in libraries
602
# list by gcc. This cause undefined symbols with -static flags.
603
# This hack allows C programs to be linked with "-static -ldl", but
604
# we not sure about C++ programs.
605
ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
608
# DJGPP does not suppot shared libraries at all
611
cygwin* | mingw* | os2*)
612
# This hack is so that the source file can tell whether it is being
613
# built for inclusion in a dll (and should export symbols for example).
614
ac_cv_prog_cc_pic='-DDLL_EXPORT'
617
# FIXME: we need at least 68020 code to build shared libraries, but
618
# adding the `-m68020' flag to GCC prevents building anything better,
620
ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
623
if test -d /usr/nec; then
624
ac_cv_prog_cc_pic=-Kconform_pic
628
ac_cv_prog_cc_pic='-fPIC'
632
# GCJ did not exist at the time GCC didn't implicitly link libc in.
635
# All existing releases of GCJ support `-c -o'.
636
lt_cv_compiler_c_o=yes