summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvs2hg <devnull@localhost>2006-02-28 21:37:49 +0000
committercvs2hg <devnull@localhost>2006-02-28 21:37:49 +0000
commit69c4626a5a0a61a10fe6b8a735a3800e873b2639 (patch)
tree166a1936ae3bfabac5102705da96d0a5b0298997
parenta9d71342d0cdc3a9c161f91ae1cd0fb561a7ec19 (diff)
downloadnss-hg-69c4626a5a0a61a10fe6b8a735a3800e873b2639.tar.gz
fixup commit for branch 'THREADS_20060307_BRANCH'THREADS_20060307_BASE
-rw-r--r--security/coreconf/Darwin.mk20
-rw-r--r--security/coreconf/OS2.mk4
2 files changed, 13 insertions, 11 deletions
diff --git a/security/coreconf/Darwin.mk b/security/coreconf/Darwin.mk
index 83f568bf3..fcb0a9ccb 100644
--- a/security/coreconf/Darwin.mk
+++ b/security/coreconf/Darwin.mk
@@ -43,12 +43,16 @@ CC = cc
CCC = c++
RANLIB = ranlib
-ifeq (86,$(findstring 86,$(OS_TEST)))
+ifndef CPU_ARCH
+# When cross-compiling, CPU_ARCH should already be defined as the target
+# architecture, set to powerpc or i386.
+CPU_ARCH := $(shell uname -p)
+endif
+
+ifeq (,$(filter-out i%86,$(CPU_ARCH)))
OS_REL_CFLAGS = -Di386
-CPU_ARCH = i386
else
OS_REL_CFLAGS = -Dppc
-CPU_ARCH = ppc
endif
ifneq (,$(MACOS_SDK_DIR))
@@ -65,7 +69,7 @@ ifneq (,$(MACOS_SDK_DIR))
endif
DARWIN_SDK_CFLAGS = -nostdinc -isystem $(MACOS_SDK_DIR)/usr/include/gcc/darwin/$(GCC_VERSION) -isystem $(MACOS_SDK_DIR)/usr/include $(DARWIN_SDK_FRAMEWORKS)
DARWIN_SDK_LDFLAGS = -L$(MACOS_SDK_DIR)/usr/lib/gcc/darwin -L$(MACOS_SDK_DIR)/usr/lib/gcc/darwin/$(GCC_VERSION_FULL) -L$(MACOS_SDK_DIR)/usr/lib
- DARWIN_SDK_DSOFLAGS = $(DARWIN_SDK_LDFLAGS) $(DARWIN_SDK_FRAMEWORKS)
+ DARWIN_SDK_SHLIBFLAGS = $(DARWIN_SDK_LDFLAGS) $(DARWIN_SDK_FRAMEWORKS)
NEXT_ROOT = $(MACOS_SDK_DIR)
export NEXT_ROOT
else
@@ -75,12 +79,12 @@ ifneq (,$(MACOS_SDK_DIR))
# gcc > 4.0.0 passes -syslibroot to ld based on -isysroot.
# Don't add -isysroot to DARWIN_SDK_LDFLAGS, because the programs
# that are linked with those flags also get DARWIN_SDK_CFLAGS.
- DARWIN_SDK_DSOFLAGS = -isysroot $(MACOS_SDK_DIR)
+ DARWIN_SDK_SHLIBFLAGS = -isysroot $(MACOS_SDK_DIR)
else
# gcc 4.0.0 doesn't pass -syslibroot to ld, it needs to be
# explicit.
DARWIN_SDK_LDFLAGS = -Wl,-syslibroot,$(MACOS_SDK_DIR)
- DARWIN_SDK_DSOFLAGS = $(DARWIN_SDK_LDFLAGS)
+ DARWIN_SDK_SHLIBFLAGS = $(DARWIN_SDK_LDFLAGS)
endif
endif
@@ -107,9 +111,9 @@ ARCH = darwin
DSO_CFLAGS = -fPIC
# May override this with -bundle to create a loadable module.
-DSO_LDOPTS = -dynamiclib -compatibility_version 1 -current_version 1 -install_name @executable_path/$(notdir $@) -headerpad_max_install_names $(DARWIN_SDK_DSOFLAGS)
+DSO_LDOPTS = -dynamiclib -compatibility_version 1 -current_version 1 -install_name @executable_path/$(notdir $@) -headerpad_max_install_names
-MKSHLIB = $(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS)
+MKSHLIB = $(CC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS)
DLL_SUFFIX = dylib
PROCESS_MAP_FILE = grep -v ';+' $< | grep -v ';-' | \
sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,_,' > $@
diff --git a/security/coreconf/OS2.mk b/security/coreconf/OS2.mk
index 575fd8b55..a5776937e 100644
--- a/security/coreconf/OS2.mk
+++ b/security/coreconf/OS2.mk
@@ -78,7 +78,7 @@ FILTER = emxexp -o
# GCC for OS/2 currently predefines these, but we don't want them
DEFINES += -Uunix -U__unix -U__unix__
-DEFINES += -DTCPV40HDRS
+DEFINES += -DXP_OS2_EMX -DTCPV40HDRS
ifndef NO_SHARED_LIB
WRAP_MALLOC_LIB =
@@ -240,8 +240,6 @@ else
endif
endif
-DEFINES += -DXP_OS2
-
define MAKE_OBJDIR
if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
endef