-
Notifications
You must be signed in to change notification settings - Fork 2
/
config
233 lines (187 loc) · 6.34 KB
/
config
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
#!/bin/bash
# Default config - sourced after scripts/config and before everything else
# After this the following config files will be sourced (if they exist)
# 1. $root/config
# 2. $root/config.$pkgtype (if a pkgtype has been selected)
# 3. $root/$package/config
# 4. $root/$package/config.$pkgtype (if a pkgtype has been selected)
# See scripts/config for documentation on possible values
EDITOR='kwrite'
################################################################################
# Build configuration
# C / C++ compiler flags
_compiler_flags=(
-flto
-fdata-sections
-ffunction-sections
-fmerge-all-constants
-fdevirtualize-at-ltrans
-fno-semantic-interposition
-fno-stack-clash-protection
# -fipa-pta (ICE with GCC 8.2)
-Wno-odr # false positives with static libraries with LTO upjects where headers were in a different location
)
c_flags+=( "${_compiler_flags[@]}" )
cxx_flags+=( "${_compiler_flags[@]}" )
_compiler_flags_msvc=(
/Gy # function sections
/Gw # data sections
/GL # whole program optimizations
)
c_flags_msvc+=( "${_compiler_flags_msvc[@]}" )
cxx_flags_msvc+=( "${_compiler_flags_msvc[@]}" )
# Linker flags
_linker_flags=(
# Enable link-time optimizations
"${c_flags[@]}"
-fuse-linker-plugin
-Wl,--gc-sections
)
shared_linker_flags+=( "${_linker_flags[@]}" )
exe_linker_flags+=(
"${_linker_flags[@]}"
# Since we use LTO, get rid of as much unneeded cruft as possible
-fwhole-program
-fvisibility=hidden
-fvisibility-inlines-hidden
)
_linker_flags_msvc=(
# Enable link-time optimizations
/LTCG
/OPT:REF
/OPT:ICF
# Don't embed an absulute path to the .pdb file in the executable
/PDBALTPATH:%_PDB%
)
shared_linker_flags_msvc+=( "${_linker_flags_msvc[@]}" )
exe_linker_flags_msvc+=( "${_linker_flags_msvc[@]}" )
# Taret names for used architectures (see $architectures)
# Syntax: [ARCHITECTURE]=TARGET
# We expect $target-gcc, $target-g++, $target-objdump, and $root_base/$target
targets+=(
[linux-i686]='i686-bindist-linux-gnu'
[linux-amd64]='x86_64-bindist-linux-gnu'
[linux-armv6j-hardfloat]='armv6j-hardfloat-linux-gnueabi'
[windows-i686]='i686-w64-mingw32'
[freebsd-i686]='i686-gentoo-freebsd9.1'
[freebsd-amd64]='x86_64-gentoo-freebsd9.1'
)
# Target-specific compiler flags
c_flags_linux_armv6j_hardfloat=( -mfpu=vfp -mfloat-abi=hard -Os )
cxx_flags_linux_armv6j_hardfloat=( -mfpu=vfp -mfloat-abi=hard -Os -Wno-uninitialized )
################################################################################
# Wrapper script configuration
# case-patterns to match for each architecture
# Syntax: [ARCHITECTURE]=PATTERN
architecture_aliases+=(
[i686]='i[3-6]86|x86'
[amd64]='amd64|x86_64'
[armv6j-hardfloat]='arm*'
)
################################################################################
# Sanity checks
# List of versioned libraries (such as glibc) and their maximum allowed versions
# Syntax:
# [LIBRARY]=MAXIMUM_VERSION
# [LIBRARY-ARCHITECTURE]=MAXIMUM_VERSION
maximum_library_versions+=(
[glibc]='2.6'
[glibc-armv6j-hardfloat]='2.14'
)
################################################################################
# Documentation output
# Packager name and address to add to package logs entries
packager="Daniel Scharrer <daniel@constexpr.org>"
# Map of source files to licenses
# Syntax: [SOURCE]=LICENSE
# SOURCE can be a shell glob pattern
# SOURCE paths are relative to the cross-compile root ($root_base/$target)
# If LICENSE is the empty string, no license file is included.
# Otherwise, all files in $licensedir starting with "$LICENSE." are included.
licenses+=(
['/usr/include/boost/*']='Boost'
['/usr/lib/libboost_*']='Boost'
['*/Code/Boost-*']='Boost'
['*/Code/Boost/*']='Boost'
['/usr/include/glm/*']='GLM'
['*/Code/GLM-*']='GLM'
['*/Code/GLM/*']='GLM'
['/usr/include/zconf.h']='zlib'
['/usr/include/zlib*']='zlib'
['/usr/lib/libz.*']='zlib'
['*/Code/zlib-*']='zlib'
['*/Code/zlib/*']='zlib'
['/usr/lib/libbz2.*']='libbz2'
['*/Code/bzip2-*']='libbz2'
['*/Code/bzip2/*']='libbz2'
['/usr/include/lzma.h']='liblzma'
['/usr/include/lzma/*']='liblzma'
['/usr/lib/liblzma.*']='liblzma'
['*/Code/liblzma-*']='liblzma'
['*/Code/liblzma/*']='liblzma'
['/usr/include/iconv.h']='' # may come from glibc
['/usr/lib/libiconv.*']='libiconv'
['*/Code/libiconv-*']='libiconv'
['*/Code/libiconv/*']='libiconv'
['/usr/include/AL/*']='OpenAL_Soft'
['/usr/lib/libopenal.*']='OpenAL_Soft'
['/usr/share/openal/*']='OpenAL_Soft'
['*/Code/OpenAL-Soft-*']='OpenAL_Soft'
['*/Code/OpenAL-Soft/*']='OpenAL_Soft'
['/usr/include/GL/*']='' #interface only, no implementation
['/usr/lib/libGLEW*']='GLEW'
['*/Code/GLEW-*']='GLEW'
['*/Code/GLEW/*']='GLEW'
['/usr/include/epoxy/*']='libepoxy'
['/usr/lib/libepoxy.*']='libepoxy'
['*/Code/libepoxy-*']='libepoxy'
['*/Code/libepoxy/*']='libepoxy'
['/usr/include/SDL/*']='SDL'
['/usr/lib/libSDL.so*']='SDL'
['/usr/lib/libSDL-1.2.so*']='SDL'
['*/Code/SDL-*']='SDL'
['*/Code/SDL/*']='SDL'
['/usr/include/SDL2/*']='SDL2'
['/usr/include/*/SDL2/*']='SDL2'
['/usr/lib/libSDL2.so*']='SDL2'
['/usr/lib/libSDL2-*.so*']='SDL2'
['*/Code/SDL2-*']='SDL2'
['*/Code/SDL2/*']='SDL2'
['/usr/include/freetype*']='FreeType'
['/usr/lib/libfreetype.*']='FreeType'
['/usr/include/ft2build.h']='FreeType'
['*/Code/FreeType-*']='FreeType'
['*/Code/FreeType/*']='FreeType'
['/usr/bin/bsdtar']='libarchive'
['/usr/include/qt5/*']='Qt5'
['/usr/lib/libQt5*.so*']='Qt5'
['*/Code/Qt-5.*']='Qt5'
)
provided_versioned_libraries+=(
'gcc-*'
)
################################################################################
# Deployment information
# OpenSUSE Build Service project to push RPM and DEB packages to
obs_project='home:dscharrer'
# OpenSUSE Build Service project to push RPM and DEB snapshot packages to
obs_snapshot_project='home:dscharrer:snapshots'
# Launchpad project to push DEB packages to
launchpad_ppa='ppa:arx/release'
# Launchpad project to push DEB development snapshot packages to
launchpad_snapshot_ppa='ppa:arx/snapshot'
# GPG key to use for Launchpad uploads
launchpad_key='28555A66D7E1DEC9'
# Ubuntu versions for which to push build jobs to Launchpad
ubuntu_versions+=(
'trusty' # 14.04 LTS EOL: 2024-04
'xenial' # 16.04 LTS EOL: 2026-04
'bionic' # 18.04 LTS EOL: 2028-04
'focal' # 20.04 LTS EOL: 2030-04
'jammy' # 22.04 LTS
'kinetic' # 22.10
'lunar' # 23.04
'mantic' # 23.10
'noble' # 24.04
'oracular' # 24.10
)