Skip to content

Commit 0b69fa6

Browse files
committed
Use CC and full command line instead of hard-coding gcc for AVX512 checking
Hard-coding gcc may not provide incorrect results when a different compiler for the target build is used. To remain in sync with the main call to c_check, pass the full command line. Signed-off-by: Egbert Eich <eich@suse.com>
1 parent 34ecd96 commit 0b69fa6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile.prebuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ endif
7171

7272

7373
getarch : getarch.c cpuid.S dummy $(CPUIDEMU)
74-
avx512=$$(perl c_check - - gcc | grep NO_AVX512); \
74+
avx512=$$(perl c_check - - $(CC) $(TARGET_FLAGS) $(CFLAGS) | grep NO_AVX512); \
7575
$(HOSTCC) $(HOST_CFLAGS) $(EXFLAGS) $${avx512:+-D$${avx512}} -o $(@F) getarch.c cpuid.S $(CPUIDEMU)
7676

7777
getarch_2nd : getarch_2nd.c config.h dummy

0 commit comments

Comments
 (0)