We are currently preparing to release Firebird 2.0.7, since I take responsibility for the Mac builds, I did a 2.0.7 build on MacOSX 10.7 using the development tools installed by XCode 4.1 (gcc 4.2.1 etc). I set up the relevant environment variables for this older 32bit only build CFLAGS, CXXFLAGS, LD_FLAGS and also set the MACOSX_DEPLOYMENT_TARGET=10.4. The builds completed without any problems, some simple tests on MacOSX 10.7 showed no problems.
Now - Imagine my surprise when Philippe told me that when he tried to QA the builds on MacOSX 10.5 we got this error on SuperServer startup.
Process: fbserver 
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: fbguard 
Date/Time: 2012-02-09 09:42:13.939 +0100
OS Version: Mac OS X 10.5.8 (9L31a)
Report Version: 6
Anonymous UUID: FA7F8C0C-581B-4153-ADBE-2BCB59C5F823
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 0
Dyld Error Message:
Symbol not found: ___moddi3
Expected in: /usr/lib/libSystem.B.dylib
A simple nm and grep shows the following for the 10.5 libSystem.B.dylib
nm /usr/lib/libSystem.B.dylib | grep moddi3
00083490 t ___moddi3
0003df70 t ___umoddi3
On 10.5 ___moddi3 is defined in libgcc_s.1.dylib which links to libsystem.B.dylib
From what I can gather these *moddi3 symbols are routines for doing 64bit maths on 32bit systems.
However the same on 10.7 returns nothing, however the symbols can be found in libgcc_s.10.5.dylib which does not link to libgcc_s.1.dylib hence the missing symbols message.
Supposedly this can be fixed by linking explicity to to libgcc_s.10.5.dylib
using -lgcc_s.10.5. I got round it by booting up my copy of Snow Leopard (10.6) and
building Firebird 2.0.7 there instead of on MacOSX 10.7
So basically if you want to buld an application that is deployable on 10.5 or less, you can't - unless you know how to get around the above problem. Its as if although you can build 32bit applications for 32bit versions of MacOSX, they won't run, because they are incompatible with any version of the OS less than 10.6.