@@ -6,7 +6,6 @@ General Instructions
6
6
7
7
Try, e.g.:
8
8
9
- cd <working-tree directory>
10
9
make
11
10
./mnl <(echo $'{{extern "manool.org.18/std/0.5/all"} in Out.WriteLine["Hello, world!"]}')
12
11
@@ -27,70 +26,70 @@ The section Confirmed Builds provides more specific instructions together with r
27
26
+ Decent C99 compiler toolchain with support for some GCC-specific extensions (which includes clang and Intel's icc)
28
27
+ Decent C++11 compiler toolchain with support for some GCC-specific extensions (which includes sufficiently recent clang++ and Intel's icpc)
29
28
+ Full-blown Linux or FreeBSD target operating system (which includes a sufficiently recent Android with CrystaX NDK)
30
- + One of the following ISA/ABI targets: x86-64/lp64, i386+sse2/ilp32, x86-64/ilp32, aarch64+el/lp64, armv7l +vfp/ilp32
29
+ + One of the following ISA/ABI targets: x86-64/lp64, i386+sse2/ilp32, x86-64/ilp32, aarch64+el/lp64, armv7+el +vfp/ilp32
31
30
+ Sufficiently recent GNU ` make ` utility
32
31
+ POSIX-compliant shell (` sh ` ) + ` mkdir ` , ` cp ` , and ` rm `
33
32
34
33
#### Makefile phony targets
35
34
36
- + ` all ` (default) --- build MANOOL; the result is placed into the directory ` build ` and its various subdirectories (created automatically if needed)
37
- + ` run ` --- run a short build integrity test; depends on an up-to-date MANOOL build
38
- + ` run-valgrind ` --- the same but run the test under Valgrind to look more closely for any build issues
39
- + ` install ` --- install MANOOL; depends on an up-to-date MANOOL build
40
- + ` clean ` --- clean up the ` build ` directory
41
-
42
- ####
43
-
44
- + ` CC ` --- command to invoke the C compiler; by default: ` $(SCL) ` ` $(GCC) ` ` $(PIPE) ` ` -w ` ` $(MARCH) ` ` -pthread ` ` -std=c99 `
45
- + ` CXX ` --- command to invoke the C++ compiler (including for linking); by default: ` $(SCL) ` ` $(GXX) ` ` $(PIPE) ` ` -w ` ` $(MARCH) ` ` -pthread ` ` -std=c++11 `
46
- + ` CPPFLAGS ` --- additional preprocessing options (for both C and C++ sources); e.g., refer to Other preprocessor definitions below
47
- + ` CFLAGS ` --- additional compilation options (normally optimization-related only) for the C compiler; by default just ` -O3 `
48
- + ` CXXFLAGS ` --- additional compilation options for the C++ compiler; by default specified by ` CFLAGS `
49
- + ` LDFLAGS ` --- additional linking options; by default: ` -s ` ` -Wl,--as-needed `
50
- + ` LDLIBS ` --- options to specify libraries for linking; by default: ` -lm ` ` -ldl ` ` -lrt `
51
- + ` SCL ` --- command prefix for enabling RHEL/CentOS Software Collections (see ` CC ` /` CXX ` ), if needed; for instance: ` scl ` ` enable ` ` devtoolset-8 ` ` -- `
52
- + ` GCC ` --- by default just ` gcc ` (see ` CC ` ); use, for instance, ` clang ` to compile with clang
53
- + ` GXX ` --- by default just ` g++ ` (see ` CXX ` ); use, for instance, ` clang++ ` for clang++
54
- + ` PIPE ` --- by default ` -pipe ` to enable using pipes (see ` CC ` /` CXX ` , may lead to build issues in some rare cases on some platforms)
55
- + ` MARCH ` --- to specify a target machine architecture (ISA/ABI) if needed; by default: ` -msse2 ` ` -mfpmath=sse ` (relevant for the i386 ISA)
56
- + ` LDFLAGS_SO ` --- additional linking options to use when building shared (.so) libraries; by default ` -fPIC `
57
- + ` RUN_ARGS ` --- to specify command line arguments for running the test; by default just ` test.mnl `
58
- + ` VALGRIND ` --- command prefix to test under Valgrind; by default: ` $(SCL) ` ` valgrind `
59
- + ` PREFIX ` --- destination root directory for the ` install ` target; by default ` /usr/local `
60
- + ` MNL_CONFIG ` --- to enable/disable various features via conditional compilation flags (refer to Conditional compilation below)
35
+ + ` all ` (default) - build MANOOL; the result is placed into the directory ` build ` and its various subdirectories (created automatically if needed)
36
+ + ` run ` - run a short build integrity test; depends on an up-to-date MANOOL build
37
+ + ` run-valgrind ` - the same but run the test under Valgrind to look more closely for any build issues
38
+ + ` install ` - install MANOOL; depends on an up-to-date MANOOL build
39
+ + ` clean ` - clean up the ` build ` directory
40
+
41
+ #### Makefile configuration variables
42
+
43
+ + ` CC ` - command to invoke the C compiler; by default: ` $(SCL) ` ` $(GCC) ` ` $(PIPE) ` ` -w ` ` $(MARCH) ` ` -pthread ` ` -std=c99 `
44
+ + ` CXX ` - command to invoke the C++ compiler (including for linking); by default: ` $(SCL) ` ` $(GXX) ` ` $(PIPE) ` ` -w ` ` $(MARCH) ` ` -pthread ` ` -std=c++11 `
45
+ + ` CPPFLAGS ` - additional preprocessing options (for both C and C++ sources); e.g., refer to Other preprocessor definitions below
46
+ + ` CFLAGS ` - additional compilation options (normally optimization-related only) for the C compiler; by default just ` -O3 `
47
+ + ` CXXFLAGS ` - additional compilation options for the C++ compiler; by default specified by ` CFLAGS `
48
+ + ` LDFLAGS ` - additional linking options; by default: ` -s ` ` -Wl,--as-needed `
49
+ + ` LDLIBS ` - options to specify libraries for linking; by default: ` -lm ` ` -ldl ` ` -lrt `
50
+ + ` SCL ` - command prefix for enabling RHEL/CentOS Software Collections (see ` CC ` /` CXX ` ), if needed; for instance: ` scl ` ` enable ` ` devtoolset-8 ` ` -- `
51
+ + ` GCC ` - by default just ` gcc ` (see ` CC ` ); use, for instance, ` clang ` to compile with clang
52
+ + ` GXX ` - by default just ` g++ ` (see ` CXX ` ); use, for instance, ` clang++ ` for clang++
53
+ + ` PIPE ` - by default ` -pipe ` to enable using pipes (see ` CC ` /` CXX ` , may lead to build issues in some rare cases on some platforms)
54
+ + ` MARCH ` - to specify a target machine architecture (ISA/ABI) if needed; by default: ` -msse2 ` ` -mfpmath=sse ` (relevant for the i386 ISA)
55
+ + ` LDFLAGS_SO ` - additional linking options to use when building shared (.so) libraries; by default ` -fPIC `
56
+ + ` RUN_ARGS ` - to specify command line arguments for running the test; by default just ` test.mnl `
57
+ + ` VALGRIND ` - command prefix to test under Valgrind; by default: ` $(SCL) ` ` valgrind `
58
+ + ` PREFIX ` - destination root directory for the ` install ` target; by default ` /usr/local `
59
+ + ` MNL_CONFIG ` - to enable/disable various features via conditional compilation flags (refer to Conditional compilation below)
61
60
62
61
#### Conditional compilation
63
62
64
63
` MNL_CONFIG ` is to contain one or more of the following space-separated flags (all features are enabled by default except ` MNL_USE_DEBUG ` ):
65
- * ` -UMNL_WITH_OPTIMIZE ` --- prevent compilation of VM operation fusion optimizations
64
+ * ` -UMNL_WITH_OPTIMIZE ` - prevent compilation of VM operation fusion optimizations
66
65
(e.g., for benchmarking their effect, to reduce the object code size, or to reduce build times during debugging)
67
- * ` -UMNL_WITH_IDENT_OPT ` --- for (in)equality comparisons, disable dynamic optimizations based on object identity
66
+ * ` -UMNL_WITH_IDENT_OPT ` - for (in)equality comparisons, disable dynamic optimizations based on object identity
68
67
(for good or for bad)
69
- * ` -UMNL_WITH_MULTITHREADING ` --- disable support for multiple threads of execution
68
+ * ` -UMNL_WITH_MULTITHREADING ` - disable support for multiple threads of execution
70
69
(considerably improves single-threaded performance)
71
- * ` -UMNL_WITH_UUID_NS ` --- use ` mnl ` as a top-level namespace instead of a UUID for MANOOL stuff
70
+ * ` -UMNL_WITH_UUID_NS ` - use ` mnl ` as a top-level namespace instead of a UUID for MANOOL stuff
72
71
(useful to simplify object file analysis, but should be avoided otherwise)
73
- * ` -UMNL_USE_EXPECT ` --- do not use branch prediction specifications (` __builtin_expect ` gcc-specific builtins)
74
- * ` -UMNL_USE_INLINE ` --- do not use inlining control (via ` __always_inline__ ` /` __noinline__ ` gcc-specific attributes)
75
- * ` -UMNL_USE_PURE ` --- do not mark pure functions (with ` __const__ ` and ` __pure__ ` gcc-specific attributes)
76
- * ` -UMNL_USE_NOCLOBBER ` --- do not mark pure functions (with ` __pure__ ` gcc-specific attributes);
72
+ * ` -UMNL_USE_EXPECT ` - do not use branch prediction specifications (` __builtin_expect ` gcc-specific builtins)
73
+ * ` -UMNL_USE_INLINE ` - do not use inlining control (via ` __always_inline__ ` /` __noinline__ ` gcc-specific attributes)
74
+ * ` -UMNL_USE_PURE ` - do not mark pure functions (with ` __const__ ` and ` __pure__ ` gcc-specific attributes)
75
+ * ` -UMNL_USE_NOCLOBBER ` - do not mark pure functions (with ` __pure__ ` gcc-specific attributes);
77
76
` MNL_USE_PURE ` is stronger than ` MNL_USE_NOCLOBBER `
78
- * ` -DMNL_USE_DEBUG ` --- enable the debugging facility (` using ` ` ::std::cerr ` in the ` ::mnl::aux ` namespace)
77
+ * ` -DMNL_USE_DEBUG ` - enable the debugging facility (` using ` ` ::std::cerr ` in the ` ::mnl::aux ` namespace)
79
78
80
79
#### Other preprocessor definitions
81
80
82
- + ` MNL_AUX_UUID ` --- top-level namespace (rarely needs to be defined); forces the effect of ` MNL_WITH_UUID_NS `
83
- + ` MNL_STACK ` --- hard-coded default for the ` MNL_STACK ` environment variable; by default ` 6291456 ` (6 MiB)
84
- + ` MNL_HEAP ` --- hard-coded default for the ` MNL_HEAP ` environment variable; by default ` 268435456 ` (256 MiB)
85
- + ` MNL_PATH ` --- hard-coded default for the ` MNL_PATH ` environment variable; by default ` /usr/local/lib/manool:/usr/lib/manool `
81
+ + ` MNL_AUX_UUID ` - top-level namespace (rarely needs to be defined); forces the effect of ` MNL_WITH_UUID_NS `
82
+ + ` MNL_STACK ` - hard-coded default for the ` MNL_STACK ` environment variable; by default ` 6291456 ` (6 MiB)
83
+ + ` MNL_HEAP ` - hard-coded default for the ` MNL_HEAP ` environment variable; by default ` 268435456 ` (256 MiB)
84
+ + ` MNL_PATH ` - hard-coded default for the ` MNL_PATH ` environment variable; by default ` /usr/local/lib/manool:/usr/lib/manool `
86
85
87
86
### Installation
88
87
89
88
To install MANOOL after building, try, e.g. (also read about the ` PREFIX ` makefile variable above):
90
89
91
90
sudo make install
92
91
93
- ### Using MANOOL
92
+ ### Launching MANOOL
94
93
95
94
To run installed MANOOL, point the environment variable ` MNL_PATH ` to the installed-library directory, e.g.:
96
95
@@ -114,138 +113,138 @@ Confirmed Builds
114
113
115
114
### Newer OSes
116
115
117
- + Ubuntu Server 18.04 LTS, x86-64 (AMD) , x86-64/lp64, g++
116
+ + Ubuntu Server 18.04 LTS, x86-64, x86-64/lp64, g++
118
117
119
- apt install g++ make
118
+ sudo apt install g++ make
120
119
make
121
120
122
- + Ubuntu Server 18.04 LTS, x86-64 (AMD) , i386+sse2/ilp32, g++
121
+ + Ubuntu Server 18.04 LTS, x86-64, i386+sse2/ilp32, g++
123
122
124
- apt install g++-multilib make
123
+ sudo apt install g++-multilib make
125
124
make MARCH='-m32 -msse2 -mfpmath=sse' LDFLAGS_SO=
126
125
127
- + Ubuntu Server 18.04 LTS, x86-64 (AMD) , x86-64/ilp32, g++
126
+ + Ubuntu Server 18.04 LTS, x86-64, x86-64/ilp32, g++
128
127
129
- apt install g++-multilib make
128
+ sudo apt install g++-multilib make
130
129
make MARCH=-mx32
131
130
132
- + Ubuntu Server 18.04 LTS, x86-64 (AMD) , x86-64/lp64, clang++
131
+ + Ubuntu Server 18.04 LTS, x86-64, x86-64/lp64, clang++
133
132
134
- apt install clang make
133
+ sudo apt install clang make
135
134
make GCC=clang GXX=clang++
136
135
137
136
***
138
137
139
- + RHEL 8, x86-64 (AMD) , x86-64/lp64, g++
138
+ + RHEL 8, x86-64, x86-64/lp64, g++
140
139
141
- yum install gcc-c++ make
140
+ sudo yum install gcc-c++ make
142
141
make
143
142
144
- + RHEL 8, x86-64 (AMD) , i386+sse2/ilp32, g++
143
+ + RHEL 8, x86-64, i386+sse2/ilp32, g++
145
144
146
- yum install gcc-c++ make glibc-devel.i686 libstdc++-devel.i686
145
+ sudo yum install gcc-c++ make glibc-devel.i686 libstdc++-devel.i686
147
146
make MARCH='-m32 -msse2 -mfpmath=sse' LDFLAGS_SO=
148
147
149
- + RHEL 8, x86-64 (AMD) , x86-64/lp64, clang++
148
+ + RHEL 8, x86-64, x86-64/lp64, clang++
150
149
151
- yum install clang make
150
+ sudo yum install clang make
152
151
make GCC=clang GXX=clang++
153
152
154
- + RHEL 8, x86-64 (AMD) , i386+sse2/ilp32, clang++
153
+ + RHEL 8, x86-64, i386+sse2/ilp32, clang++
155
154
156
- yum install clang make glibc-devel.i686 libstdc++-devel.i686
155
+ sudo yum install clang make glibc-devel.i686 libstdc++-devel.i686
157
156
make GCC=clang GXX=clang++ MARCH='-m32 -msse2 -mfpmath=sse' LDFLAGS_SO=
158
157
159
158
***
160
159
161
- + Ubuntu Server 18.04 LTS, aarch64 (ARM) , aarch64+el/lp64, g++
160
+ + Ubuntu Server 18.04 LTS, aarch64, aarch64+el/lp64, g++
162
161
163
- apt install g++ make
162
+ sudo apt install g++ make
164
163
make MARCH=
165
164
166
- + Ubuntu Server 18.04 LTS, aarch64 (ARM) , aarch64+el/lp64, clang++
165
+ + Ubuntu Server 18.04 LTS, aarch64, aarch64+el/lp64, clang++
167
166
168
- apt install clang make
167
+ sudo apt install clang make
169
168
make GCC=clang GXX=clang++ MARCH=
170
169
171
170
***
172
171
173
- + FreeBSD 12, x86-64 (Intel) , x86-64/lp64, clang++
172
+ + FreeBSD 12, x86-64, x86-64/lp64, clang++
174
173
175
- pkg install gmake
174
+ sudo pkg install gmake
176
175
gmake GCC=clang GXX=clang++
177
176
178
- + FreeBSD 12, x86-64 (Intel) , x86-64/lp64, g++
177
+ + FreeBSD 12, x86-64, x86-64/lp64, g++
179
178
180
- pkg install lang/gcc gmake
179
+ sudo pkg install lang/gcc gmake
181
180
gmake
182
181
183
182
***
184
183
185
- + openSUSE Leap 15.1, x86-64 (Intel) , x86-64/lp64, g++
184
+ + openSUSE Leap 15.1, x86-64, x86-64/lp64, g++
186
185
187
- zypper install gcc-c++ make
186
+ sudo zypper install gcc-c++ make
188
187
make
189
188
190
189
***
191
190
192
- + Android 5.1 (Lollipop), armv7+vfp (ARM), armv7l +vfp/ilp32, clang++
191
+ + Android 5.1 (Lollipop), armv7+vfp, armv7+el +vfp/ilp32, clang++
193
192
194
193
# (from cxxdroid terminal)
195
194
make GCC=clang GXX=clang++ MARCH= LDLIBS='-lm -ldl'
196
195
197
196
198
197
### Older OSes
199
198
200
- + CentOS 6, x86-64 (Intel) , x86-64/lp64, g++
199
+ + CentOS 6, x86-64, x86-64/lp64, g++
201
200
202
- yum install centos-release-scl && yum install devtoolset-8-gcc-c++
203
- make SCL='scl enable devtoolset-8'
201
+ sudo yum install centos-release-scl && sudo yum install devtoolset-8-gcc-c++
202
+ make SCL='scl enable devtoolset-8 -- '
204
203
205
204
***
206
205
207
- + CentOS 7, x86-64 (AMD) , x86-64/lp64, g++
206
+ + CentOS 7, x86-64, x86-64/lp64, g++
208
207
209
- yum install centos-release-scl && yum install devtoolset-8-gcc-c++
210
- make SCL='scl enable devtoolset-8'
208
+ sudo yum install centos-release-scl && sudo yum install devtoolset-8-gcc-c++
209
+ make SCL='scl enable devtoolset-8 -- '
211
210
212
- + CentOS 7, x86-64 (AMD) , x86-64/lp64, clang++
211
+ + CentOS 7, x86-64, x86-64/lp64, clang++
213
212
214
- yum install centos-release-scl && yum install llvm-toolset-7-clang
215
- make SCL='scl enable llvm-toolset-7' GCC=clang GXX=clang++
213
+ sudo yum install centos-release-scl && sudo yum install llvm-toolset-7-clang
214
+ make SCL='scl enable llvm-toolset-7 -- ' GCC=clang GXX=clang++
216
215
217
216
***
218
217
219
- + Debian GNU/Linux 9 (Stretch), x86-64 (AMD) , x86-64/lp64, clang++
218
+ + Debian GNU/Linux 9 (Stretch), x86-64, x86-64/lp64, clang++
220
219
221
- apt install clang-7 make
220
+ sudo apt install clang-7 make
222
221
make GCC=clang-7 GXX=clang++-7
223
222
224
- + Debian GNU/Linux 9 (Stretch), x86-64 (AMD) , x86-64/lp64, g++
223
+ + Debian GNU/Linux 9 (Stretch), x86-64, x86-64/lp64, g++
225
224
226
- apt install g++ make
225
+ sudo apt install g++ make
227
226
make GXX='g++ -fpermissive'
228
227
229
228
***
230
229
231
- + Ubuntu Server 16.04 LTS, x86-64 (AMD) , x86-64/lp64, clang++
230
+ + Ubuntu Server 16.04 LTS, x86-64, x86-64/lp64, clang++
232
231
233
- apt install clang-6.0 make
232
+ sudo apt install clang-6.0 make
234
233
make GCC=clang-6.0 GXX=clang++-6.0
235
234
236
- + Ubuntu Server 16.04 LTS, x86-64 (AMD) , x86-64/lp64, g++
235
+ + Ubuntu Server 16.04 LTS, x86-64, x86-64/lp64, g++
237
236
238
- apt install g++ make
237
+ sudo apt install g++ make
239
238
make GXX='g++ -fpermissive'
240
239
241
240
***
242
241
243
- + Debian GNU/Linux 8 (Jessie), x86-64 (Intel) , x86-64/lp64, clang++
242
+ + Debian GNU/Linux 8 (Jessie), x86-64, x86-64/lp64, clang++
244
243
245
- apt install clang-4.0
244
+ sudo apt install clang-4.0
246
245
make GCC=clang-4.0 GXX=clang++-4.0
247
246
248
- + Debian GNU/Linux 8 (Jessie), x86-64 (Intel) , x86-64/lp64, g++
247
+ + Debian GNU/Linux 8 (Jessie), x86-64, x86-64/lp64, g++
249
248
250
- apt install g++
249
+ sudo apt install g++
251
250
make GXX='g++ -fpermissive'
0 commit comments