This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi 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: libffi build issues with Sun Studio 12 compiler


Ginn Chen wrote:
Hi,

I got some build issues of libffi inside mozilla-central with Sun Studio 12 compiler on OpenSolaris.

The problems are described at
https://bugzilla.mozilla.org/show_bug.cgi?id=519401#c4

1) -Wall, -fexceptions are not valid for Sun Studio compiler.

2) In ffitarget.h, Sun Studio doesn't define __i386__ and __x86_64__.
We can add || defined(__i386) and || defined (__x86_64).

3) ffi_common.h
FFI_ASSERT_AT should use (void)0.

I would like to ask advices for problem 1).
What should we do for AM_CFLAGS in Makefile.in?
What's the best way to handle it?

Thanks,

Ginn
Hi Ginn:

This is great. I can compile the 3.0.9rc1, but I'm having trouble linking:

/usr/ccs/bin/ld -G -h libffi.so.5 -o .libs/libffi.so.5.0.10 src/.libs/debug.o src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi64.o src/x86/.libs/unix64.o src/x86/.libs/ffi.o src/x86/.libs/sysv.o -R/opt/csw/lib -R/usr/lib -R/usr/sfw/lib -R/opt/sfw/lib -R/usr/local/lib -R/usr/dt/lib -R/usr/openwin/lib -L/opt/csw/lib -L/usr/lib -L/usr/sfw/lib -L/opt/sfw/lib -L/usr/local/lib -L/usr/dt/lib -L/usr/openwin/lib -lc
ld: fatal: symbol `ffi_prep_raw_closure_loc' is multiply-defined:
(file src/.libs/raw_api.o type=FUNC; file src/x86/.libs/ffi.o type=FUNC);
ld: fatal: symbol `ffi_raw_call' is multiply-defined:
(file src/.libs/raw_api.o type=FUNC; file src/x86/.libs/ffi.o type=FUNC);
ld: fatal: File processing errors. No output written to .libs/libffi.so.5.0.10
gmake[2]: *** [libffi.la] Error 1


Is there some other trick that I am missing?

--
Rodney Sparapani      Center for Patient Care & Outcomes Research (PCOR)
Sr. Biostatistician              http://www.mcw.edu/pcor
4 wheels good, 2 wheels better!  Medical College of Wisconsin (MCW)
WWLD?:  What Would Lombardi Do?  Milwaukee, WI, USA


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