Discussion:
[omniORB] Setting compiler flags for omniORB
Stephen Hansen
2007-12-08 03:29:02 UTC
Permalink
Hi, all.
I'm trying to build omniORB on Mac OS X 10.5, so that it can be run on both
10.5 and 10.4. By default it seems that compiles only run on 10.5, and in
order to include support for 10.4 I need to pass the "-mmacosx-version-min=
10.4" compiler flag.

The problem is I can't seem to do it :) Setting the CFLAGS and CXXFLAGS
environment variables doesn't appear to do anything; the flags aren't
getting added onto the compiler's command lines.

Any idea how to set these flags?

Thanks in advance.

--Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20071207/7987dea0/attachment.htm
Floris Bruynooghe
2007-12-08 17:22:08 UTC
Permalink
Hello Stephen
Post by Stephen Hansen
The problem is I can't seem to do it :) Setting the CFLAGS and CXXFLAGS
environment variables doesn't appear to do anything; the flags aren't
getting added onto the compiler's command lines.
The easy way is doing:

$ CC="$my_cc $my_cflags" CXX="$my_CC $my_cxxflags" ./configure $my_opts

The hard way is editing mk/beforeauto.mk and looking for the lines:
...
# Default compiler rules
...
CDEBUGFLAGS = ...
...
CXXDEBUGFLAGS = ...

and adding your flags to there.


Personally I have the ambition of looking into CFLAGS some day I have
time and seeing if I can't produce a patch that makes the build system
honour it.

Regards
Floris
--
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org
Stephen Hansen
2007-12-09 02:57:13 UTC
Permalink
Post by Floris Bruynooghe
Hello Stephen
Post by Stephen Hansen
The problem is I can't seem to do it :) Setting the CFLAGS and CXXFLAGS
environment variables doesn't appear to do anything; the flags aren't
getting added onto the compiler's command lines.
$ CC="$my_cc $my_cflags" CXX="$my_CC $my_cxxflags" ./configure $my_opts
Wonderful! That works. I didn't think of hiding them in CC :)
Post by Floris Bruynooghe
Personally I have the ambition of looking into CFLAGS some day I have
time and seeing if I can't produce a patch that makes the build system
honour it.
I tried doing that myself. And failed horribly at groking omni's build
system.

I was heartbroken with the possibility that I might have to maintain
separate Mac OS X 10.5 and 10.4 installers for our mac customers to install
omniORB(py), for awhile there. You saved me! :) Thanks.

--Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20071208/5d2c21dd/attachment.htm
Loading...