Seema Alevoor wrote: > >>>>>> >>>>> So, you are suggesting that we change >>>>> 1. the --cc option to include the essential build time CFLAGS >>>>> 2. retain apr-1-config's CFLAGS as EXTRA_CFLAGS (back out the >>>>> --cflags and --cppflags changes) >>>>> 3. no change to libtool flags , >>>>> right ? >>>> >>>> right >>>> >>>> This should bring us in alignment with a normal APR build. >>>> >>>> For CC, the only essential build time flag missing AFAICT is -m64. >>>> It is in CFLAGS for us because our build setup doesn't follow the >>>> recommended APR mechanism -- setting CC to "cc -m64" for 64-bit >>>> builds. >>>> >>> oops, I wasn't ready to press the "Send" button... >>> >>> Just to be sure about everything, I'll work on a few testcases for >>> using different outputs of the build to build a third-party app, try >>> them with two different APR builds (CC="cc -m64" vs. CFLAGS="-m64"), >>> report on the negative aspects of each one, and see where the "-m64" >>> ends up in both situations. >>> >>> (understanding that we won't actually change our build to use CC="cc >>> -m64" but are considering editing the build files to act like it) >> >> All tThe differences in APR and APR-Util install tree are: >> >> apr-1-config: >> >> -CC="cc" >> -CPP="cc -E" >> +CC="cc -m32" >> +CPP="cc -m32 -E" >> >> apr_rules.mk: >> >> -CC=cc >> +CC=cc -m32 >> >> -CFLAGS=all-the-extra-compilation-flags -m32 >> +CFLAGS=all-the-extra-compilation-flags >> >> libtool: >> >> -LTCC="cc" >> +LTCC="cc -m32" >> >> -LTCFLAGS="all-the-extra-compilation-flags -m32" >> +LTCFLAGS="all-the-extra-compilation-flags" >> >> # A language-specific compiler. >> -CC="cc" >> +CC="cc -m32" >> >> --/-- >> >> On the Apache side, config_vars.mk has the same settings for CC and >> CPP as apr-1-config. It has the CFLAGS settings like libtool too. >> >> --/-- >> >> It still comes down to deciding whether or not apr-1-config from >> OpenSolaris should include all the externally-defined CFLAGS/CPPFLAGS, > > Most of the existing applications/modules which use APR are passing > separate set of build time CFLAGS along with 'apr-1-config --cflags' > value (probaly because > they are aware that apr's flags doesn't include its build time flags). > So, passing build time CFLAGS to APR may cause duplication and may > also cause issues > depending on whether apr's flags are appended/prefixed to the > components CFLAGS > (e.g., optimization flag, some may not work with O4 level of > optimization). > > So, let me not include build time CFLAGS in apr-1-config. > >> unlike normal apr-1-config. If we patch in the -m32/-m64 in the four >> or five places above, we'll be consistent and still allow 64-bit >> compiles. The -m32/-m64 inside CFLAGS/LTCFLAGS in libtool and >> apr_rules.mk won't hurt anything. >> > Instead of patching these files, we can pass "-m32" for "CC" within > the Makefile. I thought there was a problem with redefining CC, but I must have misunderstood.
Cool!