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] move FFI_MMAP_EXEC_WRIT to configure. was Re: PATCH: Fix 64-bit libffi testsuite on Solaris 10+ (PR libffi/40700)


On 12/23/2009 09:03 PM, Andreas Tobler wrote:
> On 22.12.09 22:57, Andrew Haley wrote:
>> On 12/22/2009 08:37 PM, Andreas Tobler wrote:
>>> On 20.12.09 09:12, Andreas Tobler wrote:
>>>> On 20.12.09 03:21, Gerald Pfeifer wrote:
>>>>> On Thu, 10 Dec 2009, Andreas Tobler wrote:
>>>>>> Anyway, there are other architectures which do have the same issue.
>>>>>> FreeBSD,
>>>>>> OpenBSD, apple-darwin10. We 'solved' this with adding the snippet
>>>>>> below in the
>>>>>> configure.ac (from the libffi sources, not in the gcc repo yet.):
>>>>>>
>>>>>> case "$target" in
>>>>>>        *-apple-darwin10* | *-*-freebsd* | *-*-openbsd*)
>>>>>>            AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1,
>>>>>>                      [Cannot use malloc on this target, so, we revert to
>>>>>>                       alternative means])
>>>>>>        ;;
>>>>>>
>>>>>>
>>>>>> So, my question, shall we move the three remaining OS variants into the
>>>>>> closures.c file. Or should we move the solaris/x86 part from the
>>>>>> closures.c
>>>>>> file into the configure.ac part?
>>>>>
>>>>> Are you planning on addressing this for the three platforms (Darwin,
>>>>> FreeBSD, OpenBSD) for GCC 4.5?  Or do we have a different fix in the
>>>>> GCC tree for the time being?
>>>>
>>>> Yes, it's planned. I should come up soon with a proposal.
>>>
>>> Here it is.
>>>
>>> The patch is against gcc trunk.
>>>
>>> For standalone libffi the closures.c part can be ignored.
>>>
>>> I tested it under the given targets except darwin10, no installation yet.
>>>
>>> (sparc64-*-freebsd9, amd64/x86_64-*freebsd9, amd64/x86_64-*-openbsd4.6,
>>> i386-pc-solaris2.11(multilib), i?86-*-freebsd9,)
>>>
>>> The tests were done within the gcc libffi and with libffi standalone
>>> (3.0.9rc3) tree.
>>>
>>> On OpenBSD I only tested with the standalone libffi.
>>>
>>> The remaining part is the snippet from src/closures.c I want to move to
>>> the configure part: # if defined(X86_WIN32) || defined(X86_WIN64)
>>>
>>> But here I lack the test environment, any volunteers?
>>> I can hack an untested patch for these targets.
>>>
>>> Ok for gcc trunk?
>>>
>>> Thanks,
>>> Andreas
>>>
>>> 2009-12-22  Andreas Tobler<a.tobler@schweiz.org>
>>>
>>>      * configure.ac: Define FFI_MMAP_EXEC_WRIT for the given targets.
>>>      * configure: Regenerate.
>>>      * fficonfig.h.in: Likewise.
>>>      * src/closures.c: Remove the FFI_MMAP_EXEC_WRIT definition for
>>>      Solaris/x86.
>>
>> This looks good to me.  I can't think of any reason why not to do this.
> 
> An ok for trunk then?

Sure.

Andrew.


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