public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Shivam Gupta <shivam98.tkg@gmail.com>
To: Iain Sandoe <iain@sandoe.co.uk>
Cc: unlvsur unlvsur <unlvsur@live.com>, GCC Development <gcc@gcc.gnu.org>
Subject: Re: -stdlib=libc++?
Date: Sat, 2 Apr 2022 19:32:39 +0530	[thread overview]
Message-ID: <CAHX=PX8nh+JU_EVg-svM_AvnuDH52D3_URn86Rj2=ku6mf7=Yg@mail.gmail.com> (raw)
In-Reply-To: <32B864C2-AF13-43F3-B56B-10E45EC3E5FA@sandoe.co.uk>

Hi Iain,

Thank you for the quick response and the effort to make that feature
available.

When I reconfigured/build GCC
with --with-gxx-libcxx-include-dir=/usr/include/c++/v1/ , -stdlib= option
is now available to take libc++.

thanks,
Shivam.

On Sat, Apr 2, 2022 at 3:21 PM Iain Sandoe <iain@sandoe.co.uk> wrote:

> Hi Shivam,
>
> > On 2 Apr 2022, at 06:57, Shivam Gupta <shivam98.tkg@gmail.com> wrote:
> >
> > I saw your last year's mail for the same topic on the GCC mailing list -
> https://gcc.gnu.org/pipermail/gcc/2020-March/000230.html.
>
> The patch was applied to GCC-11 (so is available one GCC-11 branch and
> will be on GCC-12 when that is released).
> >
> > I tried today but this option is still not available.
>
> The option has to be configured when the compiler is built, that also
> means that you have to install (and point the configure to) a suitable set
> of libc++ headers from the LLVM project  (e.g. there is a set here:
> https://github.com/iains/llvm-project/tree/9.0.1-gcc-stdlib).
>
> Generally, GCC is very compatible with the libc++ headers (the changes I
> made on that branch were mostly to deal with <coroutine> being in std:: for
> GCC and std::experimental:: for LLVM-9).  For LLVM libc++ earlier than 9
> there is a missing symbol that GCC uses - but that can be worked around too.
>
> There have been some changes in more recent (in particular, LLVM-14/main)
> libc++ that should make it more compatible.
>
> Of course, you should pick a version of the libc++ headers than matches
> the version used on your system (9 was used for quite a long time, but
> recent xcode headers are newer).
>
> Given that this involves cross-project sources and choosing a suitable
> set, probably it is a job for the distributions (e.g. homebrew, macports
> etc) to arrange or, for self-built compilers, following in the general
> comments above.
>
> FWIW, I have used this to build quite a few OSS projects on a number of
> Darwin versions (hence the comment about GCC being very compatible with
> libc++).
>
> thanks,
> Iain.
>
>

  reply	other threads:[~2022-04-02 14:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHX=PX-2PEZ8iPrpmneDYoUSBDthPjjuxckEcFnpyXsoSdwO2w@mail.gmail.com>
2022-04-02  9:51 ` -stdlib=libc++? Iain Sandoe
2022-04-02 14:02   ` Shivam Gupta [this message]
2022-04-02 16:48     ` -stdlib=libc++? Shivam Gupta
2022-04-03  6:53       ` -stdlib=libc++? Iain Sandoe
2022-04-03  8:03         ` -stdlib=libc++? Shivam Gupta
2020-03-30 14:19 -stdlib=libc++? unlvsur unlvsur
2020-03-30 14:42 ` -stdlib=libc++? Iain Sandoe

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='CAHX=PX8nh+JU_EVg-svM_AvnuDH52D3_URn86Rj2=ku6mf7=Yg@mail.gmail.com' \
    --to=shivam98.tkg@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    --cc=unlvsur@live.com \
    /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).