On 02/24/2010 02:42 AM, suzuki toshiya wrote:

> 
> POSSIBLE SOLUTION
> -----------------
> One of the solution would be the change of linker flag syntax
> to be inherited to libfreetype.la. If I change "-Wl,-framework,XXX"
> style to raw "-framework XXX", GNU libtool copies them to
> inherited linker flag of libfreetype.la, aslike:
> 
>   # Linker flags that can not go in dependency_libs.
>   inherited_linker_flags='  -framework CoreServices -framework 
> ApplicationServices'
> 
> # I wonder if framework dependency should be included in
> # dependency_libs or this.

It can't be included in dependency_libs, though the libtool that built
freetype may be new enough to handle -framework flags, the libtool that
is building something else might not be, and would break that
something's build when it reads libfreetype.la with -framework
CoreServices in dependency_libs.

We invented the whole inherited_linker_flags to work around this and a
similar problem with -pthreads on other platforms (which is broken on
e.g. solaris where Sun CC uses -mt and gcc uses -pthreads :/)

> 
> DISCUSSION
> ----------
> 
> A. "-framework" is not popular as the options for C compiler.

As far as I am aware all compilers on Mac OS X that do linking are able
to grok the -framework flag. So this is not an issue.

> 
> B. What should be fixed is GNU libtool, not library packages.
> 
> There would be an opinion: the current GNU libtool behaviour:
>  - "-framework XXX" is copied to .la file.
>  - "-Wl,-framework,XXX" is NOT copied to .la file.
> is inconsistent, if this inconsistency is the reason to
> change from "-Wl,-framework,XXX" to "-framework XXX",
> what should be fixed is primarily GNU libtool inconsistency,
> changing in the side of library package is not good idea.

If it is your package, and you know that you're going to use
libtool-2.2.x, then don't quote the -framework XXX flag with -Wl, and it
will get put into the .la file.

> 
> # Although I've not discussed with GNU libtool maintainers
> # about this issue, I don't hesitate to write a patch for
> # consistent behaviour.

Feel free to post a patch to libtool-patc...@gnu.org (please post a
patch against the current development version, which you can either
fetch from git or the daily snapshot, see
http://www.gnu.org/software/libtool for info on both. I believe there is
currently a test case for -framework flag handling, so if you do post a
patch, please also expand on the test case. I will review and commit the
patch if appropriate.

Peter


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to