This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug target/44037] builtin ffs vs. renamed ffs (vms-crtl.h)‏



------- Comment #2 from jay dot krell at cornell dot edu  2010-05-22 12:16 -------
Thanks, good pointer. I found what you mean based on your recommendation. I
tried many things like it then. Nothing worked. I don't know why.


Notice that there is __builtin_foo and foo.
Darwin appears to only rename __builtin_foo.
I need to rename foo.
I didn't figure out what the "implicit" builtins are, but I don't think
figuring that out would help me.


This is a little bit lame but worked:

jbook2:gcc jay$ diff -u /src/orig/gcc-4.5.0/gcc/c-common.c c-common.c
--- /src/orig/gcc-4.5.0/gcc/c-common.c  2010-04-02 12:54:46.000000000 -0700
+++ c-common.c  2010-05-22 04:59:55.000000000 -0700
@@ -5181,6 +5181,7 @@
 {
   tree decl;
   const char *libname;
+  const char *libname2;

   if (fntype == error_mark_node)
     return;
@@ -5190,11 +5191,16 @@
                           strlen ("__builtin_")));

   libname = name + strlen ("__builtin_");
+  libname2 = libname;
+  if (TARGET_ABI_OPEN_VMS && strcmp(libname, "ffs") == 0)
+    libname = "decc$ffs";
+
   decl = add_builtin_function (name, fntype, fncode, fnclass,
                               (fallback_p ? libname : NULL),
                               fnattrs);
   if (both_p
       && !flag_no_builtin && !builtin_function_disabled_p (libname)
+      && !builtin_function_disabled_p (libname2)
       && !(nonansi_p && flag_no_nonansi_builtin))
     add_builtin_function (libname, libtype, fncode, fnclass,
                          NULL, fnattrs);


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44037


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