[LLVMbugs] [Bug 916] NEW: llvm-gcc4 doesn't build on ppc-linux

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Sep 19 15:00:29 PDT 2006


http://llvm.org/bugs/show_bug.cgi?id=916

           Summary: llvm-gcc4 doesn't build on ppc-linux
           Product: tools
           Version: trunk
          Platform: Macintosh
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca


The compile error is from stor-layout.c using the ADJUST_FIELD_ALIGN macro. It
only has 2 parameters, but the caller is passing 3.

This macro was changed by Apple to put add a third parameter. For example, this
is the definition in gcc/config/i386/i386.h:

/* APPLE LOCAL Macintosh alignment */
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED, FIRST_FIELD_P) \
   x86_field_alignment (FIELD, COMPUTED)
#endif

There's also a definition in gcc/config/rs6000/darwin.h:

/* APPLE LOCAL begin Macintosh alignment 2002-2-26 --ff */
/* This now supports the Macintosh power, mac68k, and natural 
   alignment modes.  It now has one more parameter than the standard 
   version of the ADJUST_FIELD_ALIGN macro.  
   
   The macro works as follows: We use the computed alignment of the 
   field if we are in the natural alignment mode or if the field is 
   a vector.  Otherwise, if we are in the mac68k alignment mode, we
   use the minimum of the computed alignment and 16 (pegging at
   2-byte alignment).  If we are in the power mode, we peg at 32
   (word alignment) unless it is the first field of the struct, in 
   which case we use the computed alignment.  */
#undef ADJUST_FIELD_ALIGN
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED, FIRST_FIELD_P)      \
  (TARGET_ALIGN_NATURAL ? (COMPUTED) :                          \
   (((COMPUTED) == RS6000_VECTOR_ALIGNMENT)                     \
    ? RS6000_VECTOR_ALIGNMENT                                   \
    : (MIN ((COMPUTED),                                         \
            (TARGET_ALIGN_MAC68K ? 16                           \
                                 : ((FIRST_FIELD_P) ? (COMPUTED) \
                                                    : 32))))))

Presumably gcc/config/rs6000/linux.h and linux64.h could have similar macros
defined. Or, whatever two-parameter ADJUST_FIELD_ALIGN which is being redefined
 here could be fixed, but I don't know what file that's in.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list