Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 110127

Summary: useless code for ppc-macos in glib ebuild
Product: Gentoo/Alt Reporter: Emanuele Giaquinta (RETIRED) <exg>
Component: Mac OSXAssignee: Gentoo for Mac OS X <ppc-macos>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: enables poll emulation also on tiger

Description Emanuele Giaquinta (RETIRED) gentoo-dev 2005-10-22 05:37:04 UTC
The glib ebuild includes this code:

	if use ppc-macos; then
		glibtoolize
		append-ldflags "-L/usr/lib -lpthread"
	fi

I can't understand the reason for this;

1) glibtoolize will do nothing unless called with "--force" or with elibtoolize,
but it is not needed, glib builds fine without (as you have already tested,
since that call is doing nothing)

2) posix threads functions on darwin are in libSystem, in fact libpthreads is a
symlink to it; as the pthreads man page says, no additional FLAGS are required,
since the binary will always be linked to libSystem; so I see no meaning in that
call to append-ldflags.

The only problem in glib configure regarding darwin is that it will set CPPFLAGS
and GTHREAD_CFLAGS to -pthreads, which is wrong since apple's gcc does not have
a pthread or pthreads option, for the reason above.  But it's a soft problem,
since gcc will not abort for an unrecognized option.  I have already sent
upstream a fix for this.
Comment 1 Fabian Groffen gentoo-dev 2005-10-22 05:40:25 UTC
Do you know of Panther has the same characteristics?  AFAIK Panther is less
POSIX than Tiger.
Comment 2 Emanuele Giaquinta (RETIRED) gentoo-dev 2005-10-22 05:44:29 UTC
Darwin 8 tries to be more strict in terms of POSIX compatibility, but regarding
this issue there is no difference between darwin 7 and 8 AFAIK.
Comment 3 Fabian Groffen gentoo-dev 2005-10-22 08:38:48 UTC
(After a lot of waiting for compilation on Panther just to make sure...)

removed the offending code in glib-2.8.3

Thanks for the report!
Comment 4 Emanuele Giaquinta (RETIRED) gentoo-dev 2005-10-22 09:36:13 UTC
Created attachment 71207 [details, diff]
enables poll emulation also on tiger
Comment 5 Fabian Groffen gentoo-dev 2005-10-22 10:49:20 UTC
Thanks again.  Done.