-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
Detection of OpenMP support when building with the -coverage option (see astropy/astropy-helpers#374) is broken again because the CFLAGS environment variable is propagated to the compiler invocation but not the linker invocation. The environment variable CFLAGS=-coverage normally tells the build process to add the -coverage option to both compiler AND linker commands for C binaries, but as shown below it is only passed to the compiler. As a result, the executable fails to run.
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -coverage -fPIC -c test_openmp.c -o objects/test_openmp.o -fopenmp
gcc -pthread objects/test_openmp.o -o test_openmp -fopenmp
objects/test_openmp.o: In function `_GLOBAL__sub_I_65535_0_test_openmp.c':
test_openmp.c:(.text.startup+0x38): undefined reference to `__gcov_init'
objects/test_openmp.o:(.data.rel+0x20): undefined reference to `__gcov_merge_add'
collect2: error: ld returned 1 exit status
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed