Bug #12657
Updated by nobu (Nobuyoshi Nakada) about 8 years ago
This is related to Bug #12191. Changing in internal.h:983-985 from : ```diff ``` -#define RBASIC_CLEAR_CLASS(obj) (((struct RBasicRaw *)((VALUE)(obj)))->klass = 0) -#define RBASIC_SET_CLASS_RAW(obj, cls) (((struct RBasicRaw *)((VALUE)(obj)))->klass = (cls)) ``` to: ```C ``` #ifdef __ibmxl__ #define RBASIC_SET_CLASS_RAW(obj, cls) memcpy(&((struct RBasicRaw *)((VALUE)(obj)))->klass, &(cls), sizeof(VALUE)) #else #define RBASIC_SET_CLASS_RAW(obj, cls) (((struct RBasicRaw *)((VALUE)(obj)))->klass = (cls)) #endif #ifdef __ibmxl__ #define RBASIC_CLEAR_CLASS(obj) memset(&(((struct RBasicRaw *)((VALUE)(obj)))->klass), 0, sizeof(((struct RBasicRaw *)((VALUE)(obj)))->klass)) #else #define RBASIC_CLEAR_CLASS(obj) (((struct RBasicRaw *)((VALUE)(obj)))->klass = 0) #endif ``` This allows for ruby to build using XL compiler. Otherwise build fails because of ANSI aliasing issues.