[m-dev.] diff: fix for SunOS4.x problem
Tyson Richard DOWD
trd at students.cs.mu.oz.au
Wed Oct 8 13:57:43 AEST 1997
Fergus Henderson wrote:
>
> Fix a problem that broke the SunOS 4.x port.
>
> configure.in:
> runtime/conf.h.in:
> For SunOS 4.x, define MR_BARFS_ON_ASM_TYPE_DIRECTIVE.
>
> runtime/goto.h:
> Use `.type' asm directives on sparcs only if
> MR_BARFS_ON_ASM_TYPE_DIRECTIVE is not defined.
>
It would be nice if the technical term for assembler missing a
feature wasn't "barf". But I can't think of a better one.
> +AC_MSG_CHECKING(whether the assembler barfs on .type)
> +AC_CACHE_VAL(mercury_cv_barfs_on_asm_type_directive, [
> + case "$host" in
> + *-sunos4.*)
> + mercury_cv_barfs_on_asm_type_directive=yes
> + ;;
> + *)
> + mercury_cv_barfs_on_asm_type_directive=no
> + ;;
> + esac
> +])
> +AC_MSG_RESULT($mercury_cv_barfs_on_asm_type_directive)
> +if test $mercury_cv_barfs_on_asm_type_directive = "yes"; then
> + AC_DEFINE(MR_BARFS_ON_ASM_TYPE_DIRECTIVE)
> +fi
This isn't a very constructive test -- is it possible to write a small
piece of C code with an embedded .type directive and check if it
will compile? Or is this test too system dependent?
(If this is too much trouble, don't worry about it).
> Index: runtime/goto.h
> ===================================================================
> RCS file: /home/staff/zs/imp/mercury/runtime/goto.h,v
> retrieving revision 1.32
> diff -u -r1.32 goto.h
> --- goto.h 1997/08/28 17:52:18 1.32
> +++ goto.h 1997/10/07 16:51:13
> @@ -248,8 +248,10 @@
> ** to get confused, and we end up jumping into the data section.
> ** Hence the `.type' directive below.
> */
> - #define INLINE_ASM_ENTRY_LABEL_TYPE(label) \
> + #ifndef MR_BARFS_ON_ASM_TYPE_DIRECTIVE
> + #define INLINE_ASM_ENTRY_LABEL_TYPE(label) \
> " .type _entry_" stringify(label) ",#function\n"
> + #endif
>
How is INLINE_ASM_ENTRY_LABEL_TYPE defined if MR_BARFS_ON_ASM_TYPE_DIRECTIVE
is defined? Is that somewhere else?
--
Tyson Dowd # Another great idea from the
# people who brought you
trd at .cs.mu.oz.au # Beer Milkshakes!
http://www.cs.mu.oz.au/~trd # Confidence --- Red Dwarf
More information about the developers
mailing list