linux-rdma / perftest

Infiniband Verbs Performance Tests
Other
594 stars 283 forks source link

Perftest: enable inherit environment LDFLAGS #196

Closed changchengx closed 1 year ago

changchengx commented 1 year ago

Sometimes, it needs to use environment to specify the library path to be linked during development stage if the library doesn't exist in system installed path. enable inherit environment LDFLAGS in configure to support it.

Signed-off-by: Liu, Changcheng changcheng.liu@aliyun.com

HassanKhadour commented 1 year ago

Hi, doesn't this PR override the LDFLAGS in line 237?

changchengx commented 1 year ago

@HassanKhadour

  1. If there's no LDFLAGS environment is set when running configure script, this PR doesn't change anything

  2. If there's LDFLAGS environment is set when running configure script by user. 1) If --with_rocm option isn't used, line 237 won't be called. This PR only set LDFLAGS to the user's LDFLAGS configuration. 2) If --with_rocm option is set, line 237 will be called. It means that user's LDFLAGS configuration is added at the end of LDFLAGS.

HassanKhadour commented 1 year ago

Thanks,

So it means if we use with_rocm, LDFLAGS="$LDFLAGS" will take the value from line 237? and it will be LDFLAGS=-L$with_rocm/lib64 -Wl,-rpath=$with_rocm/lib64 -L$with_rocm/lib -Wl,-rpath=$with_rocm/lib -lamdhip64 $LDFLAGS ?

changchengx commented 1 year ago

@HassanKhadour Yes. With this PR, user could append other LDFLAGS if it's needed.

HassanKhadour commented 1 year ago

Thanks for your contribution!