Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA/PATCH] Darwin fixes for ltconfig, ltcf-c.sh
@ 2002-11-13  8:55 Klee Dienes
  2002-11-13  9:57 ` Andrew Cagney
  0 siblings, 1 reply; 72+ messages in thread
From: Klee Dienes @ 2002-11-13  8:55 UTC (permalink / raw)
  To: binutils; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]

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  <kdienes@apple.com>

         * 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.



[-- Attachment #2: ltconfig.txt --]
[-- Type: text/plain, Size: 4838 bytes --]

2002-11-12  Klee Dienes  <kdienes@apple.com>

	* 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

^ permalink raw reply	[flat|nested] 72+ messages in thread
* Re: [RFC] Update to current automake/autoconf/libtool versions.
@ 2002-12-05 10:15 Michael Elizabeth Chastain
  2002-12-05 10:37 ` Klee Dienes
  0 siblings, 1 reply; 72+ messages in thread
From: Michael Elizabeth Chastain @ 2002-12-05 10:15 UTC (permalink / raw)
  To: drow, klee; +Cc: ac131313, binutils, dj, gdb-patches, macro

Klee Dienes wrote:
> 1) Specify the versions of autoconf/automake/libtool/gettext by 
> reference to official tarballs from ftp.gnu.org.  In general, define 
> the version used to be "the most recent officially released version of 
> each tool".

I'm not a heavy autotools guy, but I do try to maintain a standardized
build + test enviroment for gdb testing.  I agree with the idea of
referring to official tarballs from ftp.gnu.org.  I strongly think that
the pointer should say "autoconf 2.56", for example, rather than "the
most recent officialy released version of autoconf".

If the pointer said "most recent officially released version of
autoconf", and I followed those instructions, then I would unwittingly
be using a different version of autoconf (2.57) then the version you are
standardizing on (2.56).  I would prefer an absolute version number,
and we kick it forward when we are happy with the new release + when
the project is not frozen in that regard.

I'm comfortable with the ftp://sources.redhat.com/pub/binutils mirror if
we really do enforce that the versions in there are the versions that
we use.  But I'm more comfortable if src/README-maintainer-mode points
directly to ftp.gnu.org.  It seems easier to manage a version list in
README-maintainer-mode rather than ftp://sources.redhat.com/pub/binutils.
Also as a gdb maintainer I can notice changes in README-maintainer-mode
easier than I can notice changes in ftp://sources.redhat.com/pub/binutils.

(BTW the top level src/README-maintainer-mode file still refers to
ftp://sourceware.cygnus.com).

Michael C


^ permalink raw reply	[flat|nested] 72+ messages in thread
* Re: [RFC] Update to current automake/autoconf/libtool versions.
@ 2002-12-05 11:08 Nathanael Nerode
  2002-12-05 11:31 ` Andrew Cagney
                   ` (4 more replies)
  0 siblings, 5 replies; 72+ messages in thread
From: Nathanael Nerode @ 2002-12-05 11:08 UTC (permalink / raw)
  To: klee, gdb-patches; +Cc: binutils, newlib, gcc

>1.  Please make sure to coordinate with Nathanael Nerode, who is in the
>middle of extensive autoconf-related work in the GCC repository.

I really would like to see the tree using autoconf 2.5x as soon as 
possible; if this can be done before I autoconfiscate the top level 
(which is not autoconfiscated yet) it will save me an awful lot of 
trouble, since I can then use autoconf 2.5x for that autoconfiscation. 
:-/

Your patch as is updates
bfd binutils gas gdb gprof ld mmalloc opcodes rda sim utils

Can you please work up a patch for gcc 3.4 to update
boehm-gc fastjar gcc libf2c libffi libiberty libjava libobjc 
libstdc++-v3 zlib

And a patch for Insight
itcl libgui

And one for Dejagnu
dejagnu expect

And for Newlib & Cygwin
libgloss newlib winsup

And one for
sid

and one for
intl

--
However, I think that it's OK to update one directory at a time, 
provided we specify clearly what's going on, and get it all done before 
the next release of anything.

Accordingly, I suggest getting clean patches for small sets of 
directories, making sure they work, getting them reviewed, and then 
putting them in; and then starting on the next set.  Keep sending update
notices to the various lists regarding which directories use the 'new' 
tools and which use the 'old'.  If you can make scripts which work 
correctly under *both* autoconf 2.5x *and* autoconf 2.13, by all means 
do so *first*, and mark those scripts as "compatibile with both", of 
course; but I expect that will only happen for the simplest directories.

If this is acceptable to other people in the various groups of course.

I expect this will generate a certain amount of breakage, but then so 
did my changes.  In both cases, it needs to be done, we just have to 
make sure all the breakage gets fixed.

--Nathanael

P.S.
It was mentioned that autoconf2.5 scripts will have trouble with 
building because of the top level passing down --target unconditionally.

Unfortunately I think some other aspects of the configure scripts 
require --target to be passed down unconditionally. :-/  Otherwise I'd 
just change it.



^ permalink raw reply	[flat|nested] 72+ messages in thread
* Re: [RFC] Update to current automake/autoconf/libtool versions.
@ 2002-12-05 14:40 Nathanael Nerode
  2002-12-05 15:19 ` Zack Weinberg
  0 siblings, 1 reply; 72+ messages in thread
From: Nathanael Nerode @ 2002-12-05 14:40 UTC (permalink / raw)
  To: zack, gdb-patches, binutils, newlib, gcc


>I'd like to remind everyone involved that last I checked it was flat
>impossible to do what libstdc++-v3/configure.in needs to do, using
>autoconf 2.5x.  I am not particularly sanguine about the situation

Flat impossible?

Wow.

And for the top level, all I had to do was define my own entire set of
macros to replace the AC_CHECK_TOOL and AC_PROG_* collection. :-)

I'd be interested to hear more about the problem.  Why can't it be dealt 
with by using private macros?

--Nathanael


^ permalink raw reply	[flat|nested] 72+ messages in thread
* Re: [RFC] Update to current automake/autoconf/libtool versions.
@ 2002-12-05 14:42 Joern Rennecke
  0 siblings, 0 replies; 72+ messages in thread
From: Joern Rennecke @ 2002-12-05 14:42 UTC (permalink / raw)
  To: Alan Modra
  Cc: Zack Weinberg, Nathanael Nerode, klee, gdb-patches, binutils,
	newlib, gcc

> It seems that the major impact of configuring parts of a tree using
> different autoconf versions will be on people using
> --enable-maintainer-mode, so another solution might be to extend
> --enable-maintainer-mode to accept a list of directories.  I suspect
> most developers will only want --enable-maintainer-mode in the
> particular area they work on.

Unfortunately, for CPU port maintainers the area they work on is a
cross-section of gcc, newlib, binutils and gdb.

-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658


^ permalink raw reply	[flat|nested] 72+ messages in thread
* Re: [RFC] Update to current automake/autoconf/libtool versions
@ 2002-12-06  5:28 Nathanael Nerode
  0 siblings, 0 replies; 72+ messages in thread
From: Nathanael Nerode @ 2002-12-06  5:28 UTC (permalink / raw)
  To: zack; +Cc: gdb-patches, binutils, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 991 bytes --]

>Going over it all again, I realize that we could probably just
>redefine AC_NO_EXECUTABLES to do what we want.  We'd have to
>specialize its definition for every version of autoconf that we cared
>about, and check at every new release that it hadn't broken, but it
>would work.  I guess it's not impossible after all.
>
>zw

*twisted half-grin*

For the top level, I'd been unable to avoid writing 
complete replacements for AC_PROG_CC and AC_PROG_CXX, and it
was really nasty.

So this is actually better than I'd hoped.

Thanks!  Writing a specialized implementation of AC_NO_EXECUTABLES will
make my life easier, probably. :-)

The real reason I want autoconf 2.5x is twofold:
* it handles AC_REQUIRES on AC_CANONICAL_* properly
* it allows the use of m4_include, so I can make a master macro file
(in top level config, for instance) and use it even in directories 
without automake.

You might be amused by the most basic parts of my experimental 
aclocal.m4 include file.

--Nathanael

[-- Attachment #2: aclocal.m4 --]
[-- Type: text/plain, Size: 2431 bytes --]

# Autoconf M4 include file defining valuable macros for complex Canadian
# cross builds.

####
# _NCN_TOOL_PREFIXES
# Get prefixes for cross-compilers to the host and the target.
# This requires that AC_CANONICAL_SYSTEM be called beforehand.
# Unfortunately, AC_REQUIRE doesn't work properly in this case under
# autoconf 2.13.
AC_DEFUN([_NCN_TOOL_PREFIXES],
[ncn_tool_prefix=
test -n "$host_alias" && ncn_tool_prefix=$host_alias-
ncn_target_tool_prefix=
test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
]) []dnl # _NCN_TOOL_PREFIXES

####
# NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
# Like AC_CHECK_TOOL, but tries a prefix of the target, not the host.
# Code is pretty much lifted from autoconf2.53.

AC_DEFUN([NCN_CHECK_TARGET_TOOL],
[AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl
if test -n "$ncn_target_tool_prefix"; then
  AC_CHECK_PROG([$1], [${ncn_target_tool_prefix}$2], 
                [${ncn_target_tool_prefix}$2], , [$4])
fi
if test -z "$ac_cv_prog_$1" ; then
  ncn_ct_$1=$$1
  AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4])
  $1=$ncn_ct_$1
else
  $1="$ac_cv_prog_$1"
fi
]) []dnl # NCN_CHECK_TARGET_TOOL

####
# NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
# Like AC_CHECK_TOOL, but requires the prefix if build!=host.

AC_DEFUN([NCN_STRICT_CHECK_TOOL],
[AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl
if test -n "$ncn_tool_prefix"; then
  AC_CHECK_PROG([$1], [${ncn_tool_prefix}$2], 
                [${ncn_tool_prefix}$2], , [$4])
fi
if test -z "$ac_cv_prog_$1" ; then
  if test $build = $host ; then
    ncn_ct_$1=$$1
    AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4]) 
    $1=$ncn_ct_$1
  else
    $1="$3"
  fi
else
  $1="$ac_cv_prog_$1"
fi
]) []dnl # NCN_STRICT_CHECK_TOOL


####
# NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
# Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target.

AC_DEFUN([NCN_STRICT_CHECK_TARGET_TOOL],
[AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl
if test -n "$ncn_target_tool_prefix"; then
  AC_CHECK_PROG([$1], [${ncn_target_tool_prefix}$2], 
                [${ncn_target_tool_prefix}$2], , [$4])
fi
if test -z "$ac_cv_prog_$1" ; then
  if test $build = $target ; then
    ncn_ct_$1=$$1
    AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4]) 
    $1=$ncn_ct_$1
  else
    $1="$3"
  fi
else
  $1="$ac_cv_prog_$1"
fi
]) []dnl # NCN_STRICT_CHECK_TARGET_TOOL

^ permalink raw reply	[flat|nested] 72+ messages in thread
[parent not found: <9A4230D6-1D26-11D7-BFCA-00039396EEB8@apple.com>]

end of thread, other threads:[~2003-01-12 13:22 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-13  8:55 [RFA/PATCH] Darwin fixes for ltconfig, ltcf-c.sh Klee Dienes
2002-11-13  9:57 ` Andrew Cagney
2002-11-13 10:32   ` Klee Dienes
2002-12-04 22:04     ` [RFC] Update to current automake/autoconf/libtool versions Klee Dienes
2002-12-05  5:26       ` Hans-Peter Nilsson
2002-12-05 14:07         ` Alan Modra
2002-12-05  7:43       ` Andrew Cagney
2002-12-05  8:22         ` Klee Dienes
2002-12-05  9:01           ` Andrew Cagney
2002-12-05 12:55             ` Klee Dienes
2002-12-05 13:03               ` Daniel Jacobowitz
2002-12-05 13:13                 ` Andrew Cagney
2002-12-05 13:16                   ` Daniel Jacobowitz
2002-12-05 13:08               ` Andrew Cagney
2002-12-05 13:18                 ` Klee Dienes
2002-12-05  8:28         ` DJ Delorie
2002-12-05  9:37           ` Klee Dienes
2002-12-05  9:42             ` DJ Delorie
2002-12-05 10:28               ` Klee Dienes
2002-12-05  9:31         ` H. J. Lu
2002-12-05  7:44       ` Maciej W. Rozycki
2002-12-05  9:01         ` Klee Dienes
2002-12-05  8:09       ` Daniel Jacobowitz
2002-12-05  8:29         ` DJ Delorie
2002-12-05  8:35           ` Daniel Jacobowitz
2002-12-05  8:37             ` DJ Delorie
2002-12-05  8:40             ` Maciej W. Rozycki
2002-12-05  8:44               ` Daniel Jacobowitz
2002-12-05  9:19                 ` Elena Zannoni
2002-12-05  9:54                 ` Klee Dienes
2002-12-05 10:10                   ` Maciej W. Rozycki
2002-12-05 10:59                   ` Andrew Cagney
2002-12-06  5:52                     ` Maciej W. Rozycki
2002-12-05 10:59                   ` Doug Evans
2002-12-05 12:11                     ` Klee Dienes
2002-12-05 12:23                       ` Ian Lance Taylor
2002-12-05 14:29                         ` Klee Dienes
2002-12-06  5:34                     ` Maciej W. Rozycki
2002-12-06  7:25                       ` DJ Delorie
2002-12-06  8:06                         ` Maciej W. Rozycki
2002-12-06  8:47                           ` DJ Delorie
2002-12-05 13:59                   ` Ben Elliston
2002-12-05 13:41                     ` Ben Elliston
2002-12-30 16:10       ` Alexandre Oliva
2002-12-05 10:15 Michael Elizabeth Chastain
2002-12-05 10:37 ` Klee Dienes
2002-12-05 11:08 Nathanael Nerode
2002-12-05 11:31 ` Andrew Cagney
2002-12-05 13:31 ` Zack Weinberg
2002-12-05 14:36   ` Alan Modra
2002-12-05 14:56     ` Ian Lance Taylor
2002-12-05 15:22       ` Alan Modra
2002-12-05 15:43         ` Ian Lance Taylor
2002-12-05 15:51           ` Andrew Cagney
2002-12-05 15:47         ` Mike Stump
2002-12-05 16:30           ` Alan Modra
2002-12-05 16:45             ` Zack Weinberg
2002-12-08  2:49         ` Klee Dienes
2002-12-05 14:29 ` Christopher Faylor
2002-12-06  6:45 ` Maciej W. Rozycki
2002-12-08 10:53 ` Klee Dienes
2002-12-05 14:40 Nathanael Nerode
2002-12-05 15:19 ` Zack Weinberg
2002-12-06 10:21   ` Tom Tromey
2002-12-07 13:06   ` Alexandre Oliva
2002-12-07 16:03     ` Zack Weinberg
2002-12-09 19:16       ` Alexandre Oliva
2002-12-09 21:52         ` Geoff Keating
2002-12-08 13:11     ` Tom Tromey
2002-12-05 14:42 Joern Rennecke
2002-12-06  5:28 Nathanael Nerode
     [not found] <9A4230D6-1D26-11D7-BFCA-00039396EEB8@apple.com>
2003-01-12 13:22 ` Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox