Discussion:
test for CXXLD
Nicolas Bock
2013-06-06 19:08:01 UTC
Permalink
Hi,

The C++ compiler I am using (charmc) needs an additional command line
argument during the linker stage (-language charm++). I am unsure how to
best add this argument. The generated makefiles use CXX for compilation and
CXXLD for linking, both of which are set to "charmc". How would I change
CXXLD to add a flag? Or is there a cleaner way to accomplish this?

Thanks already,

nick
Gavin Smith
2013-06-06 22:40:31 UTC
Permalink
Post by Nicolas Bock
Hi,
The C++ compiler I am using (charmc) needs an additional command line
argument during the linker stage (-language charm++). I am unsure how to
best add this argument. The generated makefiles use CXX for compilation and
CXXLD for linking, both of which are set to "charmc". How would I change
CXXLD to add a flag? Or is there a cleaner way to accomplish this?
One way would be to pass in the flags on the command line when you
invoke make, e.g. "make CXXLDFLAGS='-language charm++'". Ideally
autoconf would set CXXLD correctly for you but it looks like it this
hasn't been implemented for this compiler.
Nicolas Bock
2013-06-19 18:16:02 UTC
Permalink
Thanks for the reply. I ended up using

AM_LDFLAGS = -Xcompiler "-language charm++"

For some reason CXXLDFLAGS was not added to the linker command in Makefile.

Thanks again,

nick
Post by Gavin Smith
Post by Nicolas Bock
Hi,
The C++ compiler I am using (charmc) needs an additional command line
argument during the linker stage (-language charm++). I am unsure how to
best add this argument. The generated makefiles use CXX for compilation
and
Post by Nicolas Bock
CXXLD for linking, both of which are set to "charmc". How would I change
CXXLD to add a flag? Or is there a cleaner way to accomplish this?
One way would be to pass in the flags on the command line when you
invoke make, e.g. "make CXXLDFLAGS='-language charm++'". Ideally
autoconf would set CXXLD correctly for you but it looks like it this
hasn't been implemented for this compiler.
Robert Boehne
2013-06-19 18:25:49 UTC
Permalink
Since the syntax you're using will only support one compiler anyway,
you might consider creating a shell script to do the actual configure run.

it might look something like this:

#!/bin/sh
mkdir -p build
cd build
../configure --prefix=/path/ferinst --other-arguments LDFLAGS='-Xlinker
"-languae charm++"'

Since it's not going to be portable you may as well skip the AM_
variables and go this route.

HTH,

Robert B
Post by Nicolas Bock
Thanks for the reply. I ended up using
AM_LDFLAGS = -Xcompiler "-language charm++"
For some reason CXXLDFLAGS was not added to the linker command in Makefile.
Thanks again,
nick
Post by Gavin Smith
Post by Nicolas Bock
Hi,
The C++ compiler I am using (charmc) needs an additional command line
argument during the linker stage (-language charm++). I am unsure how to
best add this argument. The generated makefiles use CXX for compilation
and
Post by Nicolas Bock
CXXLD for linking, both of which are set to "charmc". How would I change
CXXLD to add a flag? Or is there a cleaner way to accomplish this?
One way would be to pass in the flags on the command line when you
invoke make, e.g. "make CXXLDFLAGS='-language charm++'". Ideally
autoconf would set CXXLD correctly for you but it looks like it this
hasn't been implemented for this compiler.
_______________________________________________
Autoconf mailing list
https://lists.gnu.org/mailman/listinfo/autoconf
Nicolas Bock
2013-06-19 18:30:37 UTC
Permalink
Good point. Thanks,

nick
Post by Robert Boehne
Since the syntax you're using will only support one compiler anyway,
you might consider creating a shell script to do the actual configure run.
#!/bin/sh
mkdir -p build
cd build
../configure --prefix=/path/ferinst --other-arguments LDFLAGS='-Xlinker
"-languae charm++"'
Since it's not going to be portable you may as well skip the AM_ variables
and go this route.
HTH,
Robert B
Post by Nicolas Bock
Thanks for the reply. I ended up using
AM_LDFLAGS = -Xcompiler "-language charm++"
For some reason CXXLDFLAGS was not added to the linker command in Makefile.
Thanks again,
nick
Post by Gavin Smith
Post by Nicolas Bock
Hi,
The C++ compiler I am using (charmc) needs an additional command line
argument during the linker stage (-language charm++). I am unsure how to
best add this argument. The generated makefiles use CXX for compilation
and
Post by Nicolas Bock
CXXLD for linking, both of which are set to "charmc". How would I change
CXXLD to add a flag? Or is there a cleaner way to accomplish this?
One way would be to pass in the flags on the command line when you
invoke make, e.g. "make CXXLDFLAGS='-language charm++'". Ideally
autoconf would set CXXLD correctly for you but it looks like it this
hasn't been implemented for this compiler.
______________________________**_________________
Autoconf mailing list
https://lists.gnu.org/mailman/**listinfo/autoconf<https://lists.gnu.org/mailman/listinfo/autoconf>
Loading...