This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR43715 - Fix --enable-plugin on darwin
- From: Peter O'Gorman <peter at pogma dot com>
- To: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, mikestump at comcast dot net, iains at gcc dot gnu dot org
- Date: Sun, 11 Apr 2010 10:22:49 -0500
- Subject: Re: [PATCH] PR43715 - Fix --enable-plugin on darwin
- References: <20100411043618.GA16020@bromo.med.uc.edu>
On 04/10/2010 11:36 PM, Jack Howarth wrote:
Hi Jack,
I am not able to review this, but I'm going to comment anyway :)
We'd need to keep objdump, and only use nm if gcc_cv_objdump is unset or
empty. And I am pretty sure that everywhere you're checking for
"target", you need to change to "host", as it is the host compiler that
will be loading the plugins etc. not the target.
That being said, since gcc is going to end up building gcc, I am not
sure why these checks are there at all, surely all that is needed to
check that plugin support can be built is checking for dlopen/dlfcn.h,
and putting -rdynamic into poststage1_ldflags or something similar?
Peter
> @@ -88,6 +88,10 @@
>
> set optstr "$includes $extra_flags -DIN_GCC -fPIC -shared"
>
> + if { [ istarget *-*-darwin* ] } {
> Index: configure.ac
> ===================================================================
> --- configure.ac (revision 158199)
> +++ configure.ac (working copy)
> @@ -4384,12 +4384,12 @@
> AC_MSG_CHECKING([for exported symbols])
> echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
> ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
> - if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
> + if $gcc_cv_nm -g conftest | grep foobar > /dev/null; then
> : # No need to use a flag
> @@ -4406,7 +4406,14 @@
>
> # Check that we can build shared objects with -fPIC -shared
> saved_LDFLAGS="$LDFLAGS"
> - LDFLAGS="$LDFLAGS -fPIC -shared"
> + case "${target}" in
> + *-*-darwin*)