It's __addtf3. (Presumably that's just the first one that's found ... if that were to be resolved we might then find there are others ?) No ... I mean if gcc-4.4.7 and gcc-4.7.0 didn't both name the dll 'libgcc_s_sjlj-1.dll' there would be no problem. (Hmmm ... on further reflection I guess that doesn't disprove the notion that I'm "pushing the limits".)

I couldn't find __addtf3 being used PDL's sources. per http://gcc.gnu.org/onlinedocs/gccint/Soft-float-library-routines.html its a backup for older CPUs.

the -static-libgcc will remove your dependency on libgcc

___________________________
I wonder ... would I have to build perl with that flag for that to work ? Or could I just include that flag for the building of PDL, without first rebuilding perl ? In a few places I've seen recommendations against using that flag where perl is concerned ... but I don't know the reasoning.


Compile your XS PDL library with that flag to make libgcc static. Or use the compiler that came with the strawberry perl version your targeting since this is for public distribution. You haven't said that gcc 4.4.X specifically doesn't work for you and 4.7.x does. I would recompile with the compiler strawberry perl came with. Perl specifically doesn't support compatibility between major versions for XS libraries (5.12 vs 5.14, 5.10 vs 5.12, and so forth). The headers change. The struct layouts change. Last I heard, Strawberry Perl and MSVC Perl of the same perl version do have ABI compatibility. PDL seems to be C only, not C++, so libgcc's exception handling (*unwind* calls, *frame* calls) shouldnt be needed, just long byte wise math ops. Apparently, GCC allows you to supply your own math functions perl http://gcc.gnu.org/onlinedocs/gccint/Soft-float-library-routines.html so in theory a Loadlibrary should be possible, but I suggest using the compiler that came with the perl, or static libgcc. You could also use dlltool and generate a new import library which is identical to 4.7.0 libgcc with a different DLL name such as libgccPerlPDL.dll. The import library will be 32/64 specific. It is possible to generate one on the fly from a makefile or from makefile.pl. Use perl to capture and parse the output of "`nm -g C:\folder\libgccforsharedlibraries.a`" and use that output, after regex processing, to spit out a def file with the symbols you found. Feed the def file into dlltool, dlltool will generate a .a file. Include that .a file along with -nostartfiles (you dont want the compiler's libgcc.a to be found) to gcc linker phase.

In reply to Re^3: [OT][Win32] How to load the right dll by bulk88
in thread [OT][Win32] How to load the right dll by syphilis

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.