Changeset 605 for branches/GNU/src/binutils/ltcf-gcj.sh
- Timestamp:
- Aug 16, 2003, 6:41:03 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/ltcf-gcj.sh
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 3 3 # ltcf-gcj.sh - Create a GCJ compiler specific configuration 4 4 # 5 # Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.5 # Copyright (C) 1996-1999, 2000, 2001, 2003 Free Software Foundation, Inc. 6 6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 7 7 # … … 42 42 43 43 ## Linker Characteristics 44 case "$host_os"in44 case $host_os in 45 45 cygwin* | mingw*) 46 46 # FIXME: the MSVC++ port hasn't been tested in a loooong time … … 60 60 61 61 # See if GNU ld supports shared libraries. 62 case "$host_os" in 63 aix3* | aix4*) 64 # On AIX, the GNU linker is very broken 65 ld_shlibs=no 66 cat <<EOF 1>&2 62 case $host_os in 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 67 68 68 69 *** Warning: the GNU linker, at least up to release 2.9.1, is reported … … 73 74 74 75 EOF 76 fi 75 77 ;; 76 78 … … 110 112 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~ 111 113 test -f $output_objdir/impgen.exe || (cd $output_objdir && \ 112 if test "x$ HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \114 if test "x$BUILD_CC" != "x" ; then $BUILD_CC -o impgen impgen.c ; \ 113 115 else $CC -o impgen impgen.c ; fi)~ 114 $output_objdir/impgen $dir/$so name> $output_objdir/$soname-def'116 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' 115 117 116 118 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' … … 121 123 dll_entry=__cygwin_dll_entry@12 122 124 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ 123 case "$host_os"in125 case $host_os in 124 126 mingw*) 125 127 # mingw values … … 152 154 sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' 153 155 156 # If the export-symbols file already is a .def file (1st line 157 # is EXPORTS), use it as is. 154 158 # If DATA tags from a recent dlltool are present, honour them! 155 archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~ 156 _lt_hint=1; 157 cat $export_symbols | while read symbol; do 158 set dummy \$symbol; 159 case \$# in 160 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; 161 *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; 162 esac; 163 _lt_hint=`expr 1 + \$_lt_hint`; 164 done~ 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~ 165 173 '"$ltdll_cmds"' 166 $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~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~ 167 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~ 168 $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~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 $output_objdir/$soname-exp '$lt_cv_ gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib'$ltdll_obj'$libobjs $deplibs $compiler_flags'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' 171 179 ;; 172 180 … … 176 184 wlarc= 177 185 else 178 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'179 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'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' 180 188 fi 181 189 ;; … … 240 248 else 241 249 # PORTME fill in a description of your system's linker (not GNU ld) 242 case "$host_os"in250 case $host_os in 243 251 aix3*) 244 252 allow_undefined_flag=unsupported … … 255 263 ;; 256 264 257 aix4* )258 hardcode_ libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'265 aix4* | aix5*) 266 hardcode_direct=yes 259 267 hardcode_libdir_separator=':' 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. 260 274 if test "$with_gcc" = yes; then 261 collect2name=`${CC} -print-prog-name=collect2` 262 if test -f "$collect2name" && \ 263 strings "$collect2name" | grep resolve_lib_name >/dev/null 264 then 265 # We have reworked collect2 266 hardcode_direct=yes 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 295 shared_flag='-shared' 296 else 297 # not using gcc 298 if test "$host_cpu" = ia64; then 299 shared_flag='${wl}-G' 267 300 else 268 # We have old collect2 269 hardcode_direct=unsupported 270 # It fails to find uninstalled libraries when the uninstalled 271 # path is not listed in the libpath. Setting hardcode_minus_L 272 # to unsupported forces relinking 273 hardcode_minus_L=yes 274 hardcode_libdir_flag_spec='-L$libdir' 275 hardcode_libdir_separator= 301 shared_flag='${wl}-bM:SRE' 276 302 fi 277 shared_flag='-shared' 278 else 279 shared_flag='${wl}-bM:SRE' 280 hardcode_direct=yes 281 fi 282 allow_undefined_flag=' ${wl}-berok' 283 archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' 284 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' 285 case "$host_os" in aix4.[01]|aix4.[01].*) 286 # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on 287 always_export_symbols=yes ;; 288 esac 289 ;; 303 fi 304 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 309 if test $with_gnu_ld = no; then 310 exp_sym_flag='-Bexport' 311 no_entry_flag="" 312 fi 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 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 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 ;; 290 354 291 355 amigaos*) … … 312 376 # FIXME: Should let the user specify the lib program. 313 377 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' 314 fix_srcfile_path='`cygpath -w $srcfile`'378 fix_srcfile_path='`cygpath -w "$srcfile"`' 315 379 ;; 316 380 … … 347 411 348 412 hpux9* | hpux10* | hpux11*) 349 case "$host_os"in413 case $host_os in 350 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' ;; 351 415 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; … … 374 438 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 375 439 else 376 archive_cmds='$LD -shared - o $lib $libobjs $deplibs $linker_flags' # ELF440 archive_cmds='$LD -shared -nodefaultlibs -o $lib $libobjs $deplibs $linker_flags' # ELF 377 441 fi 378 442 hardcode_libdir_flag_spec='${wl}-R$libdir' … … 428 492 429 493 solaris*) 430 no_undefined_flag=' -z text' 431 # $CC -shared without GNU ld will not create a library from C++ 432 # object files and a static libstdc++, better avoid it by now 433 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 494 no_undefined_flag=' ${wl}-z ${wl}defs' 495 archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 434 496 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 435 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 436 hardcode_libdir_flag_spec='-R$libdir' 437 hardcode_shlibpath_var=no 438 case "$host_os" in 497 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 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' 505 hardcode_shlibpath_var=no 506 case $host_os in 439 507 solaris2.[0-5] | solaris2.[0-5].*) ;; 440 508 *) # Supported since Solaris 2.6 (maybe 2.5.1?) 441 whole_archive_flag_spec=' -z allextract$convenience -zdefaultextract' ;;509 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; 442 510 esac 443 511 link_all_deplibs=yes … … 508 576 ;; 509 577 510 unixware7*) 511 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 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 512 585 runpath_var='LD_RUN_PATH' 513 586 hardcode_shlibpath_var=no … … 534 607 ac_cv_prog_cc_static='-static' 535 608 536 case "$host_os"in609 case $host_os in 537 610 beos* | irix5* | irix6* | osf3* | osf4* | osf5*) 538 611 # PIC is the default for these OSes. … … 547 620 ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC" 548 621 ;; 622 *djgpp*) 623 # DJGPP does not suppot shared libraries at all 624 ac_cv_prog_cc_pic= 625 ;; 549 626 cygwin* | mingw* | os2*) 550 627 # This hack is so that the source file can tell whether it is being … … 570 647 # GCJ did not exist at the time GCC didn't implicitly link libc in. 571 648 need_lc=no 649 650 # All existing releases of GCJ support `-c -o'. 651 lt_cv_compiler_c_o=yes -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.