Samsung / libtuv

Asynchronous I/O for IoT.js and embedded system
Apache License 2.0
129 stars 76 forks source link

Add Position-Independent-Code (PIC) Library #128

Closed furuame closed 5 years ago

furuame commented 5 years ago

Add the PIC Library, which can be used to link with other libraries and produce the final shared library.

To avoid confusion with static linked library, I name it "libtuv.o". Any suggestion? Thanks!

libtuv-DCO-1.0-Signed-off-by: zhenwei zhenwei.tw@gmail.com

hs0225 commented 5 years ago

@chenwei-tw How about adding option about COMPILE_FLAGS in makefile?

hs0225 commented 5 years ago

@chenwei-tw I close this PR since you have not reacted for a long time. You can reopen it at any time.

marktwtn commented 5 years ago

Hi @hs0225 , I might create another pull request for creating the PIC library.

Shall we discuss and figure out a conclusion in here first?

marktwtn commented 5 years ago

The generated library is neither static library nor shared library. It is much like a collection of position indepent object code. Though I do not come out with a better file extension name, the libtuv.o might be confusing?

I think adding option about COMPILER_FLAGS in Makefile is simpler. But the generated file suffix should be determined first.

LaszloLango commented 5 years ago

@marktwtn hi, I don't have strong preferences, libtuv.o or libtuv.so are both good to me.

marktwtn commented 5 years ago

I think this pull request can be merged without any problem.

The PIC library for linking with other libraries and produce the final shared library is a special one. Adding option about COMPILE_FLAGS in Makefile is not enough. It should be taken care independently in cmake/libtuv.cmake.