List for cgit developers and users
 help / color / mirror / Atom feed
From: peter at colberg.org (Peter Colberg)
Subject: [PATCH] Link with -ldl on GNU/kFreeBSD
Date: Fri, 1 Jul 2016 21:33:17 -0400	[thread overview]
Message-ID: <20160702013317.GA13642@alcyone> (raw)
In-Reply-To: <CAHmME9ru4-hP8cmoGFSO796Ef6e+=Lo6fK7CKbL6ETz=_ACsVw@mail.gmail.com>

On Fri, Jul 01, 2016 at 11:56:55PM +0200, Jason A. Donenfeld wrote:
> I wonder if a better way would be match the particular libc out of
> uname -o. In this case, GNU libc needs -ldl. Do other libcs also need
> libdl? Seems like this might be slightly cleaner.

In theory one could detect glibc by grepping for specific macros,

cc -E -dM -include dlfcn.h -xc /dev/null

but in practice other libcs pretend being glibc:

https://git.uclibc.org/uClibc/tree/include/features.h

/*  There is an unwholesomely huge amount of code out there that depends on the
 *  presence of GNU libc header files.  We have GNU libc header files.  So here
 *  we commit a horrible sin.  At this point, we _lie_ and claim to be GNU libc

Peter


  reply	other threads:[~2016-07-02  1:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-19 22:55 peter
2016-07-01 21:56 ` Jason
2016-07-02  1:33   ` peter [this message]
2016-07-02  1:50 ` peter
2016-07-02  2:00   ` [PATCH v2] " peter
2016-07-06 21:30     ` peter
2016-07-06 21:57       ` Jason

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=20160702013317.GA13642@alcyone \
    --to=cgit@lists.zx2c4.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 NNTP newsgroup(s).