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:
Nicolas Benech
2019-01-16 10:57:46 -05:00
committed by mobile promotions
parent 136a31fcd4
commit b97a322eda
2 changed files with 24 additions and 13 deletions

View File

@@ -51,13 +51,14 @@ INCLUDES= \
-I$(TWD)/../include/uapi \ -I$(TWD)/../include/uapi \
-I$(TWD)/include -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. # Compiler, c-flags, etc.
# CC = clang # CC = clang
CC = gcc CC = gcc
CFLAGS = -Wall -ggdb -Werror -fPIC $(INCLUDES) $(CONFIGS)
CFLAGS = -Wall -Wextra -ggdb -Werror -Wno-unused-parameter \ CFLAGS = -Wall -Wextra -ggdb -Werror -Wno-unused-parameter \
-Wno-missing-field-initializers -Wformat -Wchar-subscripts \ -Wno-missing-field-initializers -Wformat -Wchar-subscripts \
-Wparentheses -Wtrigraphs -Wpointer-arith -Wmissing-declarations \ -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. # Source files. We expect $(OBJS) and $(HEADERS) to get filled in here.
include Makefile.sources 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) all: $(OUT)/nvgpu_unit $(UNITS)
# Convenience targets. # Convenience targets.
@@ -105,7 +102,7 @@ $(NVGPU_OUT)/%.o : $(NVGPU_SRC)/%.c $(HEADERS)
@if [ ! -d $(dir $@) ] ; then \ @if [ ! -d $(dir $@) ] ; then \
mkdir -p $(dir $@) ; \ mkdir -p $(dir $@) ; \
fi 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. # Build target for unit test files. These are not part of the libnvgpu-drv.so.
# These comprise the unit test framework. # These comprise the unit test framework.
@@ -113,7 +110,7 @@ $(CORE_OUT)/%.o : $(CORE_SRC)/%.c $(CORE_HEADERS)
@if [ ! -d $(dir $@) ] ; then \ @if [ ! -d $(dir $@) ] ; then \
mkdir -p $(dir $@) ; \ mkdir -p $(dir $@) ; \
fi fi
$(CC) --coverage $(CFLAGS) $(configs) -c -o $@ $< $(CC) --coverage $(CFLAGS) -c -o $@ $<
# Certain variables should be exported to the unit test module builds. # Certain variables should be exported to the unit test module builds.
export TWD INCLUDES CONFIGS UNIT_SRC UNIT_OUT export TWD INCLUDES CONFIGS UNIT_SRC UNIT_OUT

View File

@@ -5,11 +5,25 @@
# that we potientially will want enabled in testing. # that we potientially will want enabled in testing.
# #
configs :=
# Enabled 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. # Uncomment these to enable the config.
# configs += -DCONFIG_NVGPU_TRACK_MEM_USAGE=y # CONFIGS += -DCONFIG_NVGPU_TRACK_MEM_USAGE=y
# configs += -DCONFIG_GK20A_VIDMEM # CONFIGS += -DCONFIG_GK20A_VIDMEM