[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MacOS X nested functions in libtool library

From: Peter O'Gorman
Subject: Re: MacOS X nested functions in libtool library
Date: Tue, 29 May 2007 01:36:14 -0500

On May 29, 2007, at 12:47 AM, Bill Northcott wrote:

I am trying to build a libtool library containing nested functions on MacOS X Intel.

The project is using Autoconf 2.59, Automake 1.9.6 and Libtool 1.5.22.

Adding '-fnested-functions' to the CFLAGS stops the compiler barfing. However as per Apple Tech note technotes/tn2006/tn2161.html it is also necessary to add -fnested- functions or an equivalent ld flag to the compiler link command. Without this flag, the linker defaults to disable_stack_execute on i386 and the library crashes at runtime.

Adding -fnested-functions to libfoo_la_LDFLAGS does not work because libtool strips it out before invoking gcc.

Is there a way around this or an actual fix?

LDFLAGS=-Wl,-allow_stack_execute does not work?

Peter O'Gorman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]