Changeset 605 for branches/GNU/src/binutils/ltcf-cxx.sh
- Timestamp:
- Aug 16, 2003, 6:41:03 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/ltcf-cxx.sh
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 3 3 # ltcf-cxx.sh - Create a C++ compiler specific configuration 4 4 # 5 # Copyright (C) 1996-1999, 2000Free 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 # … … 69 69 70 70 # Check if GNU C++ uses GNU ld as the underlying linker, since the 71 # archiving commands below assume that GNU ld is being used. 72 if eval "`$CC -print-prog-name=ld` --version 2>&1" | \ 73 egrep 'GNU ld' > /dev/null; then 74 with_gnu_ld=yes 75 71 # archiving commands below assume that GNU ld is being used. The 72 # assumption here is that the linker is going to be the same as that 73 # used by the C compiler. For the purposes of GCC, this is ok, but 74 # if someone uses g++ along with a non-GNU C compiler that doesn't 75 # use GNU ld, we may lose. This is ok for the toolchain tree, since 76 # the only users of ltcf-cxx.sh are libstdc++-v3 and libjava, 77 # anyway, and those use both gcc and g++, so the settings are bound 78 # to be the same. 79 80 if test "$with_gnu_ld" = yes; then 76 81 archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 77 82 archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' … … 93 98 fi 94 99 else 95 with_gnu_ld=no96 100 wlarc= 97 101 … … 107 111 # what "hidden" libraries, object files and flags are used when 108 112 # linking a shared library. 109 output_verbose_link_cmd s='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'113 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' 110 114 111 115 else 112 116 with_gcc=no 113 with_gnu_ld=no114 117 wlarc= 115 118 fi 116 119 117 # In general, the C++ compiler should always link C++ objects.118 case $target in119 *aix3* | *aix4*)120 # AIX just has to be different, doesn't it? :-\121 LD=makeC++SharedLib_r122 LDFLAGS="$LDFLAGS -p 0"123 ;;124 *)125 LD="$CC"126 LDFLAGS="$LDFLAGS"127 ;;128 esac129 130 131 120 # PORTME: fill in a description of your system's C++ link characteristics 132 case "$host_os"in121 case $host_os in 133 122 aix3*) 134 123 # FIXME: insert proper C++ library support 135 124 ld_shlibs=no 136 125 ;; 137 aix4*) 138 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' 139 # -bexpall does not export symbols beginning with underscore (_) 126 aix4* | aix5*) 127 archive_cmds='' 128 hardcode_direct=yes 129 hardcode_libdir_separator=':' 130 link_all_deplibs=yes 131 # When large executables or shared objects are built, AIX ld can 132 # have problems creating the table of contents. If linking a library 133 # or program results in "error TOC overflow" add -mminimal-toc to 134 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 135 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 136 if test "$with_gcc" = yes; then 137 case $host_os in aix4.[012]|aix4.[012].*) 138 # We only want to do this on AIX 4.2 and lower, the check 139 # below for broken collect2 doesn't work under 4.3+ 140 collect2name=`${CC} -print-prog-name=collect2` 141 if test -f "$collect2name" && \ 142 strings "$collect2name" | grep resolve_lib_name >/dev/null 143 then 144 # We have reworked collect2 145 hardcode_direct=yes 146 else 147 # We have old collect2 148 hardcode_direct=unsupported 149 # It fails to find uninstalled libraries when the uninstalled 150 # path is not listed in the libpath. Setting hardcode_minus_L 151 # to unsupported forces relinking 152 hardcode_minus_L=yes 153 hardcode_libdir_flag_spec='-L$libdir' 154 hardcode_libdir_separator= 155 fi 156 esac 157 shared_flag='-shared' 158 else 159 # not using gcc 160 if test "$host_cpu" = ia64; then 161 shared_flag='${wl}-G' 162 else 163 shared_flag='${wl}-bM:SRE' 164 fi 165 fi 166 167 if test "$host_cpu" = ia64; then 168 # On IA64, the linker does run time linking by default, so we don't 169 # have to do anything special. 170 aix_use_runtimelinking=no 171 if test $with_gnu_ld = no; then 172 exp_sym_flag='-Bexport' 173 no_entry_flag="" 174 fi 175 else 176 # Test if we are trying to use run time linking, or normal AIX style linking. 177 # If -brtl is somewhere in LDFLAGS, we need to do run time linking. 178 aix_use_runtimelinking=no 179 for ld_flag in $LDFLAGS; do 180 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then 181 aix_use_runtimelinking=yes 182 break 183 fi 184 done 185 exp_sym_flag='-bexport' 186 no_entry_flag='-bnoentry' 187 fi 188 # It seems that -bexpall does not export symbols beginning with 189 # underscore (_), so it is better to generate a list of symbols to export. 140 190 always_export_symbols=yes 141 # Exported symbols can be pulled into shared objects from archives 142 whole_archive_flag_spec=' ' 143 build_libtool_need_lc=yes 191 if test "$aix_use_runtimelinking" = yes; then 192 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' 193 allow_undefined_flag=' -Wl,-G' 194 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}-brtl \${wl}$exp_sym_flag:\$export_symbols" 195 else 196 if test "$host_cpu" = ia64; then 197 if test $with_gnu_ld = no; then 198 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' 199 allow_undefined_flag="-z nodefs" 200 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" 201 fi 202 else 203 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' 204 # Warning - without using the other run time loading flags, -berok will 205 # link without error, but may produce a broken library. 206 no_undefined_flag=' ${wl}-bnoerok' 207 allow_undefined_flag=' ${wl}-berok' 208 # -bexpall does not export symbols beginning with underscore (_) 209 always_export_symbols=yes 210 # Exported symbols can be pulled into shared objects from archives 211 whole_archive_flag_spec=' ' 212 build_libtool_need_lc=yes 213 # This is similar to how AIX traditionally builds it's shared libraries. 214 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' 215 fi 216 fi 144 217 ;; 145 218 chorus*) 146 case "$cc_basename"in219 case $cc_basename in 147 220 *) 148 221 # FIXME: insert proper C++ library support 149 222 ld_shlibs=no 150 223 ;; 151 esac 224 esac 152 225 ;; 153 226 dgux*) 154 case "$cc_basename"in227 case $cc_basename in 155 228 ec++) 156 229 # FIXME: insert proper C++ library support … … 168 241 esac 169 242 ;; 243 freebsd[12]*) 244 # C++ shared libraries reported to be fairly broken before switch to ELF 245 ld_shlibs=no 246 ;; 170 247 freebsd*) 171 # FreeBSD uses GNU C++ and GNU ld 172 # FIXME: insert proper C++ library support 173 ld_shlibs=no 248 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 249 # conventions 250 ld_shlibs=yes 251 ;; 252 gnu*) 174 253 ;; 175 254 hpux*) 176 case "$cc_basename" in 255 if test $with_gnu_ld = no; then 256 case "$host_cpu" in 257 ia64*) 258 hardcode_libdir_flag_spec='-L$libdir' 259 hardcode_shlibpath_var=no ;; 260 *) 261 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ;; 262 esac 263 hardcode_direct=yes 264 hardcode_libdir_separator=: 265 export_dynamic_flag_spec='${wl}-E' 266 fi 267 hardcode_minus_L=yes # Not in the search PATH, but as the default 268 # location of the library. 269 270 case $cc_basename in 177 271 CC) 178 272 # FIXME: insert proper C++ library support … … 180 274 ;; 181 275 aCC) 182 case "$host_os"in276 case $host_os in 183 277 hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; 184 278 *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; 185 279 esac 186 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'187 hardcode_libdir_separator=:188 hardcode_direct=yes189 hardcode_minus_L=yes # Not in the search PATH, but as the default190 # location of the library.191 export_dynamic_flag_spec='${wl}-E'192 193 280 # Commands to make compiler produce verbose output that lists 194 281 # what "hidden" libraries, object files and flags are used when … … 199 286 # from the output so that they don't get included in the library 200 287 # dependencies. 201 output_verbose_link_cmd s='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'288 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 202 289 ;; 203 290 *) 204 # FIXME: insert proper C++ library support 205 ld_shlibs=no 291 if test $with_gcc = yes; then 292 if test $with_gnu_ld = no; then 293 case "$host_os" in 294 hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; 295 *) 296 case "$host_cpu" in 297 ia64*) 298 archive_cmds='$LD -b +h $soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' ;; 299 *) 300 archive_cmds='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; 301 esac 302 ;; 303 esac 304 fi 305 else 306 # FIXME: insert proper C++ library support 307 ld_shlibs=no 308 fi 206 309 ;; 207 310 esac 208 311 ;; 209 312 irix5* | irix6*) 210 case "$cc_basename"in313 case $cc_basename in 211 314 CC) 212 315 # SGI C++ … … 222 325 if test "$with_gcc" = yes; then 223 326 if test "$with_gnu_ld" = no; then 224 archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'327 archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 225 328 else 226 archive_cmds='$ LD -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'329 archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib' 227 330 fi 228 331 fi … … 234 337 ;; 235 338 linux*) 236 case "$cc_basename"in339 case $cc_basename in 237 340 KCC) 238 341 # Kuck and Associates, Inc. (KAI) C++ Compiler … … 252 355 # from the output so that they don't get included in the library 253 356 # dependencies. 254 output_verbose_link_cmd s='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'357 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 255 358 256 359 hardcode_libdir_flag_spec='${wl}--rpath,$libdir' … … 278 381 # from the output so that they don't get included in the library 279 382 # dependencies. 280 output_verbose_link_cmd s='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'383 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 281 384 ;; 282 385 esac … … 291 394 ;; 292 395 mvs*) 293 case "$cc_basename"in396 case $cc_basename in 294 397 cxx) 295 398 # FIXME: insert proper C++ library support … … 300 403 ld_shlibs=no 301 404 ;; 302 esac 405 esac 303 406 ;; 304 407 netbsd*) … … 306 409 ;; 307 410 osf3*) 308 if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then 309 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' 310 archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 311 312 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 313 hardcode_libdir_separator=: 314 315 # Commands to make compiler produce verbose output that lists 316 # what "hidden" libraries, object files and flags are used when 317 # linking a shared library. 318 output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' 319 fi 320 321 case "$cc_basename" in 411 case $cc_basename in 322 412 KCC) 323 413 # Kuck and Associates, Inc. (KAI) C++ Compiler … … 356 446 # from the output so that they don't get included in the library 357 447 # dependencies. 358 output_verbose_link_cmd s='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'448 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 359 449 ;; 360 450 *) 361 # FIXME: insert proper C++ library support 362 ld_shlibs=no 451 if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then 452 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' 453 archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 454 455 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 456 hardcode_libdir_separator=: 457 458 # Commands to make compiler produce verbose output that lists 459 # what "hidden" libraries, object files and flags are used when 460 # linking a shared library. 461 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' 462 else 463 # FIXME: insert proper C++ library support 464 ld_shlibs=no 465 fi 363 466 ;; 364 467 esac 365 468 ;; 366 469 osf4* | osf5*) 367 if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then 368 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' 369 archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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' 370 371 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 372 hardcode_libdir_separator=: 373 374 # Commands to make compiler produce verbose output that lists 375 # what "hidden" libraries, object files and flags are used when 376 # linking a shared library. 377 output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' 378 fi 379 380 case "$cc_basename" in 470 case $cc_basename in 381 471 KCC) 382 472 # Kuck and Associates, Inc. (KAI) C++ Compiler … … 400 490 ;; 401 491 cxx) 402 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' 403 archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' 404 405 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 492 allow_undefined_flag=' -expect_unresolved \*' 493 archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' 494 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~ 495 echo "-hidden">> $lib.exp~ 496 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ 497 $rm $lib.exp' 498 499 hardcode_libdir_flag_spec='-rpath $libdir' 406 500 hardcode_libdir_separator=: 407 501 … … 414 508 # from the output so that they don't get included in the library 415 509 # dependencies. 416 output_verbose_link_cmd s='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'510 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 417 511 ;; 418 512 *) 419 # FIXME: insert proper C++ library support 420 ld_shlibs=no 513 if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then 514 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' 515 archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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' 516 517 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 518 hardcode_libdir_separator=: 519 520 # Commands to make compiler produce verbose output that lists 521 # what "hidden" libraries, object files and flags are used when 522 # linking a shared library. 523 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' 524 else 525 # FIXME: insert proper C++ library support 526 ld_shlibs=no 527 fi 421 528 ;; 422 529 esac … … 427 534 ;; 428 535 sco*) 429 case "$cc_basename"in536 case $cc_basename in 430 537 CC) 431 538 # FIXME: insert proper C++ library support … … 439 546 ;; 440 547 sunos4*) 441 case "$cc_basename"in548 case $cc_basename in 442 549 CC) 443 550 # Sun C++ 4.x … … 457 564 ;; 458 565 solaris*) 459 case "$cc_basename"in566 case $cc_basename in 460 567 CC) 461 568 # Sun C++ 4.2, 5.x and Centerline C++ 462 no_undefined_flag=' -z text'569 no_undefined_flag=' -zdefs' 463 570 archive_cmds='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 464 571 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ … … 467 574 hardcode_libdir_flag_spec='-R$libdir' 468 575 hardcode_shlibpath_var=no 469 case "$host_os"in576 case $host_os in 470 577 solaris2.[0-5] | solaris2.[0-5].*) ;; 471 578 *) … … 487 594 # from the output so that they don't get included in the library 488 595 # dependencies. 489 output_verbose_link_cmd s='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'596 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 490 597 491 598 # Archives containing C++ object files must be created using … … 505 612 # GNU C++ compiler with Solaris linker 506 613 if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then 614 no_undefined_flag=' ${wl}-z ${wl}defs' 507 615 if $CC --version | egrep -v '^2\.7' > /dev/null; then 508 archive_cmds='$ LD -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'616 archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 509 617 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 510 $ LD -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'618 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 511 619 512 620 # Commands to make compiler produce verbose output that lists 513 621 # what "hidden" libraries, object files and flags are used when 514 622 # linking a shared library. 515 output_verbose_link_cmd s="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""623 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" 516 624 else 517 625 # g++ 2.7 appears to require `-G' NOT `-shared' on this 518 626 # platform. 519 archive_cmds='$ LD -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'627 archive_cmds='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 520 628 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 521 $ LD -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'629 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 522 630 523 631 # Commands to make compiler produce verbose output that lists 524 632 # what "hidden" libraries, object files and flags are used when 525 633 # linking a shared library. 526 output_verbose_link_cmd s="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""634 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" 527 635 fi 528 636 … … 530 638 fi 531 639 ;; 532 esac 640 esac 533 641 ;; 534 642 tandem*) 535 case "$cc_basename"in643 case $cc_basename in 536 644 NCC) 537 645 # NonStop-UX NCC 3.20 … … 543 651 ld_shlibs=no 544 652 ;; 545 esac 653 esac 546 654 ;; 547 655 unixware*) … … 571 679 ac_cv_prog_cc_can_build_shared=$can_build_shared 572 680 573 # It is not enough to reset these cached values, they must be unset. 574 unset ac_cv_prog_cc_pic_works 575 unset ac_cv_prog_cc_static_works 681 ac_cv_prog_cc_pic_works= 682 ac_cv_prog_cc_static_works= 576 683 577 684 if test "$with_gcc" = yes; then … … 579 686 ac_cv_prog_cc_static='-static' 580 687 581 case "$host_os" in 582 beos* | irix5* | irix6* | osf3* | osf4* | osf5*) 583 # PIC is the default for these OSes. 584 ;; 688 case $host_os in 585 689 aix*) 586 # Below there is a dirty hack to force normal static linking with -ldl 587 # The problem is because libdl dynamically linked with both libc and 588 # libC (AIX C++ library), which obviously doesn't included in libraries 589 # list by gcc. This cause undefined symbols with -static flags. 590 # This hack allows C programs to be linked with "-static -ldl", but 591 # we not sure about C++ programs. 592 ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC" 593 ;; 594 cygwin* | mingw* | os2*) 595 # This hack is so that the source file can tell whether it is being 596 # built for inclusion in a dll (and should export symbols for example). 597 ac_cv_prog_cc_pic='-DDLL_EXPORT' 690 # All AIX code is PIC. 691 if test "$host_cpu" = ia64; then 692 # AIX 5 now supports IA64 processor 693 lt_cv_prog_cc_static='-Bstatic' 694 else 695 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' 696 fi 598 697 ;; 599 698 amigaos*) … … 603 702 ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' 604 703 ;; 704 beos* | irix5* | irix6* | osf3* | osf4* | osf5*) 705 # PIC is the default for these OSes. 706 ;; 707 cygwin* | mingw* | os2*) 708 # This hack is so that the source file can tell whether it is being 709 # built for inclusion in a dll (and should export symbols for example). 710 ac_cv_prog_cc_pic='-DDLL_EXPORT' 711 ;; 712 darwin* | rhapsody*) 713 # PIC is the default on this platform 714 # Common symbols not allowed in MH_DYLIB files 715 lt_cv_prog_cc_pic='-fno-common' 716 ;; 717 *djgpp*) 718 # DJGPP does not support shared libraries at all 719 ac_cv_prog_cc_pic= 720 ;; 605 721 sysv4*MP*) 606 722 if test -d /usr/nec; then … … 613 729 esac 614 730 else 615 case "$host_os"in616 aix4* )731 case $host_os in 732 aix4* | aix5*) 617 733 # All AIX code is PIC. 734 if test "$host_cpu" = ia64; then 735 # AIX 5 now supports IA64 processor 736 lt_cv_prog_cc_static='-Bstatic' 737 else 738 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' 739 fi 618 740 ;; 619 741 chorus*) 620 case "$cc_basename"in742 case $cc_basename in 621 743 cxch68) 622 744 # Green Hills C++ Compiler 623 745 # ac_cv_prog_cc_static="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" 624 746 ;; 625 esac 747 esac 626 748 ;; 627 749 dgux*) 628 case "$cc_basename"in750 case $cc_basename in 629 751 ec++) 630 752 ac_cv_prog_cc_pic='-KPIC' … … 641 763 # FreeBSD uses GNU C++ 642 764 ;; 765 gnu*) 766 ;; 643 767 hpux9* | hpux10* | hpux11*) 644 case "$cc_basename"in768 case $cc_basename in 645 769 CC) 646 770 ac_cv_prog_cc_wl='-Wl,' … … 658 782 ;; 659 783 irix5* | irix6*) 660 case "$cc_basename"in784 case $cc_basename in 661 785 CC) 662 786 ac_cv_prog_cc_wl='-Wl,' … … 669 793 ;; 670 794 linux*) 671 case "$cc_basename"in795 case $cc_basename in 672 796 KCC) 673 797 # KAI C++ Compiler … … 691 815 ;; 692 816 mvs*) 693 case "$cc_basename"in817 case $cc_basename in 694 818 cxx) 695 819 ac_cv_prog_cc_pic='-W c,exportall' … … 697 821 *) 698 822 ;; 699 esac 823 esac 700 824 ;; 701 825 netbsd*) 702 826 ;; 703 827 osf3* | osf4* | osf5*) 704 case "$cc_basename"in828 case $cc_basename in 705 829 KCC) 706 830 ac_cv_prog_cc_wl='--backend -Wl,' … … 725 849 ;; 726 850 sco*) 727 case "$cc_basename"in851 case $cc_basename in 728 852 CC) 729 853 ac_cv_prog_cc_pic='-fPIC' … … 734 858 ;; 735 859 solaris*) 736 case "$cc_basename"in860 case $cc_basename in 737 861 CC) 738 862 # Sun C++ 4.2, 5.x and Centerline C++ … … 747 871 *) 748 872 ;; 749 esac 873 esac 750 874 ;; 751 875 sunos4*) 752 case "$cc_basename"in876 case $cc_basename in 753 877 CC) 754 878 # Sun C++ 4.x … … 765 889 ;; 766 890 tandem*) 767 case "$cc_basename"in891 case $cc_basename in 768 892 NCC) 769 893 # NonStop-UX NCC 3.20 … … 772 896 *) 773 897 ;; 774 esac 898 esac 775 899 ;; 776 900 unixware*) … … 783 907 esac 784 908 fi 785 ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC" 909 910 case "$host_os" in 911 # Platforms which do not suport PIC and -DPIC is meaningless 912 # on them: 913 *djgpp*) 914 ac_cv_prog_cc_pic= 915 ;; 916 *) 917 ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC" 918 ;; 919 esac 786 920 787 921 … … 799 933 800 934 801 if eval $ac_compile2>&5; then935 if (eval $ac_compile) 2>&5; then 802 936 # Parse the compiler output and extract the necessary 803 937 # objects, libraries and library flags. … … 807 941 pre_test_object_deps_done=no 808 942 809 for p in `eval $output_verbose_link_cmd s`; do943 for p in `eval $output_verbose_link_cmd`; do 810 944 811 945 case $p in -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.