diff options
author | Andreas Tobler <a.tobler@schweiz.ch> | 2003-11-19 06:29:32 +0100 |
---|---|---|
committer | Andreas Tobler <andreast@gcc.gnu.org> | 2003-11-19 06:29:32 +0100 |
commit | 43d8d958ceabe3fa77308f115e2e616d307b9b3d (patch) | |
tree | a48bbeae29df42ceed0c81554bc0e2cce1f201d5 /ltcf-cxx.sh | |
parent | f7a75b82d2228bdd8b92bef1138660b78454fae2 (diff) | |
download | gcc-43d8d958ceabe3fa77308f115e2e616d307b9b3d.tar.gz |
libtool.m4: Sync darwin bits from libtool cvs to build a gcc with shared/dylibed libraries.
2003-11-19 Andreas Tobler <a.tobler@schweiz.ch>
* libtool.m4: Sync darwin bits from libtool cvs to build a gcc with
shared/dylibed libraries.
* ltmain.sh: Likewise.
* ltcf-c.sh: Likewise, disable shared library build for OS-X < 10.3.
* ltcf-cxx.sh: Likewise.
* ltcf-gcj.sh: Likewise.
* ltconfig: Likewise.
From-SVN: r73729
Diffstat (limited to 'ltcf-cxx.sh')
-rw-r--r-- | ltcf-cxx.sh | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/ltcf-cxx.sh b/ltcf-cxx.sh index 3044fc39bd2..2ecd53e5758 100644 --- a/ltcf-cxx.sh +++ b/ltcf-cxx.sh @@ -223,6 +223,51 @@ case $host_os in ;; esac ;; + + darwin* | rhapsody*) + case "$host_os" in + rhapsody* | darwin1.[[012]]) + allow_undefined_flag='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + allow_undefined_flag='-flat_namespace -undefined suppress' + ;; + 10.*) + allow_undefined_flag='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + # Disable shared library build on OS-X older than 10.3. + case $host_os in + darwin[1-6]*) + can_build_shared=no + ;; + darwin7*) + can_build_shared=yes + ;; + esac + output_verbose_link_cmd='echo' + archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + + # Don't fix this by using the ld -exported_symbols_list flag, + # it doesn't exist in older darwin ld's + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='-all_load $convenience' + link_all_deplibs=yes + ;; + dgux*) case $cc_basename in ec++) @@ -712,7 +757,7 @@ if test "$with_gcc" = yes; then darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - lt_cv_prog_cc_pic='-fno-common' + ac_cv_prog_cc_pic='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all |