[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: darwin/Fortran: -single_module
From: |
Peter O'Gorman |
Subject: |
Re: darwin/Fortran: -single_module |
Date: |
Sun, 04 Dec 2005 02:39:05 +0900 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Macintosh/20050317) |
Ralf Wildenhues wrote:
No testing done, and little experience with darwin, so if you deem ok
and tests pass, then please go ahead, after looking at these comments:
Hi Ralf,
Thanks for the review! Had not noticed these bugs.
Index: ChangeLog
2005-11-28 Peter O'Gorman <address@hidden>
* libltdl/config/ltmain.m4sh, libltdl/m4/libtool.m4 [darwin]:
Use -single_module by default when linking shared libraries. Can
be overridden by specifying -multi-module or by setting the env
var MULTI_MODULE before configure.
Please mention the fact that MACOSX_DEPLOYMENT_TARGET is not used as a
criterion any more in the ChangeLog.
Sure.
Is MULTI_MODULE used by other tools on darwin? If yes, should we not,
for the sake of non-interacting, use something like LT_MULTI_MODULE?
It is not used anywhere else, but LT_ strikes me as better.
Can it ever be useful to want to specify neither -single_module nor
-multi_module?
When neither is specified then the default is used. Now, accourding to the
man pages the default is multi_module, but that is only true for the 32 bit
linker, the 64 bit linker defaults to -single_module. Where
-single_module/-multi_module flags are not supported (older versions of the
linker/compiler/OS) the default is multi_module.
May users defeat your change by passing -Wl,-multi_module? They
wouldn't do that, right?
They'd get linker errors. The two conflicting flags may not be specified on
the link line.
Note indenting is inconsistenly wrt. TABs/spaces.
Hmm, I had thought I'd fixed them all to be spaces. Sorry.
More comments inline.
+ output_verbose_link_cmd=echo
+ if test -z "$MULTI_MODULE"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable MULTI_MODULE non-empty
+ # at configure time, or by adding -multi-module to the link flags.
+ # All ld's that accept -v accept -single_module
Plural is `lds'. This criterion seems quite dubious; if it's true..
Let me think about a better test, thanks.
+ if test -n "`ld -v 2>/dev/null`" ||
+ $CC -dumpspecs 2>&1 | $GREP 'single_module' >/dev/null; then
+ lt_int_apple_cc_single_mod=yes
+ fi
+ fi
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $single_module
$allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name
$rpath/$soname $verstring'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e
"s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module
-dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname
$verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
Am I correct in that the
"s,^[ ]*,,"
which will, after m4 quote removal, be
"s,^ *,,"
is supposed to remove 3 or more leading spaces, and not mess with any
TABs at all? (Just asking because this is a likely editor-messes-it-up
thing; several occasions.)
Meant to remove all leading whitespace. There should be a TAB in there. IIRC
when this first went in I was quite unsure of the required format of the
libtool symbols file, and wanted to be extra careful. I'll look at this
again later.
I wonder whether all this export_symbols munging should not rather
happen someplace else. In global_symbol_pipe maybe? The macro there
even tests for leading underscores and stuff. Where do the comment
lines and the spaces come from?
Surely, since you are not introducing this you may leave fixing it to
another patch.
Thanks,
Peter
- Re: darwin/Fortran: -single_module, Peter O'Gorman, 2005/12/01
- Re: darwin/Fortran: -single_module, Peter O'Gorman, 2005/12/03
- Re: darwin/Fortran: -single_module, Ralf Wildenhues, 2005/12/03
- Re: darwin/Fortran: -single_module,
Peter O'Gorman <=
- Re: darwin/Fortran: -single_module, Peter O'Gorman, 2005/12/06
- Re: darwin/Fortran: -single_module, Ralf Wildenhues, 2005/12/06
- Re: darwin/Fortran: -single_module, Peter O'Gorman, 2005/12/07
- Re: darwin/Fortran: -single_module, Ralf Wildenhues, 2005/12/07
- Re: darwin/Fortran: -single_module, Peter O'Gorman, 2005/12/07