I've been playing around trying to port the portlib cod to run on Mac OS X 10.5. I've been futzing around with the assembly file in 'thread', specifically 'thrhelp.s' and 'thrspinlock.s'. I've been trying to find the lowest common denominator to work on Linux an OS X, but I've finally come to the conclusion that it's just not going to happen. Although most of the actual code - the implementations of the method are directly portable, the small stuff around it just doesn't work.
The main issue revolves around leading underscores being added to function names. Apparently, this isn't the default behaviour for Linux, but it is on OS X - even though I'm using gcc and gas in both case. As such, the function names in the assembly files need to be different based on the OS. I've tried fiddling with the '-fno-leading-underscores' flag, but this blows up other stuff and just seems to be a rat hole. At this point, I think it's time to give up on the os.family + os.arch separation and change to os.name + os.arch or something else? Any thoughts or suggestions on such a change? I'm curious how this stuff works on the other unix platforms, such as AIX and BSD. -Nathan