Re: [patch] Fix oddity in personality routine

Andrew Haley <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
Jack Howarth wrote:
> On Thu, Dec 03, 2009 at 09:25:11PM +0000, Andrew Haley wrote:
>> Boehm, Hans wrote:
>>>> From:  Jack Howarth
>>>> Do you think that  -Wl,-allow_stack_execute needs to be 
>>>> passed even more widely than on just ecjx_LDFLAGS? Any 
>>>> suggestions as to where I should be passing it? Perhaps on 
>>>> something like LIBJAVA_LDFLAGS_NOUNDEF at the toplevel of 
>>>> libjava? Or should we even be building libffi and boehm-gc 
>>>> with that as well?
>>>>
>>> I haven't been following this completely, but:
>>>
>>> The GC also has a compile-time flag NO_EXECUTE_PERMISSION, which affects heap executability.
>> I think that's probably not the cause, since libffi allocates memory itself.
>>
>> Andrew.
> 
> Andrew,
>    On reflection, shouldn't something like...
> 
> Index: libjava/Makefile.in
> ===================================================================
> --- libjava/Makefile.in	(revision 154965)
> +++ libjava/Makefile.in	(working copy)
> @@ -8500,8 +8500,7 @@
>  	$(am__append_28)
>  gij_SOURCES = 
>  gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \
> -	-shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) \
> -	$(extra_gij_ldflags) 
> +	-shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
>  
>  gij_LINK = $(GCJLINK) $(gij_LDFLAGS)
>  gij_LDADD = -L$(here)/.libs libgij.la
> Index: libjava/Makefile.am
> ===================================================================
> --- libjava/Makefile.am	(revision 154965)
> +++ libjava/Makefile.am	(working copy)
> @@ -294,7 +294,7 @@
>  
>  LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
>  GCJLINK = $(LIBTOOL) --tag=GCJ $(LIBTOOLFLAGS) --mode=link $(GCJ) -L$(here) \
> -	  $(JC1FLAGS) $(LTLDFLAGS) -o $@
> +	   $(extra_gij_ldflags) $(JC1FLAGS) $(LTLDFLAGS) -o $@
>  GCJ_FOR_ECJX = @GCJ_FOR_ECJX@
>  GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
>  LIBLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXX) -L$(here) \
> @@ -1065,8 +1065,7 @@
>  ## need this because we are explicitly using libtool to link using the
>  ## `.la' file.
>  gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \
> -	-shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) \
> -	$(extra_gij_ldflags) 
> +	-shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
>  gij_LINK = $(GCJLINK) $(gij_LDFLAGS)
>  ## See jv_convert_LDADD.
>  gij_LDADD = -L$(here)/.libs libgij.la
> 
> ...be appropriate to make sure that all java executables on darwin are linked with
> -Wl,-allow_stack_execute?

No, because it will only affect the binaries in gcj, not things the
user compiles.  That's why I suggested SYSTEMSPEC.

Andrew.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.