public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Ford, Mark (MFORD)" <MFORD@arinc.com>
To: "'gcc-help@gcc.gnu.org'" <gcc-help@gcc.gnu.org>
Subject: Linking with g++ under AIX
Date: Fri, 31 Dec 1999 22:24:00 -0000	[thread overview]
Message-ID: <09328AED5429D311A3000008C7911B1001C28E7B@exanpmb1.arinc.com> (raw)
Message-ID: <19991231222400.zXBjfIM7l7HNkG87GhC7ANU9JBN_kSnsUHC7c6GZRi8@z> (raw)

After installing GCC under AIX 4.2.1, I was unable to link functions from
IBM's
"threadsafe" library (libc_r.a), using g++ (strangely gcc seems to link
fine).
Turns out, the problem is that, in stdlib.h, some functions were #ifdef'ed
out,
like this:
   #ifdef _THREAD_SAFE
      <decl.'s>
      extern int rand_r();
      <more decl.'s>
   #endif

As a quick workaround, I added "-D_THREAD_SAFE to my compile and link
commands.   But, I'm still looking for a compiler switch to turn on this
macro.

Does GCC support threads?   And, if so, is there a compiler switch that will
turn on this macro, or is this just something that only IBM recognizes?

Also, is there some easy way to correlate which macros, if any, are set by
which
compiler options?

             reply	other threads:[~1999-12-31 22:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-29  7:38 Ford, Mark (MFORD) [this message]
1999-12-31 22:24 ` Ford, Mark (MFORD)

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=09328AED5429D311A3000008C7911B1001C28E7B@exanpmb1.arinc.com \
    --to=mford@arinc.com \
    --cc=gcc-help@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).