unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Trouble with guile-snarf and clang-3.4's preprocessor
@ 2014-03-05  8:59 Mark H Weaver
  2014-03-06 22:52 ` Mark H Weaver
  2014-03-10 13:20 ` Ludovic Courtès
  0 siblings, 2 replies; 3+ messages in thread
From: Mark H Weaver @ 2014-03-05  8:59 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 2014 bytes --]

Hello all,

clang 3.4 is unable to successfully compile Guile 1.8, 2.0, or master.
In all cases, Guile segfaults on its first execution, while trying to
generate guile-procedures.texi.

The reason is that clang 3.4's C preprocessor introduces a lot of extra
newlines in surprising places.  Our snarfing macros are unable to cope
with this, and lots of initialization code is lost.

For example, ports.c contains:

  SCM_VARIABLE (default_conversion_strategy_var,
                "%default-port-conversion-strategy");

Here's the definition of SCM_VARIABLE from snarf.h:

--8<---------------cut here---------------start------------->8---
#define SCM_VARIABLE(c_name, scheme_name) \
SCM_SNARF_HERE(static SCM c_name) \
SCM_SNARF_INIT(c_name = scm_c_define (scheme_name, SCM_BOOL_F);)
--8<---------------cut here---------------end--------------->8---

When guile-snarf is run to generate ports.x, SCM_MAGIC_SNARF_INITS is
defined, so the following definitions are active:

--8<---------------cut here---------------start------------->8---
# define SCM_SNARF_HERE(X)
# define SCM_SNARF_INIT_PREFIX ^^
# define SCM_SNARF_INIT(X) SCM_SNARF_INIT_PREFIX X ^:^
# define SCM_SNARF_DOCS(TYPE, CNAME, FNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING)
--8<---------------cut here---------------end--------------->8---

So you might expect the definition of 'default_conversion_strategy_var'
in ports.c to expand into something like this:

--8<---------------cut here---------------start------------->8---
^^ default_conversion_strategy_var = scm_c_define ("%default-port-conversion-strategy", SCM_BOOL_F); ^:^
--8<---------------cut here---------------end--------------->8---

However, clang -E inserts 6 newlines between the open paren and the open
quote above.  Unfortunately, afaict, the 'sed' script in the
'modern_snarf' function in 'guile-snarf' cannot cope with any newlines
between the "^^" and "^:^".

I've attached a diff between the .x files generated by gcc vs clang.

Any suggestions on how best to fix this?

     Mark



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Diff between .x files generated by gcc vs clang 3.4 --]
[-- Type: text/x-patch, Size: 42715 bytes --]

diff -I '^/' -ru gcc/bytevectors.x clang/bytevectors.x
--- gcc/bytevectors.x	2014-03-03 17:25:16.927978515 -0500
+++ clang/bytevectors.x	2014-03-05 03:13:01.655273437 -0500
@@ -18,7 +18,6 @@
 scm_bytevector_copy__name = scm_string_to_symbol (scm_bytevector_copy__name_string);
 scm_bytevector_copy__raw_objtable[2] = scm_bytevector_copy__subr_foreign; scm_bytevector_copy__raw_objtable[3] = scm_bytevector_copy__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_copy__subr))): (scm_bytevector_copy__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 0, 0))))); scm_define (scm_bytevector_copy__name, scm_bytevector_copy__subr);;
 scm_uniform_array_to_bytevector__name = scm_string_to_symbol (scm_uniform_array_to_bytevector__name_string);
-scm_uniform_array_to_bytevector__raw_objtable[2] = scm_uniform_array_to_bytevector__subr_foreign; scm_uniform_array_to_bytevector__raw_objtable[3] = scm_uniform_array_to_bytevector__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_uniform_array_to_bytevector__subr))): (scm_uniform_array_to_bytevector__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 0, 0))))); scm_define (scm_uniform_array_to_bytevector__name, scm_uniform_array_to_bytevector__subr);;
 scm_bytevector_u8_ref__name = scm_string_to_symbol (scm_bytevector_u8_ref__name_string);
 scm_bytevector_u8_ref__raw_objtable[2] = scm_bytevector_u8_ref__subr_foreign; scm_bytevector_u8_ref__raw_objtable[3] = scm_bytevector_u8_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_u8_ref__subr))): (scm_bytevector_u8_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (2, 0, 0))))); scm_define (scm_bytevector_u8_ref__name, scm_bytevector_u8_ref__subr);;
 scm_bytevector_s8_ref__name = scm_string_to_symbol (scm_bytevector_s8_ref__name_string);
@@ -40,86 +39,44 @@
 scm_bytevector_sint_set_x__name = scm_string_to_symbol (scm_bytevector_sint_set_x__name_string);
 scm_bytevector_sint_set_x__raw_objtable[2] = scm_bytevector_sint_set_x__subr_foreign; scm_bytevector_sint_set_x__raw_objtable[3] = scm_bytevector_sint_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_sint_set_x__subr))): (scm_bytevector_sint_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (5, 0, 0))))); scm_define (scm_bytevector_sint_set_x__name, scm_bytevector_sint_set_x__subr);;
 scm_bytevector_to_sint_list__name = scm_string_to_symbol (scm_bytevector_to_sint_list__name_string);
-scm_bytevector_to_sint_list__raw_objtable[2] = scm_bytevector_to_sint_list__subr_foreign; scm_bytevector_to_sint_list__raw_objtable[3] = scm_bytevector_to_sint_list__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_to_sint_list__subr))): (scm_bytevector_to_sint_list__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_to_sint_list__name, scm_bytevector_to_sint_list__subr);;
 scm_bytevector_to_uint_list__name = scm_string_to_symbol (scm_bytevector_to_uint_list__name_string);
-scm_bytevector_to_uint_list__raw_objtable[2] = scm_bytevector_to_uint_list__subr_foreign; scm_bytevector_to_uint_list__raw_objtable[3] = scm_bytevector_to_uint_list__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_to_uint_list__subr))): (scm_bytevector_to_uint_list__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_to_uint_list__name, scm_bytevector_to_uint_list__subr);;
 scm_uint_list_to_bytevector__name = scm_string_to_symbol (scm_uint_list_to_bytevector__name_string);
-scm_uint_list_to_bytevector__raw_objtable[2] = scm_uint_list_to_bytevector__subr_foreign; scm_uint_list_to_bytevector__raw_objtable[3] = scm_uint_list_to_bytevector__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_uint_list_to_bytevector__subr))): (scm_uint_list_to_bytevector__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_uint_list_to_bytevector__name, scm_uint_list_to_bytevector__subr);;
 scm_sint_list_to_bytevector__name = scm_string_to_symbol (scm_sint_list_to_bytevector__name_string);
-scm_sint_list_to_bytevector__raw_objtable[2] = scm_sint_list_to_bytevector__subr_foreign; scm_sint_list_to_bytevector__raw_objtable[3] = scm_sint_list_to_bytevector__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_sint_list_to_bytevector__subr))): (scm_sint_list_to_bytevector__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_sint_list_to_bytevector__name, scm_sint_list_to_bytevector__subr);;
 scm_bytevector_u16_ref__name = scm_string_to_symbol (scm_bytevector_u16_ref__name_string);
-scm_bytevector_u16_ref__raw_objtable[2] = scm_bytevector_u16_ref__subr_foreign; scm_bytevector_u16_ref__raw_objtable[3] = scm_bytevector_u16_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_u16_ref__subr))): (scm_bytevector_u16_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_u16_ref__name, scm_bytevector_u16_ref__subr);;
 scm_bytevector_s16_ref__name = scm_string_to_symbol (scm_bytevector_s16_ref__name_string);
-scm_bytevector_s16_ref__raw_objtable[2] = scm_bytevector_s16_ref__subr_foreign; scm_bytevector_s16_ref__raw_objtable[3] = scm_bytevector_s16_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_s16_ref__subr))): (scm_bytevector_s16_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_s16_ref__name, scm_bytevector_s16_ref__subr);;
 scm_bytevector_u16_native_ref__name = scm_string_to_symbol (scm_bytevector_u16_native_ref__name_string);
-scm_bytevector_u16_native_ref__raw_objtable[2] = scm_bytevector_u16_native_ref__subr_foreign; scm_bytevector_u16_native_ref__raw_objtable[3] = scm_bytevector_u16_native_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_u16_native_ref__subr))): (scm_bytevector_u16_native_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (2, 0, 0))))); scm_define (scm_bytevector_u16_native_ref__name, scm_bytevector_u16_native_ref__subr);;
 scm_bytevector_s16_native_ref__name = scm_string_to_symbol (scm_bytevector_s16_native_ref__name_string);
-scm_bytevector_s16_native_ref__raw_objtable[2] = scm_bytevector_s16_native_ref__subr_foreign; scm_bytevector_s16_native_ref__raw_objtable[3] = scm_bytevector_s16_native_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_s16_native_ref__subr))): (scm_bytevector_s16_native_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (2, 0, 0))))); scm_define (scm_bytevector_s16_native_ref__name, scm_bytevector_s16_native_ref__subr);;
 scm_bytevector_u16_set_x__name = scm_string_to_symbol (scm_bytevector_u16_set_x__name_string);
-scm_bytevector_u16_set_x__raw_objtable[2] = scm_bytevector_u16_set_x__subr_foreign; scm_bytevector_u16_set_x__raw_objtable[3] = scm_bytevector_u16_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_u16_set_x__subr))): (scm_bytevector_u16_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (4, 0, 0))))); scm_define (scm_bytevector_u16_set_x__name, scm_bytevector_u16_set_x__subr);;
 scm_bytevector_s16_set_x__name = scm_string_to_symbol (scm_bytevector_s16_set_x__name_string);
-scm_bytevector_s16_set_x__raw_objtable[2] = scm_bytevector_s16_set_x__subr_foreign; scm_bytevector_s16_set_x__raw_objtable[3] = scm_bytevector_s16_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_s16_set_x__subr))): (scm_bytevector_s16_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (4, 0, 0))))); scm_define (scm_bytevector_s16_set_x__name, scm_bytevector_s16_set_x__subr);;
 scm_bytevector_u16_native_set_x__name = scm_string_to_symbol (scm_bytevector_u16_native_set_x__name_string);
-scm_bytevector_u16_native_set_x__raw_objtable[2] = scm_bytevector_u16_native_set_x__subr_foreign; scm_bytevector_u16_native_set_x__raw_objtable[3] = scm_bytevector_u16_native_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_u16_native_set_x__subr))): (scm_bytevector_u16_native_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_u16_native_set_x__name, scm_bytevector_u16_native_set_x__subr);;
 scm_bytevector_s16_native_set_x__name = scm_string_to_symbol (scm_bytevector_s16_native_set_x__name_string);
-scm_bytevector_s16_native_set_x__raw_objtable[2] = scm_bytevector_s16_native_set_x__subr_foreign; scm_bytevector_s16_native_set_x__raw_objtable[3] = scm_bytevector_s16_native_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_s16_native_set_x__subr))): (scm_bytevector_s16_native_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_s16_native_set_x__name, scm_bytevector_s16_native_set_x__subr);;
 scm_bytevector_u32_ref__name = scm_string_to_symbol (scm_bytevector_u32_ref__name_string);
-scm_bytevector_u32_ref__raw_objtable[2] = scm_bytevector_u32_ref__subr_foreign; scm_bytevector_u32_ref__raw_objtable[3] = scm_bytevector_u32_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_u32_ref__subr))): (scm_bytevector_u32_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_u32_ref__name, scm_bytevector_u32_ref__subr);;
 scm_bytevector_s32_ref__name = scm_string_to_symbol (scm_bytevector_s32_ref__name_string);
-scm_bytevector_s32_ref__raw_objtable[2] = scm_bytevector_s32_ref__subr_foreign; scm_bytevector_s32_ref__raw_objtable[3] = scm_bytevector_s32_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_s32_ref__subr))): (scm_bytevector_s32_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_s32_ref__name, scm_bytevector_s32_ref__subr);;
 scm_bytevector_u32_native_ref__name = scm_string_to_symbol (scm_bytevector_u32_native_ref__name_string);
-scm_bytevector_u32_native_ref__raw_objtable[2] = scm_bytevector_u32_native_ref__subr_foreign; scm_bytevector_u32_native_ref__raw_objtable[3] = scm_bytevector_u32_native_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_u32_native_ref__subr))): (scm_bytevector_u32_native_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (2, 0, 0))))); scm_define (scm_bytevector_u32_native_ref__name, scm_bytevector_u32_native_ref__subr);;
 scm_bytevector_s32_native_ref__name = scm_string_to_symbol (scm_bytevector_s32_native_ref__name_string);
-scm_bytevector_s32_native_ref__raw_objtable[2] = scm_bytevector_s32_native_ref__subr_foreign; scm_bytevector_s32_native_ref__raw_objtable[3] = scm_bytevector_s32_native_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_s32_native_ref__subr))): (scm_bytevector_s32_native_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (2, 0, 0))))); scm_define (scm_bytevector_s32_native_ref__name, scm_bytevector_s32_native_ref__subr);;
 scm_bytevector_u32_set_x__name = scm_string_to_symbol (scm_bytevector_u32_set_x__name_string);
-scm_bytevector_u32_set_x__raw_objtable[2] = scm_bytevector_u32_set_x__subr_foreign; scm_bytevector_u32_set_x__raw_objtable[3] = scm_bytevector_u32_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_u32_set_x__subr))): (scm_bytevector_u32_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (4, 0, 0))))); scm_define (scm_bytevector_u32_set_x__name, scm_bytevector_u32_set_x__subr);;
 scm_bytevector_s32_set_x__name = scm_string_to_symbol (scm_bytevector_s32_set_x__name_string);
-scm_bytevector_s32_set_x__raw_objtable[2] = scm_bytevector_s32_set_x__subr_foreign; scm_bytevector_s32_set_x__raw_objtable[3] = scm_bytevector_s32_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_s32_set_x__subr))): (scm_bytevector_s32_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (4, 0, 0))))); scm_define (scm_bytevector_s32_set_x__name, scm_bytevector_s32_set_x__subr);;
 scm_bytevector_u32_native_set_x__name = scm_string_to_symbol (scm_bytevector_u32_native_set_x__name_string);
-scm_bytevector_u32_native_set_x__raw_objtable[2] = scm_bytevector_u32_native_set_x__subr_foreign; scm_bytevector_u32_native_set_x__raw_objtable[3] = scm_bytevector_u32_native_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_u32_native_set_x__subr))): (scm_bytevector_u32_native_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_u32_native_set_x__name, scm_bytevector_u32_native_set_x__subr);;
 scm_bytevector_s32_native_set_x__name = scm_string_to_symbol (scm_bytevector_s32_native_set_x__name_string);
-scm_bytevector_s32_native_set_x__raw_objtable[2] = scm_bytevector_s32_native_set_x__subr_foreign; scm_bytevector_s32_native_set_x__raw_objtable[3] = scm_bytevector_s32_native_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_s32_native_set_x__subr))): (scm_bytevector_s32_native_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_s32_native_set_x__name, scm_bytevector_s32_native_set_x__subr);;
 scm_bytevector_u64_ref__name = scm_string_to_symbol (scm_bytevector_u64_ref__name_string);
-scm_bytevector_u64_ref__raw_objtable[2] = scm_bytevector_u64_ref__subr_foreign; scm_bytevector_u64_ref__raw_objtable[3] = scm_bytevector_u64_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_u64_ref__subr))): (scm_bytevector_u64_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_u64_ref__name, scm_bytevector_u64_ref__subr);;
 scm_bytevector_s64_ref__name = scm_string_to_symbol (scm_bytevector_s64_ref__name_string);
-scm_bytevector_s64_ref__raw_objtable[2] = scm_bytevector_s64_ref__subr_foreign; scm_bytevector_s64_ref__raw_objtable[3] = scm_bytevector_s64_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_s64_ref__subr))): (scm_bytevector_s64_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_s64_ref__name, scm_bytevector_s64_ref__subr);;
 scm_bytevector_u64_native_ref__name = scm_string_to_symbol (scm_bytevector_u64_native_ref__name_string);
-scm_bytevector_u64_native_ref__raw_objtable[2] = scm_bytevector_u64_native_ref__subr_foreign; scm_bytevector_u64_native_ref__raw_objtable[3] = scm_bytevector_u64_native_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_u64_native_ref__subr))): (scm_bytevector_u64_native_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (2, 0, 0))))); scm_define (scm_bytevector_u64_native_ref__name, scm_bytevector_u64_native_ref__subr);;
 scm_bytevector_s64_native_ref__name = scm_string_to_symbol (scm_bytevector_s64_native_ref__name_string);
-scm_bytevector_s64_native_ref__raw_objtable[2] = scm_bytevector_s64_native_ref__subr_foreign; scm_bytevector_s64_native_ref__raw_objtable[3] = scm_bytevector_s64_native_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_s64_native_ref__subr))): (scm_bytevector_s64_native_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (2, 0, 0))))); scm_define (scm_bytevector_s64_native_ref__name, scm_bytevector_s64_native_ref__subr);;
 scm_bytevector_u64_set_x__name = scm_string_to_symbol (scm_bytevector_u64_set_x__name_string);
-scm_bytevector_u64_set_x__raw_objtable[2] = scm_bytevector_u64_set_x__subr_foreign; scm_bytevector_u64_set_x__raw_objtable[3] = scm_bytevector_u64_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_u64_set_x__subr))): (scm_bytevector_u64_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (4, 0, 0))))); scm_define (scm_bytevector_u64_set_x__name, scm_bytevector_u64_set_x__subr);;
 scm_bytevector_s64_set_x__name = scm_string_to_symbol (scm_bytevector_s64_set_x__name_string);
-scm_bytevector_s64_set_x__raw_objtable[2] = scm_bytevector_s64_set_x__subr_foreign; scm_bytevector_s64_set_x__raw_objtable[3] = scm_bytevector_s64_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_s64_set_x__subr))): (scm_bytevector_s64_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (4, 0, 0))))); scm_define (scm_bytevector_s64_set_x__name, scm_bytevector_s64_set_x__subr);;
 scm_bytevector_u64_native_set_x__name = scm_string_to_symbol (scm_bytevector_u64_native_set_x__name_string);
-scm_bytevector_u64_native_set_x__raw_objtable[2] = scm_bytevector_u64_native_set_x__subr_foreign; scm_bytevector_u64_native_set_x__raw_objtable[3] = scm_bytevector_u64_native_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_u64_native_set_x__subr))): (scm_bytevector_u64_native_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_u64_native_set_x__name, scm_bytevector_u64_native_set_x__subr);;
 scm_bytevector_s64_native_set_x__name = scm_string_to_symbol (scm_bytevector_s64_native_set_x__name_string);
-scm_bytevector_s64_native_set_x__raw_objtable[2] = scm_bytevector_s64_native_set_x__subr_foreign; scm_bytevector_s64_native_set_x__raw_objtable[3] = scm_bytevector_s64_native_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_s64_native_set_x__subr))): (scm_bytevector_s64_native_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_s64_native_set_x__name, scm_bytevector_s64_native_set_x__subr);;
 scm_bytevector_ieee_single_ref__name = scm_string_to_symbol (scm_bytevector_ieee_single_ref__name_string);
-scm_bytevector_ieee_single_ref__raw_objtable[2] = scm_bytevector_ieee_single_ref__subr_foreign; scm_bytevector_ieee_single_ref__raw_objtable[3] = scm_bytevector_ieee_single_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_ieee_single_ref__subr))): (scm_bytevector_ieee_single_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_ieee_single_ref__name, scm_bytevector_ieee_single_ref__subr);;
 scm_bytevector_ieee_single_native_ref__name = scm_string_to_symbol (scm_bytevector_ieee_single_native_ref__name_string);
-scm_bytevector_ieee_single_native_ref__raw_objtable[2] = scm_bytevector_ieee_single_native_ref__subr_foreign; scm_bytevector_ieee_single_native_ref__raw_objtable[3] = scm_bytevector_ieee_single_native_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_ieee_single_native_ref__subr))): (scm_bytevector_ieee_single_native_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (2, 0, 0))))); scm_define (scm_bytevector_ieee_single_native_ref__name, scm_bytevector_ieee_single_native_ref__subr);;
 scm_bytevector_ieee_single_set_x__name = scm_string_to_symbol (scm_bytevector_ieee_single_set_x__name_string);
-scm_bytevector_ieee_single_set_x__raw_objtable[2] = scm_bytevector_ieee_single_set_x__subr_foreign; scm_bytevector_ieee_single_set_x__raw_objtable[3] = scm_bytevector_ieee_single_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_ieee_single_set_x__subr))): (scm_bytevector_ieee_single_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (4, 0, 0))))); scm_define (scm_bytevector_ieee_single_set_x__name, scm_bytevector_ieee_single_set_x__subr);;
 scm_bytevector_ieee_single_native_set_x__name = scm_string_to_symbol (scm_bytevector_ieee_single_native_set_x__name_string);
-scm_bytevector_ieee_single_native_set_x__raw_objtable[2] = scm_bytevector_ieee_single_native_set_x__subr_foreign; scm_bytevector_ieee_single_native_set_x__raw_objtable[3] = scm_bytevector_ieee_single_native_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_ieee_single_native_set_x__subr))): (scm_bytevector_ieee_single_native_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_ieee_single_native_set_x__name, scm_bytevector_ieee_single_native_set_x__subr);;
 scm_bytevector_ieee_double_ref__name = scm_string_to_symbol (scm_bytevector_ieee_double_ref__name_string);
-scm_bytevector_ieee_double_ref__raw_objtable[2] = scm_bytevector_ieee_double_ref__subr_foreign; scm_bytevector_ieee_double_ref__raw_objtable[3] = scm_bytevector_ieee_double_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_ieee_double_ref__subr))): (scm_bytevector_ieee_double_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_ieee_double_ref__name, scm_bytevector_ieee_double_ref__subr);;
 scm_bytevector_ieee_double_native_ref__name = scm_string_to_symbol (scm_bytevector_ieee_double_native_ref__name_string);
-scm_bytevector_ieee_double_native_ref__raw_objtable[2] = scm_bytevector_ieee_double_native_ref__subr_foreign; scm_bytevector_ieee_double_native_ref__raw_objtable[3] = scm_bytevector_ieee_double_native_ref__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_ieee_double_native_ref__subr))): (scm_bytevector_ieee_double_native_ref__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (2, 0, 0))))); scm_define (scm_bytevector_ieee_double_native_ref__name, scm_bytevector_ieee_double_native_ref__subr);;
 scm_bytevector_ieee_double_set_x__name = scm_string_to_symbol (scm_bytevector_ieee_double_set_x__name_string);
-scm_bytevector_ieee_double_set_x__raw_objtable[2] = scm_bytevector_ieee_double_set_x__subr_foreign; scm_bytevector_ieee_double_set_x__raw_objtable[3] = scm_bytevector_ieee_double_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_ieee_double_set_x__subr))): (scm_bytevector_ieee_double_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (4, 0, 0))))); scm_define (scm_bytevector_ieee_double_set_x__name, scm_bytevector_ieee_double_set_x__subr);;
 scm_bytevector_ieee_double_native_set_x__name = scm_string_to_symbol (scm_bytevector_ieee_double_native_set_x__name_string);
-scm_bytevector_ieee_double_native_set_x__raw_objtable[2] = scm_bytevector_ieee_double_native_set_x__subr_foreign; scm_bytevector_ieee_double_native_set_x__raw_objtable[3] = scm_bytevector_ieee_double_native_set_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_bytevector_ieee_double_native_set_x__subr))): (scm_bytevector_ieee_double_native_set_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (3, 0, 0))))); scm_define (scm_bytevector_ieee_double_native_set_x__name, scm_bytevector_ieee_double_native_set_x__subr);;
 scm_string_to_utf8__name = scm_string_to_symbol (scm_string_to_utf8__name_string);
-scm_string_to_utf8__raw_objtable[2] = scm_string_to_utf8__subr_foreign; scm_string_to_utf8__raw_objtable[3] = scm_string_to_utf8__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_string_to_utf8__subr))): (scm_string_to_utf8__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 0, 0))))); scm_define (scm_string_to_utf8__name, scm_string_to_utf8__subr);;
 scm_string_to_utf16__name = scm_string_to_symbol (scm_string_to_utf16__name_string);
-scm_string_to_utf16__raw_objtable[2] = scm_string_to_utf16__subr_foreign; scm_string_to_utf16__raw_objtable[3] = scm_string_to_utf16__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_string_to_utf16__subr))): (scm_string_to_utf16__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 1, 0))))); scm_define (scm_string_to_utf16__name, scm_string_to_utf16__subr);;
 scm_string_to_utf32__name = scm_string_to_symbol (scm_string_to_utf32__name_string);
-scm_string_to_utf32__raw_objtable[2] = scm_string_to_utf32__subr_foreign; scm_string_to_utf32__raw_objtable[3] = scm_string_to_utf32__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_string_to_utf32__subr))): (scm_string_to_utf32__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 1, 0))))); scm_define (scm_string_to_utf32__name, scm_string_to_utf32__subr);;
 scm_utf8_to_string__name = scm_string_to_symbol (scm_utf8_to_string__name_string);
-scm_utf8_to_string__raw_objtable[2] = scm_utf8_to_string__subr_foreign; scm_utf8_to_string__raw_objtable[3] = scm_utf8_to_string__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_utf8_to_string__subr))): (scm_utf8_to_string__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 0, 0))))); scm_define (scm_utf8_to_string__name, scm_utf8_to_string__subr);;
 scm_utf16_to_string__name = scm_string_to_symbol (scm_utf16_to_string__name_string);
-scm_utf16_to_string__raw_objtable[2] = scm_utf16_to_string__subr_foreign; scm_utf16_to_string__raw_objtable[3] = scm_utf16_to_string__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_utf16_to_string__subr))): (scm_utf16_to_string__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 1, 0))))); scm_define (scm_utf16_to_string__name, scm_utf16_to_string__subr);;
 scm_utf32_to_string__name = scm_string_to_symbol (scm_utf32_to_string__name_string);
-scm_utf32_to_string__raw_objtable[2] = scm_utf32_to_string__subr_foreign; scm_utf32_to_string__raw_objtable[3] = scm_utf32_to_string__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_utf32_to_string__subr))): (scm_utf32_to_string__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 1, 0))))); scm_define (scm_utf32_to_string__name, scm_utf32_to_string__subr);;
diff -I '^/' -ru gcc/goops.x clang/goops.x
--- gcc/goops.x	2014-03-03 17:25:44.504882812 -0500
+++ clang/goops.x	2014-03-05 03:13:02.195800781 -0500
@@ -135,18 +135,6 @@
 scm_primitive_generic_generic__name = scm_string_to_symbol (scm_primitive_generic_generic__name_string);
 scm_primitive_generic_generic__raw_objtable[2] = scm_primitive_generic_generic__subr_foreign; scm_primitive_generic_generic__raw_objtable[3] = scm_primitive_generic_generic__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_primitive_generic_generic__subr))): (scm_primitive_generic_generic__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 0, 0))))); scm_define (scm_primitive_generic_generic__name, scm_primitive_generic_generic__subr);;
 sym_compute_applicable_methods = scm_string_to_symbol (sym_compute_applicable_methods_string);
-var_compute_applicable_methods = scm_c_define ("compute-applicable-methods", scm_c_define_gsubr (s_sys_compute_applicable_methods, 2, 0, 0, scm_sys_compute_applicable_methods));;
-k_setter = scm_from_locale_keyword ("setter");
-k_specializers = scm_from_locale_keyword ("specializers");
-k_procedure = scm_from_locale_keyword ("procedure");
-k_formals = scm_from_locale_keyword ("formals");
-k_body = scm_from_locale_keyword ("body");
-k_make_procedure = scm_from_locale_keyword ("make-procedure");
-k_dsupers = scm_from_locale_keyword ("dsupers");
-k_slots = scm_from_locale_keyword ("slots");
-k_gf = scm_from_locale_keyword ("generic-function");
-scm_make__name = scm_string_to_symbol (scm_make__name_string);
-scm_make__raw_objtable[2] = scm_make__subr_foreign; scm_make__raw_objtable[3] = scm_make__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_make__subr))): (scm_make__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (0, 0, 1))))); scm_define (scm_make__name, scm_make__subr);;
 scm_find_method__name = scm_string_to_symbol (scm_find_method__name_string);
 scm_find_method__raw_objtable[2] = scm_find_method__subr_foreign; scm_find_method__raw_objtable[3] = scm_find_method__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_find_method__subr))): (scm_find_method__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (0, 0, 1))))); scm_define (scm_find_method__name, scm_find_method__subr);;
 scm_sys_method_more_specific_p__name = scm_string_to_symbol (scm_sys_method_more_specific_p__name_string);
diff -I '^/' -ru gcc/i18n.x clang/i18n.x
--- gcc/i18n.x	2014-03-03 17:25:50.090332031 -0500
+++ clang/i18n.x	2014-03-05 03:13:02.345947265 -0500
@@ -39,8 +39,6 @@
 scm_string_locale_titlecase__name = scm_string_to_symbol (scm_string_locale_titlecase__name_string);
 scm_string_locale_titlecase__raw_objtable[2] = scm_string_locale_titlecase__subr_foreign; scm_string_locale_titlecase__raw_objtable[3] = scm_string_locale_titlecase__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_string_locale_titlecase__subr))): (scm_string_locale_titlecase__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 1, 0))))); scm_define (scm_string_locale_titlecase__name, scm_string_locale_titlecase__subr);;
 scm_locale_string_to_integer__name = scm_string_to_symbol (scm_locale_string_to_integer__name_string);
-scm_locale_string_to_integer__raw_objtable[2] = scm_locale_string_to_integer__subr_foreign; scm_locale_string_to_integer__raw_objtable[3] = scm_locale_string_to_integer__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_locale_string_to_integer__subr))): (scm_locale_string_to_integer__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 2, 0))))); scm_define (scm_locale_string_to_integer__name, scm_locale_string_to_integer__subr);;
 scm_locale_string_to_inexact__name = scm_string_to_symbol (scm_locale_string_to_inexact__name_string);
-scm_locale_string_to_inexact__raw_objtable[2] = scm_locale_string_to_inexact__subr_foreign; scm_locale_string_to_inexact__raw_objtable[3] = scm_locale_string_to_inexact__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_locale_string_to_inexact__subr))): (scm_locale_string_to_inexact__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 1, 0))))); scm_define (scm_locale_string_to_inexact__name, scm_locale_string_to_inexact__subr);;
 scm_nl_langinfo__name = scm_string_to_symbol (scm_nl_langinfo__name_string);
 scm_nl_langinfo__raw_objtable[2] = scm_nl_langinfo__subr_foreign; scm_nl_langinfo__raw_objtable[3] = scm_nl_langinfo__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_nl_langinfo__subr))): (scm_nl_langinfo__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 1, 0))))); scm_define (scm_nl_langinfo__name, scm_nl_langinfo__subr);;
diff -I '^/' -ru gcc/load.x clang/load.x
--- gcc/load.x	2014-03-03 17:25:54.955078125 -0500
+++ clang/load.x	2014-03-05 03:13:02.466064453 -0500
@@ -27,4 +27,3 @@
 scm_sys_warn_auto_compilation_enabled__raw_objtable[2] = scm_sys_warn_auto_compilation_enabled__subr_foreign; scm_sys_warn_auto_compilation_enabled__raw_objtable[3] = scm_sys_warn_auto_compilation_enabled__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_sys_warn_auto_compilation_enabled__subr))): (scm_sys_warn_auto_compilation_enabled__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (0, 0, 0))))); scm_define (scm_sys_warn_auto_compilation_enabled__name, scm_sys_warn_auto_compilation_enabled__subr);;
 scm_primitive_load_path__name = scm_string_to_symbol (scm_primitive_load_path__name_string);
 scm_primitive_load_path__raw_objtable[2] = scm_primitive_load_path__subr_foreign; scm_primitive_load_path__raw_objtable[3] = scm_primitive_load_path__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_primitive_load_path__subr))): (scm_primitive_load_path__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (0, 0, 1))))); scm_define (scm_primitive_load_path__name, scm_primitive_load_path__subr);;
-sys_host_type = scm_c_define ("%host-type", scm_from_locale_string ("mips64el-unknown-linux-gnu"));;
diff -I '^/' -ru gcc/net_db.x clang/net_db.x
--- gcc/net_db.x	2014-03-03 17:26:53.452148437 -0500
+++ clang/net_db.x	2014-03-05 03:13:02.546142578 -0500
@@ -20,32 +20,5 @@
 scm_setserv__name = scm_string_to_symbol (scm_setserv__name_string);
 scm_setserv__raw_objtable[2] = scm_setserv__subr_foreign; scm_setserv__raw_objtable[3] = scm_setserv__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_setserv__subr))): (scm_setserv__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (0, 1, 0))))); scm_define (scm_setserv__name, scm_setserv__subr);;
 sym_getaddrinfo_error = scm_string_to_symbol (sym_getaddrinfo_error_string);
-sym_ai_passive = scm_c_define ("AI_PASSIVE", (((SCM) ((((scm_t_signed_bits) (0x0001)) << 2) + 2))));;
-sym_ai_canonname = scm_c_define ("AI_CANONNAME", (((SCM) ((((scm_t_signed_bits) (0x0002)) << 2) + 2))));;
-sym_ai_numerichost = scm_c_define ("AI_NUMERICHOST", (((SCM) ((((scm_t_signed_bits) (0x0004)) << 2) + 2))));;
-sym_ai_numericserv = scm_c_define ("AI_NUMERICSERV", (((SCM) ((((scm_t_signed_bits) (0x0400)) << 2) + 2))));;
-sym_ai_v4mapped = scm_c_define ("AI_V4MAPPED", (((SCM) ((((scm_t_signed_bits) (0x0008)) << 2) + 2))));;
-sym_ai_all = scm_c_define ("AI_ALL", (((SCM) ((((scm_t_signed_bits) (0x0010)) << 2) + 2))));;
-sym_ai_addrconfig = scm_c_define ("AI_ADDRCONFIG", (((SCM) ((((scm_t_signed_bits) (0x0020)) << 2) + 2))));;
 scm_getaddrinfo__name = scm_string_to_symbol (scm_getaddrinfo__name_string);
 scm_getaddrinfo__raw_objtable[2] = scm_getaddrinfo__subr_foreign; scm_getaddrinfo__raw_objtable[3] = scm_getaddrinfo__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_getaddrinfo__subr))): (scm_getaddrinfo__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 5, 0))))); scm_define (scm_getaddrinfo__name, scm_getaddrinfo__subr);;
-sym_eai_badflags = scm_c_define ("EAI_BADFLAGS", (((SCM) ((((scm_t_signed_bits) (-1)) << 2) + 2))));;
-sym_eai_noname = scm_c_define ("EAI_NONAME", (((SCM) ((((scm_t_signed_bits) (-2)) << 2) + 2))));;
-sym_eai_again = scm_c_define ("EAI_AGAIN", (((SCM) ((((scm_t_signed_bits) (-3)) << 2) + 2))));;
-sym_eai_fail = scm_c_define ("EAI_FAIL", (((SCM) ((((scm_t_signed_bits) (-4)) << 2) + 2))));;
-sym_eai_family = scm_c_define ("EAI_FAMILY", (((SCM) ((((scm_t_signed_bits) (-6)) << 2) + 2))));;
-sym_eai_socktype = scm_c_define ("EAI_SOCKTYPE", (((SCM) ((((scm_t_signed_bits) (-7)) << 2) + 2))));;
-sym_eai_service = scm_c_define ("EAI_SERVICE", (((SCM) ((((scm_t_signed_bits) (-8)) << 2) + 2))));;
-sym_eai_memory = scm_c_define ("EAI_MEMORY", (((SCM) ((((scm_t_signed_bits) (-10)) << 2) + 2))));;
-sym_eai_system = scm_c_define ("EAI_SYSTEM", (((SCM) ((((scm_t_signed_bits) (-11)) << 2) + 2))));;
-sym_eai_overflow = scm_c_define ("EAI_OVERFLOW", (((SCM) ((((scm_t_signed_bits) (-12)) << 2) + 2))));;
-sym_eai_nodata = scm_c_define ("EAI_NODATA", (((SCM) ((((scm_t_signed_bits) (-5)) << 2) + 2))));;
-sym_eai_addrfamily = scm_c_define ("EAI_ADDRFAMILY", (((SCM) ((((scm_t_signed_bits) (-9)) << 2) + 2))));;
-sym_eai_inprogress = scm_c_define ("EAI_INPROGRESS", (((SCM) ((((scm_t_signed_bits) (-100)) << 2) + 2))));;
-sym_eai_canceled = scm_c_define ("EAI_CANCELED", (((SCM) ((((scm_t_signed_bits) (-101)) << 2) + 2))));;
-sym_eai_notcanceled = scm_c_define ("EAI_NOTCANCELED", (((SCM) ((((scm_t_signed_bits) (-102)) << 2) + 2))));;
-sym_eai_alldone = scm_c_define ("EAI_ALLDONE", (((SCM) ((((scm_t_signed_bits) (-103)) << 2) + 2))));;
-sym_eai_intr = scm_c_define ("EAI_INTR", (((SCM) ((((scm_t_signed_bits) (-104)) << 2) + 2))));;
-sym_eai_idn_encode = scm_c_define ("EAI_IDN_ENCODE", (((SCM) ((((scm_t_signed_bits) (-105)) << 2) + 2))));;
-scm_gai_strerror__name = scm_string_to_symbol (scm_gai_strerror__name_string);
-scm_gai_strerror__raw_objtable[2] = scm_gai_strerror__subr_foreign; scm_gai_strerror__raw_objtable[3] = scm_gai_strerror__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_gai_strerror__subr))): (scm_gai_strerror__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 0, 0))))); scm_define (scm_gai_strerror__name, scm_gai_strerror__subr);;
diff -I '^/' -ru gcc/ports.x clang/ports.x
--- gcc/ports.x	2014-03-03 17:26:05.805664062 -0500
+++ clang/ports.x	2014-03-05 03:13:02.696289062 -0500
@@ -78,13 +78,10 @@
 scm_port_encoding__raw_objtable[2] = scm_port_encoding__subr_foreign; scm_port_encoding__raw_objtable[3] = scm_port_encoding__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_port_encoding__subr))): (scm_port_encoding__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 0, 0))))); scm_define (scm_port_encoding__name, scm_port_encoding__subr);;
 scm_set_port_encoding_x__name = scm_string_to_symbol (scm_set_port_encoding_x__name_string);
 scm_set_port_encoding_x__raw_objtable[2] = scm_set_port_encoding_x__subr_foreign; scm_set_port_encoding_x__raw_objtable[3] = scm_set_port_encoding_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_set_port_encoding_x__subr))): (scm_set_port_encoding_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (2, 0, 0))))); scm_define (scm_set_port_encoding_x__name, scm_set_port_encoding_x__subr);;
-default_conversion_strategy_var = scm_c_define ("%default-port-conversion-strategy", ((SCM) ((((((0)) << 8) + scm_tc8_flag)))));;
 sym_error = scm_string_to_symbol (sym_error_string);
 sym_substitute = scm_string_to_symbol (sym_substitute_string);
 sym_escape = scm_string_to_symbol (sym_escape_string);
 scm_port_conversion_strategy__name = scm_string_to_symbol (scm_port_conversion_strategy__name_string);
-scm_port_conversion_strategy__raw_objtable[2] = scm_port_conversion_strategy__subr_foreign; scm_port_conversion_strategy__raw_objtable[3] = scm_port_conversion_strategy__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_port_conversion_strategy__subr))): (scm_port_conversion_strategy__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 0, 0))))); scm_define (scm_port_conversion_strategy__name, scm_port_conversion_strategy__subr);;
 scm_set_port_conversion_strategy_x__name = scm_string_to_symbol (scm_set_port_conversion_strategy_x__name_string);
-scm_set_port_conversion_strategy_x__raw_objtable[2] = scm_set_port_conversion_strategy_x__subr_foreign; scm_set_port_conversion_strategy_x__raw_objtable[3] = scm_set_port_conversion_strategy_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_set_port_conversion_strategy_x__subr))): (scm_set_port_conversion_strategy_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (2, 0, 0))))); scm_define (scm_set_port_conversion_strategy_x__name, scm_set_port_conversion_strategy_x__subr);;
 scm_sys_make_void_port__name = scm_string_to_symbol (scm_sys_make_void_port__name_string);
 scm_sys_make_void_port__raw_objtable[2] = scm_sys_make_void_port__subr_foreign; scm_sys_make_void_port__raw_objtable[3] = scm_sys_make_void_port__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_sys_make_void_port__subr))): (scm_sys_make_void_port__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 0, 0))))); scm_define (scm_sys_make_void_port__name, scm_sys_make_void_port__subr);;
diff -I '^/' -ru gcc/procprop.x clang/procprop.x
--- gcc/procprop.x	2014-03-03 17:26:08.228027343 -0500
+++ clang/procprop.x	2014-03-05 03:13:02.776367187 -0500
@@ -3,7 +3,6 @@
 scm_sym_arity = scm_string_to_symbol (scm_sym_arity_string);
 scm_sym_name = scm_string_to_symbol (scm_sym_name_string);
 scm_set_procedure_minimum_arity_x__name = scm_string_to_symbol (scm_set_procedure_minimum_arity_x__name_string);
-scm_set_procedure_minimum_arity_x__raw_objtable[2] = scm_set_procedure_minimum_arity_x__subr_foreign; scm_set_procedure_minimum_arity_x__raw_objtable[3] = scm_set_procedure_minimum_arity_x__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_set_procedure_minimum_arity_x__subr))): (scm_set_procedure_minimum_arity_x__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (4, 0, 0))))); scm_define (scm_set_procedure_minimum_arity_x__name, scm_set_procedure_minimum_arity_x__subr);;
 scm_procedure_minimum_arity__name = scm_string_to_symbol (scm_procedure_minimum_arity__name_string);
 scm_procedure_minimum_arity__raw_objtable[2] = scm_procedure_minimum_arity__subr_foreign; scm_procedure_minimum_arity__raw_objtable[3] = scm_procedure_minimum_arity__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_procedure_minimum_arity__subr))): (scm_procedure_minimum_arity__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (1, 0, 0))))); scm_define (scm_procedure_minimum_arity__name, scm_procedure_minimum_arity__subr);;
 scm_procedure_properties__name = scm_string_to_symbol (scm_procedure_properties__name_string);
diff -I '^/' -ru gcc/r6rs-ports.x clang/r6rs-ports.x
--- gcc/r6rs-ports.x	2014-03-03 17:26:10.910644531 -0500
+++ clang/r6rs-ports.x	2014-03-05 03:13:02.826416015 -0500
@@ -23,8 +23,6 @@
 scm_put_bytevector__raw_objtable[2] = scm_put_bytevector__subr_foreign; scm_put_bytevector__raw_objtable[3] = scm_put_bytevector__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_put_bytevector__subr))): (scm_put_bytevector__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (2, 2, 0))))); scm_define (scm_put_bytevector__name, scm_put_bytevector__subr);;
 scm_unget_bytevector__name = scm_string_to_symbol (scm_unget_bytevector__name_string);
 scm_unget_bytevector__raw_objtable[2] = scm_unget_bytevector__subr_foreign; scm_unget_bytevector__raw_objtable[3] = scm_unget_bytevector__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_unget_bytevector__subr))): (scm_unget_bytevector__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (2, 2, 0))))); scm_define (scm_unget_bytevector__name, scm_unget_bytevector__subr);;
-(bytevector_output_port_procedure)=scm_make_smob_type(("r6rs-bytevector-output-port-procedure"), (0));;
-scm_set_smob_apply((bytevector_output_port_procedure), (bop_proc_apply), (0), (0), (0));;
 scm_open_bytevector_output_port__name = scm_string_to_symbol (scm_open_bytevector_output_port__name_string);
 scm_open_bytevector_output_port__raw_objtable[2] = scm_open_bytevector_output_port__subr_foreign; scm_open_bytevector_output_port__raw_objtable[3] = scm_open_bytevector_output_port__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((scm_open_bytevector_output_port__subr))): (scm_open_bytevector_output_port__subr)))))) [(1)]) = ((scm_subr_objcode_trampoline (0, 1, 0))))); scm_define (scm_open_bytevector_output_port__name, scm_open_bytevector_output_port__subr);;
 scm_make_custom_binary_output_port__name = scm_string_to_symbol (scm_make_custom_binary_output_port__name_string);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Trouble with guile-snarf and clang-3.4's preprocessor
  2014-03-05  8:59 Trouble with guile-snarf and clang-3.4's preprocessor Mark H Weaver
@ 2014-03-06 22:52 ` Mark H Weaver
  2014-03-10 13:20 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Mark H Weaver @ 2014-03-06 22:52 UTC (permalink / raw)
  To: guile-devel

Mark H Weaver <mhw@netris.org> writes:

> Hello all,
>
> clang 3.4 is unable to successfully compile Guile 1.8, 2.0, or master.
> In all cases, Guile segfaults on its first execution, while trying to
> generate guile-procedures.texi.
>
> The reason is that clang 3.4's C preprocessor introduces a lot of extra
> newlines in surprising places.  Our snarfing macros are unable to cope
> with this, and lots of initialization code is lost.

I pushed a fix for this to the stable-2.0 branch.

http://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=c3c3032608c9658c5dc5019d85446b6a1c2f7fcc

     Mark



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Trouble with guile-snarf and clang-3.4's preprocessor
  2014-03-05  8:59 Trouble with guile-snarf and clang-3.4's preprocessor Mark H Weaver
  2014-03-06 22:52 ` Mark H Weaver
@ 2014-03-10 13:20 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2014-03-10 13:20 UTC (permalink / raw)
  To: guile-devel

Mark H Weaver <mhw@netris.org> skribis:

> Here's the definition of SCM_VARIABLE from snarf.h:
>
> #define SCM_VARIABLE(c_name, scheme_name) \
> SCM_SNARF_HERE(static SCM c_name) \
> SCM_SNARF_INIT(c_name = scm_c_define (scheme_name, SCM_BOOL_F);)
>
> When guile-snarf is run to generate ports.x, SCM_MAGIC_SNARF_INITS is
> defined, so the following definitions are active:
>
> # define SCM_SNARF_HERE(X)
> # define SCM_SNARF_INIT_PREFIX ^^
> # define SCM_SNARF_INIT(X) SCM_SNARF_INIT_PREFIX X ^:^
> # define SCM_SNARF_DOCS(TYPE, CNAME, FNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING)
>
> So you might expect the definition of 'default_conversion_strategy_var'
> in ports.c to expand into something like this:
>
> ^^ default_conversion_strategy_var = scm_c_define ("%default-port-conversion-strategy", SCM_BOOL_F); ^:^
>
> However, clang -E inserts 6 newlines between the open paren and the open
> quote above.  Unfortunately, afaict, the 'sed' script in the
> 'modern_snarf' function in 'guile-snarf' cannot cope with any newlines
> between the "^^" and "^:^".

Woow, good catch!

It’s surprising no other C compiler out there ever had this problem.

Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-10 13:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-05  8:59 Trouble with guile-snarf and clang-3.4's preprocessor Mark H Weaver
2014-03-06 22:52 ` Mark H Weaver
2014-03-10 13:20 ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).