From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26674 invoked by alias); 22 May 2010 12:16:40 -0000 Received: (qmail 26613 invoked by uid 48); 22 May 2010 12:16:25 -0000 Date: Sat, 22 May 2010 12:16:00 -0000 Message-ID: <20100522121625.26612.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/44037] builtin ffs vs. renamed ffs (vms-crtl.h)‏ In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jay dot krell at cornell dot edu" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-05/txt/msg02401.txt.bz2 ------- 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