openbsd-ports/lang/smlnj/patches/patch-src_runtime_include_asm-base_h

28 lines
1.0 KiB
Plaintext

$OpenBSD: patch-src_runtime_include_asm-base_h,v 1.4 2004/01/11 01:02:46 espie Exp $
--- src/runtime/include/asm-base.h.orig 1999-12-03 20:59:31.000000000 +0100
+++ src/runtime/include/asm-base.h 2004-01-11 01:58:50.000000000 +0100
@@ -16,7 +16,7 @@
#define FALSE 0
#define TRUE 1
-#if (!defined(GLOBALS_HAVE_UNDERSCORE)) && (defined(OPSYS_SUNOS) || defined(OPSYS_NEXTSTEP) || defined(OPSYS_WIN32))
+#if (!defined(GLOBALS_HAVE_UNDERSCORE)) && (defined(OPSYS_SUNOS) || defined(OPSYS_NEXTSTEP) || defined(OPSYS_WIN32)) || (defined(OPSYS_OPENBSD) && !defined(__ELF__))
# define GLOBALS_HAVE_UNDERSCORE
#endif
@@ -122,8 +122,12 @@
# define WORD(W) WORD32(W)
# else
# define GLOBAL(ID) .globl CSYM(ID)
-# define LABEL(ID) CONCAT(ID,:)
-# define IMMED(ID) CONCAT($,ID)
+# define LABEL(ID) ID:
+# if defined(__GNUC__) && __GNUC__ <= 2
+# define IMMED(ID) CONCAT($, ID)
+# else
+# define IMMED(ID) $ID
+# endif
# define ALIGN4 .align 2
# define WORD(W) .word W
# define TEXT .text