summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-07-13 14:10:34 +0000
committerIan Lynagh <igloo@earth.li>2010-07-13 14:10:34 +0000
commitd15229b75a07cf1092402f87950a1887c6429f3a (patch)
treeef7fba6dd0e221ecf97093996083f4252c647afc
parentdf1fecb95e3a0cf901184605da96dc8ae092b173 (diff)
downloadhaskell-d15229b75a07cf1092402f87950a1887c6429f3a.tar.gz
Change some TARGET tests to HOST tests in the RTS
Which was being used seemed to be random
-rw-r--r--rts/Adjustor.c2
-rw-r--r--rts/Linker.c10
-rw-r--r--rts/LinkerInternals.h2
-rw-r--r--rts/RetainerProfile.c4
-rw-r--r--rts/RtsDllMain.c4
-rw-r--r--rts/RtsDllMain.h2
-rw-r--r--rts/StgCRun.c2
-rw-r--r--rts/StgMiscClosures.cmm2
-rw-r--r--rts/ghc.mk2
-rw-r--r--rts/sm/Evac.h2
-rw-r--r--rts/sm/GCThread.h2
-rw-r--r--rts/sm/Scav.c2
12 files changed, 18 insertions, 18 deletions
diff --git a/rts/Adjustor.c b/rts/Adjustor.c
index 382f74a435..607c0b8abe 100644
--- a/rts/Adjustor.c
+++ b/rts/Adjustor.c
@@ -111,7 +111,7 @@ createAdjustor (int cconv,
arg_types[i] = char_to_ffi_type(typeString[i+1]);
}
switch (cconv) {
-#ifdef mingw32_TARGET_OS
+#ifdef mingw32_HOST_OS
case 0: /* stdcall */
abi = FFI_STDCALL;
break;
diff --git a/rts/Linker.c b/rts/Linker.c
index 718936ac5d..78bdc8f81b 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -457,7 +457,7 @@ typedef struct _RtsSymbolVal {
SymI_NeedsProto(closedir)
#endif
-#if defined(darwin_TARGET_OS) && HAVE_PRINTF_LDBLSTUB
+#if defined(darwin_HOST_OS) && HAVE_PRINTF_LDBLSTUB
#define RTS_DARWIN_ONLY_SYMBOLS \
SymI_NeedsProto(asprintf$LDBLStub) \
SymI_NeedsProto(err$LDBLStub) \
@@ -1004,7 +1004,7 @@ typedef struct _RtsSymbolVal {
/* entirely bogus claims about types of these symbols */
#define SymI_NeedsProto(vvv) extern void vvv(void);
-#if defined(__PIC__) && defined(mingw32_TARGET_OS)
+#if defined(__PIC__) && defined(mingw32_HOST_OS)
#define SymE_HasProto(vvv) SymE_HasProto(vvv);
#define SymE_NeedsProto(vvv) extern void _imp__ ## vvv (void);
#else
@@ -2017,7 +2017,7 @@ static SymbolExtra* makeSymbolExtra( ObjectCode* oc,
* PowerPC specifics (instruction cache flushing)
* ------------------------------------------------------------------------*/
-#ifdef powerpc_TARGET_ARCH
+#ifdef powerpc_HOST_ARCH
/*
ocFlushInstructionCache
@@ -4021,7 +4021,7 @@ static int ocVerifyImage_MachO(ObjectCode* oc)
char *image = (char*) oc->image;
struct mach_header *header = (struct mach_header*) image;
-#if x86_64_TARGET_ARCH || powerpc64_TARGET_ARCH
+#if x86_64_HOST_ARCH || powerpc64_HOST_ARCH
if(header->magic != MH_MAGIC_64)
return 0;
#else
@@ -4812,7 +4812,7 @@ static int machoGetMisalignment( FILE * f )
fread(&header, sizeof(header), 1, f);
rewind(f);
-#if x86_64_TARGET_ARCH || powerpc64_TARGET_ARCH
+#if x86_64_HOST_ARCH || powerpc64_HOST_ARCH
if(header.magic != MH_MAGIC_64)
return 0;
#else
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
index 8dc6441dde..8e151ec782 100644
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -50,7 +50,7 @@ typedef struct {
long mtctr_r12;
long bctr;
} jumpIsland;
-#elif x86_64_TARGET_ARCH
+#elif x86_64_HOST_ARCH
uint64_t addr;
uint8_t jumpIsland[6];
#endif
diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c
index 07a3db435b..e80a588e86 100644
--- a/rts/RetainerProfile.c
+++ b/rts/RetainerProfile.c
@@ -366,7 +366,7 @@ find_srt( stackPos *info )
bitmap = info->next.srt.srt_bitmap;
while (bitmap != 0) {
if ((bitmap & 1) != 0) {
-#if defined(__PIC__) && defined(mingw32_TARGET_OS)
+#if defined(__PIC__) && defined(mingw32_HOST_OS)
if ((unsigned long)(*(info->next.srt.srt)) & 0x1)
c = (* (StgClosure **)((unsigned long)*(info->next.srt.srt)) & ~0x1);
else
@@ -1229,7 +1229,7 @@ retainSRT (StgClosure **srt, nat srt_bitmap, StgClosure *c, retainer c_child_r)
while (bitmap != 0) {
if ((bitmap & 1) != 0) {
-#if defined(__PIC__) && defined(mingw32_TARGET_OS)
+#if defined(__PIC__) && defined(mingw32_HOST_OS)
if ( (unsigned long)(*srt) & 0x1 ) {
retainClosure(* (StgClosure**) ((unsigned long) (*srt) & ~0x1),
c, c_child_r);
diff --git a/rts/RtsDllMain.c b/rts/RtsDllMain.c
index 592eb09d26..2081e621a9 100644
--- a/rts/RtsDllMain.c
+++ b/rts/RtsDllMain.c
@@ -16,7 +16,7 @@
#endif
/* I'd be mildly surprised if this wasn't defined, but still. */
-#if defined(__PIC__) && defined(mingw32_TARGET_OS)
+#if defined(__PIC__) && defined(mingw32_HOST_OS)
BOOL
WINAPI
DllMain ( HINSTANCE hInstance STG_UNUSED
@@ -40,4 +40,4 @@ DllMain ( HINSTANCE hInstance STG_UNUSED
return TRUE;
}
-#endif /* defined(__PIC__) && defined(mingw32_TARGET_OS) */
+#endif /* defined(__PIC__) && defined(mingw32_HOST_OS) */
diff --git a/rts/RtsDllMain.h b/rts/RtsDllMain.h
index df5fde9c12..fc28d90f25 100644
--- a/rts/RtsDllMain.h
+++ b/rts/RtsDllMain.h
@@ -6,7 +6,7 @@
#endif
/* I'd be mildly surprised if this wasn't defined, but still. */
-#if defined(__PIC__) && defined(mingw32_TARGET_OS)
+#if defined(__PIC__) && defined(mingw32_HOST_OS)
BOOL
WINAPI
DllMain ( HINSTANCE hInstance
diff --git a/rts/StgCRun.c b/rts/StgCRun.c
index 92ce6ebb19..e28353c353 100644
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -122,7 +122,7 @@ StgFunPtr StgReturn(void)
#ifdef i386_HOST_ARCH
-#ifdef darwin_TARGET_OS
+#ifdef darwin_HOST_OS
#define STG_GLOBAL ".globl "
#else
#define STG_GLOBAL ".global "
diff --git a/rts/StgMiscClosures.cmm b/rts/StgMiscClosures.cmm
index c665749632..c981cbec18 100644
--- a/rts/StgMiscClosures.cmm
+++ b/rts/StgMiscClosures.cmm
@@ -546,7 +546,7 @@ INFO_TABLE_CONSTR(stg_MVAR_TSO_QUEUE,2,0,0,PRIM,"MVAR_TSO_QUEUE","MVAR_TSO_QUEUE
replace them with references to the static objects.
------------------------------------------------------------------------- */
-#if defined(__PIC__) && defined(mingw32_TARGET_OS)
+#if defined(__PIC__) && defined(mingw32_HOST_OS)
/*
* When sticking the RTS in a Windows DLL, we delay populating the
* Charlike and Intlike tables until load-time, which is only
diff --git a/rts/ghc.mk b/rts/ghc.mk
index 7815e77e2e..7d475a3366 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -172,7 +172,7 @@ $$(rts_$1_LIB) : $$(rts_$1_OBJS) rts/libs.depend
"$$(RM)" $$(RM_OPTS) $$@
"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
-no-auto-link-packages `cat rts/libs.depend` $$(rts_$1_OBJS) -o $$@
-ifeq "$$(darwin_TARGET_OS)" "1"
+ifeq "$$(darwin_HOST_OS)" "1"
# Ensure library's install name is correct before anyone links with it.
install_name_tool -id $(ghclibdir)/$$(rts_$1_LIB_NAME) $$@
endif
diff --git a/rts/sm/Evac.h b/rts/sm/Evac.h
index c95658a1bf..ad56c644d8 100644
--- a/rts/sm/Evac.h
+++ b/rts/sm/Evac.h
@@ -26,7 +26,7 @@
// registers EAX, EDX, and ECX instead of on the stack. Functions that
// take a variable number of arguments will continue to be passed all of
// their arguments on the stack.
-#if __GNUC__ >= 2 && (defined(x86_64_TARGET_ARCH) || defined(i386_TARGET_ARCH))
+#if __GNUC__ >= 2 && (defined(x86_64_HOST_ARCH) || defined(i386_HOST_ARCH))
#define REGPARM1 __attribute__((regparm(1)))
#else
#define REGPARM1
diff --git a/rts/sm/GCThread.h b/rts/sm/GCThread.h
index 65554c47c4..c45eb1bdec 100644
--- a/rts/sm/GCThread.h
+++ b/rts/sm/GCThread.h
@@ -226,7 +226,7 @@ extern __thread gc_thread* gct;
#define DECLARE_GCT __thread gc_thread* gct;
-#elif defined(sparc_TARGET_ARCH)
+#elif defined(sparc_HOST_ARCH)
// On SPARC we can't pin gct to a register. Names like %l1 are just offsets
// into the register window, which change on each function call.
//
diff --git a/rts/sm/Scav.c b/rts/sm/Scav.c
index 54bf47cb27..e59fc754f3 100644
--- a/rts/sm/Scav.c
+++ b/rts/sm/Scav.c
@@ -329,7 +329,7 @@ scavenge_srt (StgClosure **srt, nat srt_bitmap)
while (bitmap != 0) {
if ((bitmap & 1) != 0) {
-#if defined(__PIC__) && defined(mingw32_TARGET_OS)
+#if defined(__PIC__) && defined(mingw32_HOST_OS)
// Special-case to handle references to closures hiding out in DLLs, since
// double indirections required to get at those. The code generator knows
// which is which when generating the SRT, so it stores the (indirect)