public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/30007] libgfortran doesn't build for sh-elf
Date: Thu, 18 Jan 2007 17:28:00 -0000	[thread overview]
Message-ID: <20070118172842.19872.qmail@sourceware.org> (raw)
In-Reply-To: <bug-30007-5394@http.gcc.gnu.org/bugzilla/>



------- Comment #4 from fxcoudert at gcc dot gnu dot org  2007-01-18 17:28 -------
So, the reduced code looks like this:

extern void bar (void);
extern __typeof(bar) bar __asm__("foo");
void bar (void) { ; }
extern __typeof(bar) gee __attribute__((__alias__("foo")));

Ian Lance Taylor gave me the solution on IRC, which is: on SH, all symbol names
are preprended an underscore, but in the above code __asm__("foo") does not
prepend it for us. The macro defined for this underscore (and other such
prefixes on other targets, although I don't any in particular) is
__USER_LABEL_PREFIX__, so the final fix is:

#define stringize(x) expand_macro(x)
#define expand_macro(x) # x

extern void bar (void);
extern __typeof(bar) bar __asm__(stringize(__USER_LABEL_PREFIX__) "foo");
void bar (void) { ; }
extern __typeof(bar) gee __attribute__((__alias__("foo")));


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |fxcoudert at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-01-05 10:10:35         |2007-01-18 17:28:42
               date|                            |


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


  parent reply	other threads:[~2007-01-18 17:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-28 11:10 [Bug libfortran/30007] New: " amylaar at gcc dot gnu dot org
2006-12-02  7:57 ` [Bug libfortran/30007] " pinskia at gcc dot gnu dot org
2006-12-04 14:37 ` amylaar at gcc dot gnu dot org
2007-01-05 10:10 ` fxcoudert at gcc dot gnu dot org
2007-01-18 17:28 ` fxcoudert at gcc dot gnu dot org [this message]
2007-01-18 17:52 ` pinskia at gcc dot gnu dot org
2007-01-18 18:49 ` fxcoudert at gcc dot gnu dot org
2007-02-02 16:19 ` fxcoudert at gcc dot gnu dot org
2007-02-03  7:13 ` kkojima at gcc dot gnu dot org
2007-02-03 13:05 ` fxcoudert at gcc dot gnu dot org
2007-02-04 10:30 ` fxcoudert at gcc dot gnu dot org
2007-02-04 10:31 ` fxcoudert at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070118172842.19872.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).