#2553: Cactus' link command uses CPPFLAGS and CXXFLAGS
| Reporter: | Roland Haas |
| Status: | open |
| Milestone: | |
| Version: | development version |
| Type: | bug |
| Priority: | minor |
| Component: | Cactus |
Comment (by Roland Haas):
Well making LD be nvcc gives me extra trouble when compiling ExternalLibraries (same sort of issues that come from having Cactus LIBS mean something different then autoconf’s LIBS).
Instead I peeked at Formaline and wrote a short ExternallLibraries/CUDA thorn that adapts Cactus' link step based on the documentation by NVIDIA. The thorn is here: https://github.com/rhaas80/ExternalLibraries-CUDA.git and the trick is to collect all CUDA code in a new library using nvcc (just as NVIDIA shows):
CACTUSLIBLINKLINE += -l$(CCTK_LIBNAME_PREFIX)CUDA-gpucode CUDA-LIB = $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)CUDA-gpucode$(LIBNAME_SUFFIX) $(EXEDIR)$(DIRSEP)$(EXE): $(CUDA-LIB) # TODO: make this depend on only the thorns that REQUIRE CUDA # TODO: check if depending on LINKLIST would be enough $(CUDA-LIB): $(CONFIG)/make.thornlist $(CONFIG)/cctki_version.h $(patsubst %,$(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PR--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2553/cactus-link-command-uses-cppflags-and