This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libobjc



Ok, I've taken the libobjc sources and put them in an automake package.
Here's the first pass:

 ftp://ftp.santafe.edu/pub/gnu/libobjc-1.2.tar.gz

To make this work, I had to add a few more values to cc1obj's
-print-objc-runtime-info option [patch below].  Missing is support for
ADJUST_FIELD_ALIGN (for RS6000/AIX), and ROUND_TYPE_{ALIGN,SIZE} (for
i960).  But from the absence of a replacement macro for TYPE_MODE in
encoding.c, it looks to me like the AIX must have been broken.
Perhaps the thing to do for these cases is to adapt the GCC
macros into standalone routines...

Index: objc-act.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/objc/objc-act.c,v
retrieving revision 1.25
diff -c -r1.25 objc-act.c
*** objc-act.c	1999/02/22 09:02:25	1.25
--- objc-act.c	1999/03/13 22:13:02
***************
*** 526,531 ****
--- 526,532 ----
     any compiling, instead we are to test some platform dependent
     features and output a C header file with appropriate definitions. */
  
+ static int print_target_configuration_values = 0;
  static int print_struct_values = 0;
  
  /* Some platforms pass small structures through registers versus through
***************
*** 587,594 ****
  	printf (", %d", aggregate_in_mem[j]);
        printf ("\n};\n");
      }
-  
-   exit (0);
  }
  
  #if USE_CPPLIB
--- 588,593 ----
***************
*** 657,664 ****
--- 656,687 ----
    if (doing_objc_thang)
      init_objc ();
  
+   if (print_target_configuration_values)
+     {
+ #ifdef STRUCTURE_SIZE_BOUNDARY
+       printf ("#define STRUCTURE_SIZE_BOUNDARY %u\n",
+               STRUCTURE_SIZE_BOUNDARY);
+ #endif
+ #ifdef BIGGEST_FIELD_ALIGNMENT
+       printf ("#define BIGGEST_FIELD_ALIGNMENT %u\n",
+               BIGGEST_FIELD_ALIGNMENT);
+ #endif
+ #ifdef PCC_BITFIELD_TYPE_MATTERS
+       printf ("#define PCC_BITFIELD_TYPE_MATTERS %u\n",
+               PCC_BITFIELD_TYPE_MATTERS);
+ #endif
+ #ifndef STRUCT_VALUE
+       printf ("#define INVISIBLE_STRUCT_RETURN 1\n");
+ #else
+       printf ("#define INVISIBLE_STRUCT_RETURN %u\n", (STRUCT_VALUE == 0));
+ #endif
+       printf ("#define BITS_PER_UNIT %u\n", BITS_PER_UNIT);
+       printf ("#define BITS_PER_WORD %u\n", BITS_PER_WORD);
+     }
    if (print_struct_values)
      generate_struct_by_value_array ();
+   if (print_struct_values || print_target_configuration_values)
+     exit (0);
  }
  
  static void
***************
*** 715,721 ****
    else if (!strcmp (p, "-fnext-runtime"))
      flag_next_runtime = 1;
    else if (!strcmp (p, "-print-objc-runtime-info"))
!     print_struct_values = 1;
    else
      return c_decode_option (argc, argv);
  
--- 738,747 ----
    else if (!strcmp (p, "-fnext-runtime"))
      flag_next_runtime = 1;
    else if (!strcmp (p, "-print-objc-runtime-info"))
!     {
!       print_target_configuration_values = 1;
!       print_struct_values = 1;
!     }
    else
      return c_decode_option (argc, argv);
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]