[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SONAME clarification
From: |
Marco Atzeri |
Subject: |
Re: SONAME clarification |
Date: |
Fri, 30 Jan 2009 18:20:14 +0100 (CET) |
--- "John W. Eaton" <address@hidden> ha scritto:
> On 29-Jan-2009, Marco Atzeri wrote:
> |
> | Hi John,
> | thanks for the effort, however
> | something is not as expected on cygwin
> |
> | $ file lib*
> |
> | libcruft.so: PE32 executable for MS
> Windows
> | (DLL) (console) Intel 80386 32-bit
> | libcruft.so.3.1.51+: symbolic link to
> `libcruft.so'
> | liblibcruftso: current ar archive
> |
> | I will try to investigate why I have "so" instead
> of
> | "dll".
> | For the last "liblibcruftso" SONAME does not work
> | if $(basename) is already "libcruft"
> |
> |
>
SONAME_FLAGS='-Wl,--out-implib=$(SHLLIBPRE)$(basename
> | $@)$(SHLLIB)'
> |
> | should it be something like
> | SONAME_FLAGS='-Wl,--out-implib=$(patsubst
> | lib,$(SHLBINPRE)%,$@).$(SHLLIB)'
>
> The missing . is definitely a mistake.
>
> I see now that the use of $(basename) is also wrong.
>
> The $(SONAME_FLAGS) variable is used in rules like
>
> $(SHLLIBPRE)cruft.$(SHLEXT): $(CRUFT_PICOBJ)
> rm -f $@
> $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o
> $@ $^ $(LINK_DEPS)
>
> So "$@" is "$(SHLLIBPRE)cruft.$(SHLEXT)".
>
> You'll have to tell me what is the right conversion.
> I don't really
> understand what the argument to --out-implib is
> supposed to be.
>
> jwe
>
Hi John,
the Cywin reference is here
http://cygwin.com/cygwin-ug-net/dll.html#dll-build
gcc -shared -o cyg${module}.dll \
-Wl,--out-implib=lib${module}.dll.a \
-Wl,--export-all-symbols \
-Wl,--enable-auto-import \
-Wl,--whole-archive ${old_libs} \
-Wl,--no-whole-archive ${dependency_libs}
while for mingw the convention is
gcc -shared -o lib${module}.dll \
-Wl,--out-implib=lib${module}.dll.a \
....
Attached an additional patch, to amend yours.
Now I have the right call
g++ -shared -Wl,--export-all-symbols
-Wl,--enable-auto-import -Wl,--enable-auto-image-base
-Wl,--out-implib=libcruft.dll.a -o cygcruft.dll ....
and files
libcruft.dll.a: current ar archive
cygcruft.dll: PE32 executable for MS Windows
(DLL) (console) Intel 80386 32-bit
cygcruft.dll.a.3.1.51+: symbolic link to `cygcruft.dll
Two additional notes:
1 )I can not test mingw so somemone else should verify
that the mingw portion is correct
2) I am blocked by this problem
http://www-old.cae.wisc.edu/pipermail/octave-maintainers/2008-December/009785.html
so my build is incomplete and
I can not check if the remaing of your patch is
fine for the install phase.
Best Regards
Marco
Passa a Yahoo! Mail.
La webmail che ti offre GRATIS spazio illimitato,
antispam e messenger integrato.
http://it.mail.yahoo.com/
--- octave/configure.in 2009-01-29 15:01:04.584798000 +0100
+++ octave_local/configure.in 2009-01-30 15:25:02.211338500 +0100
@@ -1240,13 +1240,19 @@
case "$canonical_host_type" in
*-*-cygwin*)
LIBPRE=cyg
- SHLLIBPRE=lib
- SHLBINPRE=cyg
+ SHLLIBPRE=cyg
+ SHLBINPRE=lib
;;
esac
+ SHLEXT=dll
+ SHLLIB=dll.a
+ SHLBIN=a
+ SHLEXT_VER='$(SHLEXT).$(version)'
+ SHLLIB_VER='$(SHLLIB).$(version)'
+ SHLBIN_VER='$(SHLBIN).$(version)'
DL_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import
-Wl,--enable-runtime-pseudo-reloc"
SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import
-Wl,--enable-auto-image-base"
- SONAME_FLAGS='-Wl,--out-implib=$(SHLLIBPRE)$(basename $@)$(SHLLIB)'
+ SONAME_FLAGS='-Wl,--out-implib=$(patsubst
$(SHLLIBPRE)%,$(SHLBINPRE)%,$@).a'
;;
*-*-msdosmsvc)
- Re: SONAME clarification, John W. Eaton, 2009/01/27
- Re: SONAME clarification, Marco Atzeri, 2009/01/28
- Re: SONAME clarification, John W. Eaton, 2009/01/28
- Re: SONAME clarification, Marco Atzeri, 2009/01/28
- Re: SONAME clarification, John W. Eaton, 2009/01/28
- Re: SONAME clarification, Marco Atzeri, 2009/01/29
- Re: SONAME clarification, John W. Eaton, 2009/01/29
- Re: SONAME clarification,
Marco Atzeri <=
- Re: SONAME clarification, John W. Eaton, 2009/01/30