This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR43715 - Fix --enable-plugin on darwin


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*)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]