Hi, Yes, setting MACOSX_DEPLOYMENT_TARGET is a good idea, or else the resulting library *may* depend on system library symbols not available in releases prior to the one you compile on.
There's no need to split it into two commands though: CC='env MACOSX_DEPLOYMENT_TARGET=10.5 gcc' has served me well over the years. Another option might be to not support binary distribution, so the environment setting then becomes unnecessary, because the end user will presumably be compiling your module on the machine that will use it, and so compatibility with previous OS releases is not needed. Cheers, -- Gary V. Vaughan (gary AT vaughan DOT pe) > On 14 Sep 2015, at 07:31, Daurnimator <q...@daurnimator.com> wrote: > >> On 16 January 2015 at 07:52, Daurnimator <q...@daurnimator.com> wrote: >> Hi All, >> >> I'm not a OSX user, however, people using macs often try and use the >> libraries I write. >> So I'm not able to say the following with confidence: >> >> Currently luarocks uses a hack of defining CC="export >> MACOSX_DEPLOYMENT_TARGET=10.<version>; gcc" >> Where <version> maxes out at 5. >> https://github.com/keplerproject/luarocks/blob/master/src/luarocks/cfg.lua#L451 >> >> There are several problems with this: >> >> 1. Defining CC as multiple commands breaks shell scripts; it should be >> only set to a single command to run. >> A workaround for this issue alone is to instead use: "env >> MACOSX_DEPLOYMENT_TARGET=10.<version> gcc" >> >> 2. MACOSX_DEPLOYMENT_TARGET is needlessly limited to 10.5; Some >> features important features are only available in later targets. >> e.g. __thread support is only available for 10.7 and above. >> >> 3. MACOSX_DEPLOYMENT_TARGET isn't required in 10.5+ >> (according to Luiz, June 2012) >> >> >> I propose that we drop this CC/LD hack completely, >> and if someone wants to compile for an old osx version (pre 2007), >> they can take the 5 seconds to configure their variables manually. >> >> Is someone perhaps more versed in OSX compilation able to say if this >> is a good/bad idea? >> >> Daurn. > > bump? > > ------------------------------------------------------------------------------ > _______________________________________________ > Luarocks-developers mailing list > Luarocks-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/luarocks-developers ------------------------------------------------------------------------------ _______________________________________________ Luarocks-developers mailing list Luarocks-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/luarocks-developers