mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: Add missing Makefile definitions
A previous change added more common files to the POSIX build and added flags to the on-target POSIX build. Those definitions were missing from the host POSIX build resulting in build failures. JIRA NVGPU-1734 Change-Id: I3edbe681a475df45c83eae828900c2612f9357b1 Signed-off-by: Nicolas Benech <nbenech@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1996565 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
136a31fcd4
commit
b97a322eda
@@ -51,13 +51,14 @@ INCLUDES= \
|
||||
-I$(TWD)/../include/uapi \
|
||||
-I$(TWD)/include
|
||||
|
||||
CONFIGS=-D__NVGPU_POSIX__
|
||||
# Linuxy configs. We want these so that we can mirror builds from the actual
|
||||
# Linux kernel.
|
||||
include Makefile.configs
|
||||
|
||||
# Compiler, c-flags, etc.
|
||||
|
||||
# CC = clang
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -ggdb -Werror -fPIC $(INCLUDES) $(CONFIGS)
|
||||
CFLAGS = -Wall -Wextra -ggdb -Werror -Wno-unused-parameter \
|
||||
-Wno-missing-field-initializers -Wformat -Wchar-subscripts \
|
||||
-Wparentheses -Wtrigraphs -Wpointer-arith -Wmissing-declarations \
|
||||
@@ -72,10 +73,6 @@ LIBS = -lpthread -pthread -lgcov -ldl
|
||||
# Source files. We expect $(OBJS) and $(HEADERS) to get filled in here.
|
||||
include Makefile.sources
|
||||
|
||||
# Linuxy configs. We want these so that we can mirror builds from the actual
|
||||
# Linux kernel.
|
||||
include Makefile.configs
|
||||
|
||||
all: $(OUT)/nvgpu_unit $(UNITS)
|
||||
|
||||
# Convenience targets.
|
||||
@@ -105,7 +102,7 @@ $(NVGPU_OUT)/%.o : $(NVGPU_SRC)/%.c $(HEADERS)
|
||||
@if [ ! -d $(dir $@) ] ; then \
|
||||
mkdir -p $(dir $@) ; \
|
||||
fi
|
||||
$(CC) --coverage $(CFLAGS) $(configs) -c -o $@ $<
|
||||
$(CC) --coverage $(CFLAGS) -c -o $@ $<
|
||||
|
||||
# Build target for unit test files. These are not part of the libnvgpu-drv.so.
|
||||
# These comprise the unit test framework.
|
||||
@@ -113,7 +110,7 @@ $(CORE_OUT)/%.o : $(CORE_SRC)/%.c $(CORE_HEADERS)
|
||||
@if [ ! -d $(dir $@) ] ; then \
|
||||
mkdir -p $(dir $@) ; \
|
||||
fi
|
||||
$(CC) --coverage $(CFLAGS) $(configs) -c -o $@ $<
|
||||
$(CC) --coverage $(CFLAGS) -c -o $@ $<
|
||||
|
||||
# Certain variables should be exported to the unit test module builds.
|
||||
export TWD INCLUDES CONFIGS UNIT_SRC UNIT_OUT
|
||||
|
||||
@@ -5,11 +5,25 @@
|
||||
# that we potientially will want enabled in testing.
|
||||
#
|
||||
|
||||
configs :=
|
||||
|
||||
# Enabled configs.
|
||||
# None right now!
|
||||
CONFIGS := \
|
||||
-D__NVGPU_POSIX__ \
|
||||
-DCONFIG_TEGRA_19x_GPU \
|
||||
-DCONFIG_TEGRA_GK20A_NVHOST \
|
||||
-DCONFIG_GK20A_CYCLE_STATS \
|
||||
-DCONFIG_TEGRA_T19X_GRHOST \
|
||||
-DCONFIG_NVGPU_SUPPORT_TURING \
|
||||
-DCONFIG_TEGRA_GK20A_PMU=1 \
|
||||
-DCONFIG_TEGRA_ACR=1 \
|
||||
-DCONFIG_TEGRA_GR_VIRTUALIZATION\
|
||||
-DNVCPU_IS_AARCH64=1 \
|
||||
-DCONFIG_TEGRA_IOVMM=0 \
|
||||
-DCONFIG_ARCH_TEGRA_18x_SOC=1 \
|
||||
-DCONFIG_GK20A_VIDMEM=1 \
|
||||
-DCONFIG_PCI_MSI \
|
||||
-DCONFIG_SUPPORT_PMU_PSTATE
|
||||
|
||||
|
||||
# Uncomment these to enable the config.
|
||||
# configs += -DCONFIG_NVGPU_TRACK_MEM_USAGE=y
|
||||
# configs += -DCONFIG_GK20A_VIDMEM
|
||||
# CONFIGS += -DCONFIG_NVGPU_TRACK_MEM_USAGE=y
|
||||
# CONFIGS += -DCONFIG_GK20A_VIDMEM
|
||||
|
||||
Reference in New Issue
Block a user