From 1ab0c684831a7bfe6dbc00de7da44441a4a4a5a9 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sun, 22 Mar 2009 11:26:45 +0000 Subject: make dlopen_lib work in a non-"BSD is the only other thing in the world" setting --- eclass/portability.eclass | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'eclass/portability.eclass') diff --git a/eclass/portability.eclass b/eclass/portability.eclass index 2fb4271c307b..1165ceb6280e 100644 --- a/eclass/portability.eclass +++ b/eclass/portability.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.11 2007/01/01 22:27:01 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.12 2009/03/22 11:26:45 grobian Exp $ # # Author: Diego Pettenò # @@ -54,7 +54,12 @@ seq() { # Gets the linker flag to link to dlopen() function dlopen_lib() { - if [[ ${ELIBC} != *BSD ]]; then + # this might need a proper case statement, so far this seems to work as is + # - Solaris needs nothing + # - Darwin needs nothing + # - *BSD needs nothing + # - Linux needs -ldl + if [[ ${CHOST} == *-linux-gnu ]]; then echo "-ldl" fi } -- cgit v1.2.3-65-gdbad