From 3ea7ad07ffacbabc9a89bef75507332853cfd868 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 6 Oct 2003 08:34:08 +0000 Subject: [PATCH] Use a unique base address for each DLL. Fixed ltmain.sh for MSYS development environment. --- acinclude.m4 | 8 ++++---- ltmain.sh | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 1c12b52e3..31ad2d0f5 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -3043,7 +3043,7 @@ case $host_os in _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -3052,7 +3052,7 @@ case $host_os in echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi @@ -5266,7 +5266,7 @@ EOF _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -5275,7 +5275,7 @@ EOF echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base ${wl}--out-implib,$lib' else ld_shlibs=no fi diff --git a/ltmain.sh b/ltmain.sh index 32f9a522a..07e2b7ce8 100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -4656,8 +4656,13 @@ check_executable(const char * path) return 0; if ((stat (path, &st) >= 0) && - (((st.st_mode & S_IXOTH) == S_IXOTH) || + ( +#ifdef S_IXOTH + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#ifdef S_IXGRP ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif ((st.st_mode & S_IXUSR) == S_IXUSR))) return 1; else