Hi all,

I attach a patch that fixes the build failure of clisp on i386, armel, armhf
and mipsel (I verified that on porterboxes).

As described in the patch, the bug comes from a variable capture in a C macro
(first time I encounter a macro-hygiene issue in C, and funny that it happens
precisely with a Lisp implementation). I will forward this patch upstream once
we have uploaded it to Debian.

The patch does not however solve the build failure on mips and s390x. These two
archs are big-endian, so this is probably a hint. I am going to investigate
that.

By the way, I think we should not use --enable-portability on amd64 and i386:
it is not needed there, and has a performance cost.

I am not yet a member of the pkg-common-lisp group on Alioth, so I can't push
these changes. Please do so at your convenience (or even better, accept me in
the group!).

Thanks for your work on clisp.

Best,

-- 
⢀⣴⠾⠻⢶⣦⠀  Sébastien Villemot
⣾⠁⢠⠒⠀⣿⡁  Debian Developer
⢿⡄⠘⠷⠚⠋⠀  http://sebastien.villemot.name
⠈⠳⣄⠀⠀⠀⠀  http://www.debian.org
Description: Fix macro variable capture in WIDE_SOFT model
 Under the WIDE_SOFT model (which is used on all 32-bit platforms with
 --enable-portability), the last argument of macro unpack_sstring_alloca_help_
 (which is named "u") captures the name of the "u" union. This leads to a build
 failure in the new-clx module.
 .
 This patch renames the last argument of the macro to "uu".
Author: Sébastien Villemot <sebast...@debian.org>
Forwarded: no
Last-Update: 2017-09-16
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/lispbibl.d
+++ b/src/lispbibl.d
@@ -14277,7 +14277,7 @@ static inline uintBWL smallest_string_fl
  < const chart* charptr: pointer to the characters
    (may be in string, may be on the stack) */
 #ifdef HAVE_SMALL_SSTRING
-  #define unpack_sstring_alloca_help_(string,len,offset,charptr_assignment,u) \
+  #define unpack_sstring_alloca_help_(string,len,offset,charptr_assignment,uu) \
     if (simple_nilarray_p(string)) {                                           \
       if ((len) > 0) error_nilarray_retrieve();                               \
       charptr_assignment NULL;                                                 \
@@ -14291,12 +14291,12 @@ static inline uintBWL smallest_string_fl
         else if (sstring_eltype(TheSstring(string)) == Sstringtype_8Bit) \
           copy_8bit_32bit(&TheS8string(string)->data[offset],(cint32*)_unpacked_,len);\
         else                                                                   \
-          u;                                                            \
+          uu;                                                            \
       }                                                                        \
       charptr_assignment (const chart*) _unpacked_;                            \
     }
 #else
-  #define unpack_sstring_alloca_help_(string,len,offset,charptr_assignment,u) \
+  #define unpack_sstring_alloca_help_(string,len,offset,charptr_assignment,uu) \
     if (simple_nilarray_p(string)) {                                           \
       if ((len) > 0) error_nilarray_retrieve();                               \
       charptr_assignment NULL;                                                 \
@@ -14307,7 +14307,7 @@ static inline uintBWL smallest_string_fl
 #define unpack_sstring_alloca(string,len,offset,charptr_assignment)     \
   unpack_sstring_alloca_help_(string,len,offset,charptr_assignment,NOTREACHED)
 /* is used by */
-%% export_def(unpack_sstring_alloca_help_(string,len,offset,charptr_assignment,u));
+%% export_def(unpack_sstring_alloca_help_(string,len,offset,charptr_assignment,uu));
 %% puts("#define unpack_sstring_alloca(s,l,o,c) unpack_sstring_alloca_help_(s,l,o,c,NOTREACHED)");
 
 /* UP: Fetches a character from a simple string.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
pkg-common-lisp-devel mailing list
pkg-common-lisp-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-common-lisp-devel

Reply via email to