On 29.3.11 20:21, Mark Mentovai wrote: > Wan-Teh and I discussed adding a new header to handle this problem, > security/nss/lib/freebl/blconfig.h, that could be #included as needed > where definitions of macros like NSS_X86 and NSS_USE_64 are > significant. This could be structured like > > #ifdef DARWIN > #ifdef __i386__ > #define NSS_X86 > #define NSS_X86_OR_X64 > #endif /* __i386__ */ > #ifdef __x86_64__ > #define NSS_X64 > #define NSS_X86_OR_X64 > #endif /* __x86_64__ */ > #ifdef __LP64__ > #define NSS_USE_64 > #endif /* __LP64__ */ > #endif /* DARWIN */ > > and definitions of these macros could be removed from security/nss/lib/ > freebl/Makefile when building for Darwin, along the lines of > > ifneq ($(OS_TARGET),Darwin) > ... > endif
Sounds good. security/nss/lib/jar is currently the other place which also depends on the NSS_X* macros, i.e. it should be a header file which can be used by files outside freebl, too. >> ("CPU_ARCH=dummy" is kind of a hack, currently - it's only purpose is to >> prevent coreconf from applying the x86 related settings in the ifeq... >> CPU_ARCH block. It will add -Dppc to the CC command, but this doesn't do >> any harm, I think. Note that the backslashes are required to protect the >> following blanks.) > > For my purposes, when I’m working with single-pass universal builds > and am expected to provide a CPU specification at some level that’s > too general to actually know the target CPU, I usually use “mac.” The command line I provided in my earlier message was just meant as a proof of concept - under the assumption that you use NSS trunk as-is (i.e., you can use it right now w/o touching any files in the tree). When adding support for universal binaries to Darwin.mk, we don't necessarily have to use CPU_ARCH to specify the options a universal build, I think. A separate option, let's say something like "NSS_OSX_MULTIARCH") could be used to specify the list of architectures to compile (and would be handled in Darwin.mk in the way proposed by Bayard). If specified, it would unset CPU_ARCH at the same time. Kaspar -- dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto