-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes.txt
484 lines (424 loc) · 16 KB
/
notes.txt
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
--------------------------------------------------------------------------------
Windows WSL: Creation of the build environment
--------------------------------------------------------------------------------
# This procedure follows the ooRexx directory hierarchy described in build-oorexx.txt.
# It's not the best choice in terms of speed (requires 17 min for a full build),
# but the best choice for using the same source files from any environment.
# The ooRexx sources are available on the Y: drive
# (network drive mapped on a macOS directory)
sudo mkdir /mnt/y
sudo mount -t drvfs Y: /mnt/y
# The macos HOME directory is available on the Z: drive
sudo mkdir /mnt/z
sudo mount -t drvfs Z: /mnt/z
sudo mkdir /local
sudo ln -s /mnt/y/local/rexx /local/rexx
sudo ln -s /mnt/c/jlf/local/rexxlocal /local/rexxlocal
# See build-oorexx.txt for the build procedure.
--------------------------------------------------------------------------------
Details of the commands executed by make
--------------------------------------------------------------------------------
make VERBOSE=1 install
Remember: did not find how to select the right directory for build.
So I hardcoded this command in the Visual Studio solution of type nmake:
e:
cd E:\Local\rexxlocal\oorexx\build\executor.master\sandbox\jlf\trunk\windows-x86_64\cl\debug\build
nmake VERBOSE=1 install
How to display the response files
https://stackoverflow.com/questions/57358039/how-to-see-the-underlying-compiler-linker-command-line-with-cmake-nmake
nmake has an option to display inline files / response files:
/U Dump inline files
For recursive make you might want to set this in an environment variable like this:
set MAKEFLAGS=U
This way, the content of all response files will appear on the console.
---
From cmd:
set MAKEFLAGS=U
devenv /useenv
nmake VERBOSE=1 install
--------------------------------------------------------------------------------
Creating a distribution
--------------------------------------------------------------------------------
From P.O.:
svn update
pkill rxapi
dnf -y -v remove ooRexx
rm -dfr ~/workspace/oorexx-centos8-build/oorexxbuild/
cmake -DBUILD_RPM=1 -DOS_DIST=centos8 -DCMAKE_BUILD_TYPE=RELEASE ../oorexxSVN
make clean
make
cpack ./
dnf -y -v install ~/workspace/oorexx-centos8-build/oorexxbuild/.rpm
--------------------------------------------------------------------------------
Creating a dmg for M1 Mac
--------------------------------------------------------------------------------
From P.O.:
On Jenkins we build everything starting from ~workspace, here are the steps for M1 Mac
# make ooRexx
# Stop and delete existing installation, leave no witnesses
pkill rxapi || true
rm -dfr ~/Applications/ooRexx5
# Clean the build dir to be sure everything is built fresh
rm -dfr oorexxBuild/*
mkdir -p oorexxBuild
cd oorexxBuild
# Installing to ~/Applications
/opt/homebrew/bin/cmake -G "Unix Makefiles" -DBUILD_OSX_UNIVERSAL_BINARIES=1 -DBUILD_DMG=1 -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=~/Applications/ooRexx5 ../oorexxSVN
make clean # make sure rexx picks up the current build date
make
# install to ~/Applications/ooRexx5 (the installer build uses this so do not change)
make install
# now build the installer with a script generated by CMake
bash ./build_macOS_dmg.sh
The last step in the build chain generates a dmg drag&drop installer that can be used elsewhere.
--------------------------------------------------------------------------------
Technical infos
--------------------------------------------------------------------------------
MacOs File sharing (System preferences/sharing/File sharing)
The name jlfaucher.local is defined in this screen.
Can be modified (button Edit under the field Computer name)
MacOs NFS share
---------------
MacOs /etc/exports
/local -mapall=502 where 502 is the uid displayed by the command id.
/Users/jlfaucher -mapall=502
Linux fstab:
jlfaucher.local:/local /host/local nfs defaults 0 0
jlfaucher.local:/Users/jlfaucher /host/local nfs defaults 0 0
MacOs SMB share
---------------
MacOs : menu System Preferences, then Sharing
Options : activate SMB, deactivate AFP
Activate file sharing and add /Local1 to the list
Windows SMB client
------------------
(replace Y: by your letter drive)
(replace Z: by your letter drive)
net use
Y: \\jlfaucher.local\Local1 Microsoft Windows Network
Z: \\vmware-host\Shared Folders VMware Shared Folders
Must mount Local1 (exported by MacOs - System preferences/sharing/File sharing)
which contains this symbolic link to have
the directory 'Local' under Y:
/Local
/Local1
Local@ -> /Local
http://superuser.com/questions/555715/mac-os-x-10-8-configure-smbd-to-follow-symbolic-links
Adding no-symlinks as a program argument in smbd's launchdaemon plist did the trick.
The file sharing services do need a restart after changing the file.
/System/Library/LaunchDaemons/com.apple.smbd.plist
<array>
<string>/usr/sbin/smbd</string>
<string>-no-symlinks</string>
</array>
[No longer works after upgrade to El-Capitan]
This change has been overwritten when upgrading to El-Capitan.
No longer possible to edit the file smbd.plist because of System Integrity Protection.
I follow a procedure described in https://forums.developer.apple.com/thread/17944:
sudo defaults write /Library/Preferences/com.apple.smbd.plist ProgramArguments -array-add -no-symlinks
Does not work...
Fallback:
sudo cp /System/Library/LaunchDaemons/com.apple.smbd.plist /Library/LaunchDaemons/jlf.smbd.plist
sudo chown root /Library/LaunchDaemons/jlf.smbd.plist
edit jlf.smbd.plist:
- re-apply the change described above
- change the label com.apple.smbd to jlf.smbd (2 occurences)
to do the first time, and to redo after each reboot:
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.smbd.plist
sudo launchctl unload /Library/LaunchDaemons/jlf.smbd.plist
sudo launchctl load -w /Library/LaunchDaemons/jlf.smbd.plist
--------------------------------------------------------------------------------
Old build system: autoconf - automake
--------------------------------------------------------------------------------
https://stackoverflow.com/questions/2531827/what-are-makefile-am-and-makefile-in
DEVELOPER runs these:
1) autoconf - creates shippable configure script (which the installer will run to make the Makefile)
configure.in -> autoconf -> configure (script) <---- Note! configure.in is depreciated.
configure.ac -> autoconf -> configure (script) <---- Now use configure.ac / (*.ac = autoconf)
2) automake - creates shippable Makefile.in (which configure will later read to make the Makefile)
Makefile.am -> automake -> Makefile.in / (*.am = automake)
INSTALLER runs these:
1) ./configure - creates the Makefile (from Makefile.in).
Makefile.in -> configure -> Makefile (*.in = input file)
2) make - creates the application (from the Makefile just created).
3) sudo make install - installs the application
--------------------------------------------------------------------------------
Architectures
--------------------------------------------------------------------------------
Should I use aarch64 instead of arm64?
https://stackoverflow.com/questions/31851611/differences-between-arm64-and-aarch64
"AArch64" and "ARM64" are different names for the same thing.
But... read all the answers, it seems the only official name is "AArch64".
https://devblogs.microsoft.com/oldnewthing/20220726-00/?p=106898
The 64-bit version of the ARM architecture is formally known as AArch64.
It is the 64-bit version of classic 32-bit ARM, which has been retroactively renamed AArch32.
Even though the architecture formally goes by the name AArch64, many people
(including Windows) call it arm64.
https://en.wikipedia.org/wiki/AArch64
AArch64 or ARM64 is the 64-bit extension of the ARM architecture family
24 occurences of the word "AArch64".
1 occurence of the word "ARM64"
https://memgraph.com/blog/ship-it-on-arm64-or-is-it-aarch64
We found that usually, the Debian packages have an arm64 suffix
while RPM has an aarch64 suffix.
Therefore we are using x86_64 and aarch64 suffix for our RPM packages,
and amd64 and arm64 for our Debian packages.
And the good thing is that Docker follows the same convention
llc --version
LLVM (http://llvm.org/):
LLVM version 15.0.6
Optimized build.
Default target: arm64-apple-darwin21.6.0
Host CPU: apple-m1
Registered Targets:
aarch64 - AArch64 (little endian)
aarch64_32 - AArch64 (little endian ILP32)
aarch64_be - AArch64 (big endian)
amdgcn - AMD GCN GPUs
arm - ARM
arm64 - ARM64 (little endian)
arm64_32 - ARM64 (little endian ILP32)
armeb - ARM (big endian)
avr - Atmel AVR Microcontroller
bpf - BPF (host endian)
bpfeb - BPF (big endian)
bpfel - BPF (little endian)
hexagon - Hexagon
lanai - Lanai
mips - MIPS (32-bit big endian)
mips64 - MIPS (64-bit big endian)
mips64el - MIPS (64-bit little endian)
mipsel - MIPS (32-bit little endian)
msp430 - MSP430 [experimental]
nvptx - NVIDIA PTX 32-bit
nvptx64 - NVIDIA PTX 64-bit
ppc32 - PowerPC 32
ppc32le - PowerPC 32 LE
ppc64 - PowerPC 64
ppc64le - PowerPC 64 LE
r600 - AMD GPUs HD2XXX-HD6XXX
riscv32 - 32-bit RISC-V
riscv64 - 64-bit RISC-V
sparc - Sparc
sparcel - Sparc LE
sparcv9 - Sparc V9
systemz - SystemZ
thumb - Thumb
thumbeb - Thumb (big endian)
ve - VE
wasm32 - WebAssembly 32-bit
wasm64 - WebAssembly 64-bit
x86 - 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
xcore - XCore
rustc --print target-list
aarch64-apple-darwin
aarch64-apple-ios
aarch64-apple-ios-macabi
aarch64-apple-ios-sim
aarch64-apple-tvos
aarch64-apple-watchos-sim
aarch64-fuchsia
aarch64-kmc-solid_asp3
aarch64-linux-android
aarch64-nintendo-switch-freestanding
aarch64-pc-windows-gnullvm
aarch64-pc-windows-msvc
aarch64-unknown-freebsd
aarch64-unknown-hermit
aarch64-unknown-linux-gnu
aarch64-unknown-linux-gnu_ilp32
aarch64-unknown-linux-musl
aarch64-unknown-netbsd
aarch64-unknown-none
aarch64-unknown-none-softfloat
aarch64-unknown-openbsd
aarch64-unknown-redox
aarch64-unknown-uefi
aarch64-uwp-windows-msvc
aarch64-wrs-vxworks
aarch64_be-unknown-linux-gnu
aarch64_be-unknown-linux-gnu_ilp32
arm-linux-androideabi
arm-unknown-linux-gnueabi
arm-unknown-linux-gnueabihf
arm-unknown-linux-musleabi
arm-unknown-linux-musleabihf
arm64_32-apple-watchos
armeb-unknown-linux-gnueabi
armebv7r-none-eabi
armebv7r-none-eabihf
armv4t-none-eabi
armv4t-unknown-linux-gnueabi
armv5te-none-eabi
armv5te-unknown-linux-gnueabi
armv5te-unknown-linux-musleabi
armv5te-unknown-linux-uclibceabi
armv6-unknown-freebsd
armv6-unknown-netbsd-eabihf
armv6k-nintendo-3ds
armv7-apple-ios
armv7-linux-androideabi
armv7-unknown-freebsd
armv7-unknown-linux-gnueabi
armv7-unknown-linux-gnueabihf
armv7-unknown-linux-musleabi
armv7-unknown-linux-musleabihf
armv7-unknown-linux-uclibceabi
armv7-unknown-linux-uclibceabihf
armv7-unknown-netbsd-eabihf
armv7-wrs-vxworks-eabihf
armv7a-kmc-solid_asp3-eabi
armv7a-kmc-solid_asp3-eabihf
armv7a-none-eabi
armv7a-none-eabihf
armv7k-apple-watchos
armv7r-none-eabi
armv7r-none-eabihf
armv7s-apple-ios
asmjs-unknown-emscripten
avr-unknown-gnu-atmega328
bpfeb-unknown-none
bpfel-unknown-none
hexagon-unknown-linux-musl
i386-apple-ios
i586-pc-windows-msvc
i586-unknown-linux-gnu
i586-unknown-linux-musl
i686-apple-darwin
i686-linux-android
i686-pc-windows-gnu
i686-pc-windows-msvc
i686-unknown-freebsd
i686-unknown-haiku
i686-unknown-linux-gnu
i686-unknown-linux-musl
i686-unknown-netbsd
i686-unknown-openbsd
i686-unknown-uefi
i686-uwp-windows-gnu
i686-uwp-windows-msvc
i686-wrs-vxworks
m68k-unknown-linux-gnu
mips-unknown-linux-gnu
mips-unknown-linux-musl
mips-unknown-linux-uclibc
mips64-openwrt-linux-musl
mips64-unknown-linux-gnuabi64
mips64-unknown-linux-muslabi64
mips64el-unknown-linux-gnuabi64
mips64el-unknown-linux-muslabi64
mipsel-sony-psp
mipsel-unknown-linux-gnu
mipsel-unknown-linux-musl
mipsel-unknown-linux-uclibc
mipsel-unknown-none
mipsisa32r6-unknown-linux-gnu
mipsisa32r6el-unknown-linux-gnu
mipsisa64r6-unknown-linux-gnuabi64
mipsisa64r6el-unknown-linux-gnuabi64
msp430-none-elf
nvptx64-nvidia-cuda
powerpc-unknown-freebsd
powerpc-unknown-linux-gnu
powerpc-unknown-linux-gnuspe
powerpc-unknown-linux-musl
powerpc-unknown-netbsd
powerpc-unknown-openbsd
powerpc-wrs-vxworks
powerpc-wrs-vxworks-spe
powerpc64-unknown-freebsd
powerpc64-unknown-linux-gnu
powerpc64-unknown-linux-musl
powerpc64-unknown-openbsd
powerpc64-wrs-vxworks
powerpc64le-unknown-freebsd
powerpc64le-unknown-linux-gnu
powerpc64le-unknown-linux-musl
riscv32gc-unknown-linux-gnu
riscv32gc-unknown-linux-musl
riscv32i-unknown-none-elf
riscv32im-unknown-none-elf
riscv32imac-unknown-none-elf
riscv32imac-unknown-xous-elf
riscv32imc-esp-espidf
riscv32imc-unknown-none-elf
riscv64gc-unknown-freebsd
riscv64gc-unknown-linux-gnu
riscv64gc-unknown-linux-musl
riscv64gc-unknown-none-elf
riscv64gc-unknown-openbsd
riscv64imac-unknown-none-elf
s390x-unknown-linux-gnu
s390x-unknown-linux-musl
sparc-unknown-linux-gnu
sparc64-unknown-linux-gnu
sparc64-unknown-netbsd
sparc64-unknown-openbsd
sparcv9-sun-solaris
thumbv4t-none-eabi
thumbv5te-none-eabi
thumbv6m-none-eabi
thumbv7a-pc-windows-msvc
thumbv7a-uwp-windows-msvc
thumbv7em-none-eabi
thumbv7em-none-eabihf
thumbv7m-none-eabi
thumbv7neon-linux-androideabi
thumbv7neon-unknown-linux-gnueabihf
thumbv7neon-unknown-linux-musleabihf
thumbv8m.base-none-eabi
thumbv8m.main-none-eabi
thumbv8m.main-none-eabihf
wasm32-unknown-emscripten
wasm32-unknown-unknown
wasm32-wasi
wasm64-unknown-unknown
x86_64-apple-darwin
x86_64-apple-ios
x86_64-apple-ios-macabi
x86_64-apple-tvos
x86_64-apple-watchos-sim
x86_64-fortanix-unknown-sgx
x86_64-fuchsia
x86_64-linux-android
x86_64-pc-solaris
x86_64-pc-windows-gnu
x86_64-pc-windows-gnullvm
x86_64-pc-windows-msvc
x86_64-sun-solaris
x86_64-unknown-dragonfly
x86_64-unknown-freebsd
x86_64-unknown-haiku
x86_64-unknown-hermit
x86_64-unknown-illumos
x86_64-unknown-l4re-uclibc
x86_64-unknown-linux-gnu
x86_64-unknown-linux-gnux32
x86_64-unknown-linux-musl
x86_64-unknown-netbsd
x86_64-unknown-none
x86_64-unknown-none-linuxkernel
x86_64-unknown-openbsd
x86_64-unknown-redox
x86_64-unknown-uefi
x86_64-uwp-windows-gnu
x86_64-uwp-windows-msvc
x86_64-wrs-vxworks
--------------------------------------------------------------------------------
Xcode architectures
--------------------------------------------------------------------------------
https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary
For makefiles you create outside of Xcode, pass the appropriate architecture
values to the compiler using the -target option. The following example shows a
makefile that compiles a single-source file twice—once for each architecture.
It then creates a universal binary by merging the resulting executable files
together with the lipo tool.
x86_app: main.c
$(CC) main.c -o x86_app -target x86_64-apple-macos10.12
arm_app: main.c
$(CC) main.c -o arm_app -target arm64-apple-macos11
universal_app: x86_app arm_app
lipo -create -output universal_app x86_app arm_app
Wrap Platform-Specific Code with Conditional Compilation Macros
For C-based code, the system defines a set of macros for you to use in /usr/include/TargetConditionals.h.