-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile.flags
More file actions
25 lines (21 loc) · 790 Bytes
/
Makefile.flags
File metadata and controls
25 lines (21 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#
# Copyright 2014, NICTA
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
# See "LICENSE_BSD2.txt" for details.
#
# @TAG(NICTA_BSD)
#
# This file is included from tools/common/Makefile.flags
# It allows a project to override or add to existing build flags.
# These flags are used for both the kernel build and other build through
# common.mk.
CFLAGS += "-std=c99"
NK_CFLAGS += -Wno-packed -Wall -funwind-tables -g
LIBGCC_PATH := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name | sed 's/\(.*\)\(libgcc\.a\)/\1/' )
NK_LDFLAGS += -L $(LIBGCC_PATH)
# See if we should link against gcc_eh
ifneq ($(shell $(CC) $(CFLAGS) -print-file-name=libgcc_eh.a | grep "^/"),)
NK_LDFLAGS += -l gcc_eh
endif