summaryrefslogtreecommitdiffhomepage
path: root/env.d/100.toolchain.env
blob: 365094049a8640bbc1c0d3e51820c9fcd1921624 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#
# Copyright (c) 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Lucía Andrea Illanes Albornoz <lucia@luciaillanes.de>
#
# WARNING: Do _NOT_ use whitespaces (` ') or tab (`	')
# characters in any of the variables below save for MAKEFLAGS,
# PATH, and TIMESTAMP_FMT.
#
# ${PREFIX_{CROSS,MINGW32,MINIPIX,NATIVE,RPM}} and ${BUILD_WORKDIR}
# must be immediately beneath ${PREFIX}. ${PREFIX} must be o+rwx.
# The variables mentioned should not be forward slash-terminated.
#

#
# Default toolchain flags & variables
: ${DEFAULT_BUILD_CPUS:=};
: ${DEFAULT_BUILD_TYPE:=native};

#
# Default C compiler flags & variables
: ${DEFAULT_CFLAGS_DEBUG:="-D_REDIR_TIME64=0 -g2 -O0"};
: ${DEFAULT_CFLAGS_DEBUG_HOST:="-D_REDIR_TIME64=0 -g0 -O2"};
: ${DEFAULT_CFLAGS_DEBUG_RUNTIME:="-D_REDIR_TIME64=0 -g3 -O0"};
: ${DEFAULT_CFLAGS_RELEASE:="-D_REDIR_TIME64=0 -g0 -O0"};
: ${DEFAULT_CFLAGS_RELEASE_HOST:="-D_REDIR_TIME64=0 -g0 -O0"};
: ${DEFAULT_CFLAGS_RELEASE_RUNTIME:="-D_REDIR_TIME64=0 -g0 -O0"};
rtl_get_var_unsafe \$DEFAULT_CFLAGS -u "DEFAULT_CFLAGS_${BUILD_KIND}";
: ${DEFAULT_CFLAGS_CONFIGURE:=${DEFAULT_CFLAGS}};
rtl_get_var_unsafe \$DEFAULT_CFLAGS_HOST -u "DEFAULT_CFLAGS_${BUILD_KIND}_HOST";
rtl_get_var_unsafe \$DEFAULT_CFLAGS_RUNTIME -u "DEFAULT_CFLAGS_${BUILD_KIND}_RUNTIME";

#
# Default C preprocessor flags & variables
: ${DEFAULT_CPPFLAGS_DEBUG:="-D_REDIR_TIME64=0 -g2 -O0"};
: ${DEFAULT_CPPFLAGS_DEBUG_HOST:="-D_REDIR_TIME64=0 -g0 -O2"};
: ${DEFAULT_CPPFLAGS_DEBUG_RUNTIME:="-D_REDIR_TIME64=0 -g3 -O0"};
: ${DEFAULT_CPPFLAGS_RELEASE:="-D_REDIR_TIME64=0 -g0 -O0"};
: ${DEFAULT_CPPFLAGS_RELEASE_HOST:="-D_REDIR_TIME64=0 -g0 -O0"};
: ${DEFAULT_CPPFLAGS_RELEASE_RUNTIME:="-D_REDIR_TIME64=0 -g0 -O0"};
rtl_get_var_unsafe \$DEFAULT_CPPFLAGS -u "DEFAULT_CPPFLAGS_${BUILD_KIND}";
: ${DEFAULT_CPPFLAGS_CONFIGURE:=${DEFAULT_CPPFLAGS}};
rtl_get_var_unsafe \$DEFAULT_CPPFLAGS_HOST -u "DEFAULT_CPPFLAGS_${BUILD_KIND}_HOST";
rtl_get_var_unsafe \$DEFAULT_CPPFLAGS_RUNTIME -u "DEFAULT_CPPFLAGS_${BUILD_KIND}_RUNTIME";

#
# Default C++ compiler flags & variables
: ${DEFAULT_CXXFLAGS_DEBUG:="-D_REDIR_TIME64=0 -g2 -O0"};
: ${DEFAULT_CXXFLAGS_DEBUG_HOST:="-D_REDIR_TIME64=0 -g0 -O2"};
: ${DEFAULT_CXXFLAGS_DEBUG_RUNTIME:="-D_REDIR_TIME64=0 -g3 -O0"};
: ${DEFAULT_CXXFLAGS_RELEASE:="-D_REDIR_TIME64=0 -g0 -O0"};
: ${DEFAULT_CXXFLAGS_RELEASE_HOST:="-D_REDIR_TIME64=0 -g0 -O0"};
: ${DEFAULT_CXXFLAGS_RELEASE_RUNTIME:="-D_REDIR_TIME64=0 -g0 -O0"};
rtl_get_var_unsafe \$DEFAULT_CXXFLAGS -u "DEFAULT_CXXFLAGS_${BUILD_KIND}";
: ${DEFAULT_CXXFLAGS_CONFIGURE:=${DEFAULT_CXXFLAGS}};
rtl_get_var_unsafe \$DEFAULT_CXXFLAGS_HOST -u "DEFAULT_CXXFLAGS_${BUILD_KIND}_HOST";
rtl_get_var_unsafe \$DEFAULT_CXXFLAGS_RUNTIME -u "DEFAULT_CXXFLAGS_${BUILD_KIND}_RUNTIME";

#
# Default linker flags & variables
: ${DEFAULT_LDFLAGS_DEBUG:=""};
: ${DEFAULT_LDFLAGS_DEBUG_HOST:=""};
: ${DEFAULT_LDFLAGS_DEBUG_RUNTIME:=""};
: ${DEFAULT_LDFLAGS_RELEASE:=""};
: ${DEFAULT_LDFLAGS_RELEASE_HOST:=""};
: ${DEFAULT_LDFLAGS_RELEASE_RUNTIME:=""};
rtl_get_var_unsafe \$DEFAULT_LDFLAGS -u "DEFAULT_LDFLAGS_${BUILD_KIND}";
: ${DEFAULT_LDFLAGS_CONFIGURE:=${DEFAULT_LDFLAGS}};
rtl_get_var_unsafe \$DEFAULT_LDFLAGS_HOST -u "DEFAULT_LDFLAGS_${BUILD_KIND}_HOST";
rtl_get_var_unsafe \$DEFAULT_LDFLAGS_RUNTIME -u "DEFAULT_LDFLAGS_${BUILD_KIND}_RUNTIME";

# vim:filetype=sh textwidth=0