From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18120 invoked by alias); 13 Nov 2002 16:55:14 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18058 invoked from network); 13 Nov 2002 16:55:12 -0000 Received: from unknown (HELO dc-mx13.cluster1.charter.net) (209.225.8.23) by sources.redhat.com with SMTP; 13 Nov 2002 16:55:12 -0000 Received: from [66.189.46.2] (HELO platinum.localnet) by dc-mx13.cluster1.charter.net (CommuniGate Pro SMTP 3.5.9) with ESMTP id 3959368; Wed, 13 Nov 2002 11:55:11 -0500 Date: Wed, 13 Nov 2002 08:55:00 -0000 Subject: [RFA/PATCH] Darwin fixes for ltconfig, ltcf-c.sh Content-Type: multipart/mixed; boundary=Apple-Mail-2-917251463 Mime-Version: 1.0 (Apple Message framework v543) Cc: gdb-patches@sources.redhat.com To: binutils@sources.redhat.com From: Klee Dienes Message-Id: X-SW-Source: 2002-11/txt/msg00365.txt.bz2 --Apple-Mail-2-917251463 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Content-length: 1248 The enclosed patch fixes the Darwin support in the top-level libtool support files of the binutils and GDB source repository. For the most part it just adds more Darwin-specific config blocks to ltconfig and ltcf-c.sh, and fixes a couple of nits in the existing Darwin support. The only non-Darwin-specific patch is the change to default CONFIG_SHELL to /bin/sh in ltconfig ... this prevents ltconfig from silently setting max_cmd_len to "none" if CONFIG_SHELL is not passed to ltconfig. 2002-11-12 Klee Dienes * ltconfig: Default CONFIG_SHELL to /bin/sh if no value is passed in by the environment. Recognize "macos10" as specifying a Darwin-based system. Remove extra '$' in library_names_spec for the Darwin configuration. * ltcf-c.sh: Move the Darwin config-block from the "$with_gnu_ld = yes" section to the "$with_gnu_ld = no" section (Darwin doesn't use GNU ld as it's linker). Use ac_cv_prog_cc_pic to set pic flags, not lt_cv_prog_cc_pic. Add a Darwin block for pic flags when using GCC as well as when using the system compiler. Recognize "macos10" as specifying a Darwin-based system in all clauses. --Apple-Mail-2-917251463 Content-Disposition: attachment; filename=ltconfig.txt Content-Transfer-Encoding: 7bit Content-Type: text/plain; x-unix-mode=0644; name="ltconfig.txt" Content-length: 4838 2002-11-12 Klee Dienes * ltconfig: Default CONFIG_SHELL to /bin/sh if no value is passed in by the environment. Recognize "macos10" as specifying a Darwin-based system. Remove extra '$' in library_names_spec for the Darwin configuration. * ltcf-c.sh: Move the Darwin config-block from the "$with_gnu_ld = yes" section to the "$with_gnu_ld = no" section (Darwin doesn't use GNU ld as it's linker). Use ac_cv_prog_cc_pic to set pic flags, not lt_cv_prog_cc_pic. Add a Darwin block for pic flags when using GCC as well as when using the system compiler. Recognize "macos10" as specifying a Darwin-based system in all clauses. diff -u --exclude=CVS --exclude=Makefile --exclude=configure cygnus.cygnus/src/./ltcf-c.sh cygnus.current/src/./ltcf-c.sh --- cygnus.cygnus/src/./ltcf-c.sh Tue Jul 30 13:32:54 2002 +++ cygnus.current/src/./ltcf-c.sh Wed Oct 30 21:53:09 2002 @@ -175,16 +175,6 @@ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' ;; - darwin* | rhapsody*) - allow_undefined_flag='-undefined suppress' - archive_cmds='$CC `test .$module = .yes && echo -bundle || echo -dynamiclib` $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -install_name $rpath/$soname `test -n "$verstring" -a x$verstring != x0.0 && echo $verstring`' - # We need to add '_' to the symbols in $export_symbols first - #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' - hardcode_direct=yes - hardcode_shlibpath_var=no - whole_archive_flag_spec='-all_load $convenience' - ;; - netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' @@ -456,6 +446,16 @@ link_all_deplibs=yes ;; + darwin* | rhapsody* | macos10*) + allow_undefined_flag='-undefined error' + archive_cmds='$CC `test .$module = .yes && echo -bundle || echo -dynamiclib` $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -install_name $rpath/$soname `test -n "$verstring" -a x"$verstring" != x0.0 && echo "$verstring"`' + # We need to add '_' to the symbols in $export_symbols first + #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' + hardcode_direct=yes + hardcode_shlibpath_var=no + whole_archive_flag_spec='-all_load $convenience' + ;; + netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out @@ -667,10 +667,10 @@ # built for inclusion in a dll (and should export symbols for example). ac_cv_prog_cc_pic='-DDLL_EXPORT' ;; - darwin* | rhapsody*) + darwin* | rhapsody* | macos10*) # 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 @@ -710,6 +710,12 @@ # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). ac_cv_prog_cc_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody* | macos10*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + ac_cv_prog_cc_pic='-fno-common' ;; newsos6) diff -u --exclude=CVS --exclude=Makefile --exclude=configure cygnus.cygnus/src/./ltconfig cygnus.current/src/./ltconfig --- cygnus.cygnus/src/./ltconfig Tue Jul 30 13:33:02 2002 +++ cygnus.current/src/./ltconfig Wed Oct 30 21:53:10 2002 @@ -27,6 +27,7 @@ # A lot of this script is taken from autoconf-2.10. # Check that we are running under the correct shell. +CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} SHELL=${CONFIG_SHELL-/bin/sh} echo=echo if test "X$1" = X--no-reexec; then @@ -1100,12 +1101,12 @@ lt_cv_dlopen_libs= ;; -darwin* | rhapsody*) +darwin* | rhapsody* | macos10*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.$`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`' + library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`' soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH --Apple-Mail-2-917251463--