mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +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
|
||||
|
||||
Reference in New Issue
Block a user