clangupc / clang-upc

Clang UPC Front-End
https://clangupc.github.io/
Other
17 stars 5 forks source link

clang-upc should include math library on the linker command line? #50

Closed nenadv closed 10 years ago

nenadv commented 10 years ago

GUPC driver places "-lm" on the list of library to link with. Should clang-upc do the same?

Recently an issue with atomic test suite came up where 'pow' function was used in some of the tests. It is provided by the math library, but clang-upc does not include one.

swatanabe commented 10 years ago

On 03/26/2014 06:43 PM, Nenad Vukicevic wrote:

GUPC driver places "-lm" on the list of library to link with. Should clang-upc do the same?

Recently an issue with atomic test suite came up where 'pow' function was used in some of the tests. It is provided by the math library, but clang-upc does not include one.

Does the UPC library itself depend on -lm? If not, we should probably just keep the base behavior of clang, which apparently is not to include it automatically.

gary-funck commented 10 years ago

On 03/26/14 19:08:51, swatanabe wrote:

On 03/26/2014 06:43 PM, Nenad Vukicevic wrote:

GUPC driver places "-lm" on the list of library to link with. Should clang-upc do the same?

Recently an issue with atomic test suite came up where 'pow' function was used in some of the tests. It is provided by the math library, but clang-upc does not include one.

Does the UPC library itself depend on -lm? If not, we should probably just keep the base behavior of clang, which apparently is not to include it automatically.

I agree with Steven here. The test harness should add it if needed.

I don't know why the decision was made for the gupc driver to implicitly add this switch. We should remove it and re-run the GUPC "self" and "GUPC+UPCR" test harnesses to determine potential fall out.

PHHargrove commented 10 years ago

I agree that olny if the runtime needs libm should it be linked automatically.

I believe that tests that need -lm should add that to the flags in the harness.conf. Please do not make clang-upc pass it automatically. Fix the harness.conf instead.

-Paul [Sent from my phone] On Mar 26, 2014 7:08 PM, "swatanabe" notifications@github.com wrote:

On 03/26/2014 06:43 PM, Nenad Vukicevic wrote:

GUPC driver places "-lm" on the list of library to link with. Should clang-upc do the same?

Recently an issue with atomic test suite came up where 'pow' function was used in some of the tests. It is provided by the math library, but clang-upc does not include one.

Does the UPC library itself depend on -lm? If not, we should probably just keep the base behavior of clang, which apparently is not to include it automatically.

Reply to this email directly or view it on GitHubhttps://github.com/Intrepid/clang-upc/issues/50#issuecomment-38762271 .

nenadv commented 10 years ago

Will not add "-lm" on the link line.