Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote: >The OS X manpage for ld mentions a "-macosx_version_min" option, are >we correctly applying that one? I'm assuming it needs to match the >number used for __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ for >things to work out as intended.
Actually, it seems like cc is already adding that option when it invokes
ld depending on the value of the environment values of
MAC_OS_X_VERSION_MIN_REQUIRED and MACOSX_DEPLOYMENT_TARGET.
Anyone with access to macs, please run the attached mactest.sh file.
On my MacBook Leopard = 10.5 I get the following output:
Compiling: cc testmac.c -o testmac
recv(OOB) = -1, errno: 102 = Operation not supported on socket
<errno.h> EOPNOTSUPP = 102 = Operation not supported on socket
******************************* GOOD *************************
Compiling: MACOSX_DEPLOYMENT_TARGET=10.3 cc testmac.c -o testmac
recv(OOB) = -1, errno: 102 = Operation not supported on socket
<errno.h> EOPNOTSUPP = 45 = Operation not supported
*------------ BAD -------------*
Compiling: MACOSX_DEPLOYMENT_TARGET=10.4 cc testmac.c -o testmac
recv(OOB) = -1, errno: 102 = Operation not supported on socket
<errno.h> EOPNOTSUPP = 45 = Operation not supported
*------------ BAD -------------*
Compiling: MACOSX_DEPLOYMENT_TARGET=10.5 cc testmac.c -o testmac
recv(OOB) = -1, errno: 102 = Operation not supported on socket
<errno.h> EOPNOTSUPP = 102 = Operation not supported on socket
******************************* GOOD *************************
Compiling: MACOSX_DEPLOYMENT_TARGET=10.6 cc testmac.c -o testmac
recv(OOB) = -1, errno: 102 = Operation not supported on socket
<errno.h> EOPNOTSUPP = 102 = Operation not supported on socket
******************************* GOOD *************************
Compiling: MAC_OS_X_VERSION_MIN_REQUIRED=1030 cc testmac.c -o testmac
recv(OOB) = -1, errno: 102 = Operation not supported on socket
<errno.h> EOPNOTSUPP = 102 = Operation not supported on socket
******************************* GOOD *************************
Compiling: MAC_OS_X_VERSION_MIN_REQUIRED=1040 cc testmac.c -o testmac
recv(OOB) = -1, errno: 102 = Operation not supported on socket
<errno.h> EOPNOTSUPP = 102 = Operation not supported on socket
******************************* GOOD *************************
Compiling: MAC_OS_X_VERSION_MIN_REQUIRED=1050 cc testmac.c -o testmac
recv(OOB) = -1, errno: 102 = Operation not supported on socket
<errno.h> EOPNOTSUPP = 102 = Operation not supported on socket
******************************* GOOD *************************
Compiling: MAC_OS_X_VERSION_MIN_REQUIRED=1060 cc testmac.c -o testmac
recv(OOB) = -1, errno: 102 = Operation not supported on socket
<errno.h> EOPNOTSUPP = 102 = Operation not supported on socket
******************************* GOOD *************************
Compiling: cc testmac.c -o testmac
recv(OOB) = -1, errno: 102 = Operation not supported on socket
<errno.h> EOPNOTSUPP = 102 = Operation not supported on socket
******************************* GOOD *************************
Darwin odysseus.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01
PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
Which would seem to indicate that using MAC_OS_X_VERSION_MIN_REQUIRED=1030
is better than using the MACOSX_DEPLOYMENT_TARGET. This should be tested
against the behaviour with regard to the jpeg and tiff lib linking problems.
--
Sincerely,
Stephen R. van den Berg.
Flying is the second greatest feeling you can have. The greatest feeling?
Landing... Landing is the greatest feeling you can have.
testmac.sh
Description: Bourne shell script
