I dont know what PDL is
Sorry, I should've linked.
What is the function that your libgcc 4.7.0 linked dlls are trying to load that isn't in libgcc 4.4.7?
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 ?)
Your pushing the limits of, or breaking ABI compatibility
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".)
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.
Is this for yourself, your company/employer, or CPAN quality?
It's for anyone who wants it.
Plenty of grammer and sentence mistakes above
Didn't spot any mistakes, except for the spelling of 'grammar' ;-)
I gave you alot of ideas. Sane and insane.
For which I thank you !!
Cheers, Rob | [reply] |
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.
| [reply] |