This is the mail archive of the 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] Avoid -lm and -lpthread in libjava on darwin

On Thu, Aug 12, 2010 at 11:20:08AM -0700, Richard Henderson wrote:
> On 08/12/2010 04:19 AM, Jack Howarth wrote:
> >   Currently libjava built on darwin inappropriately passes -lm
> > and -lpthread to the linkage flags. These prevent libSystem from
> > properly linking last and thus interferes with the logic behind
> > libgcc_ext. The attached patch eliminates these undesired linkages
> > by not setting THREADLIBS or THREADSPEC on darwin and by replacing
> > the hardcoded assignment of '-lm' to libgcj_tools_la_LIBADD with
> > a new LIBJAVA_LDFLAGS_LIBMATH define (which is assigned with '-lm'
> > only when USING_DARWIN_CRT is undefined). Bootstrapped and regression
> > tested on x86_64-apple-darwin10. Okay for gcc trunk and gcc 4.5.2?
> >
> Is this patch necessary with the remove-outfile patch in place?

The remove-outfile patch is necessary to make sure that the gcc
compilers don't shift libSystem forward in the linkage and
disrupt the logic behind libgcc_ext when -ldl, -lm or -lpthread
is passed to the compiler. The libjava patch covers the hardcoding
of -lpthread and -lm into the linker flags that are passed via
libtool directly to the linker. Both patches are required to have
all of the shared libraries in FSF gcc built with the libSystem
linkage last.

> r~

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