WIP - portlint is ok, still working on the build itself. I have an RPATH
error which I don't know how to solve yet:
```
===> Staging for zig-devel-0.4.0
===> Generating temporary packing list
[0/1] cd /tmp/usr/ports/lang/zig-devel/work/.build && /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
-- Install configuration: "Release"
-- Installing: /tmp/usr/ports/lang/zig-devel/work/stage/usr/local/bin/zig
CMake Error at cmake_install.cmake:45 (file):
file RPATH_CHANGE could not write new RPATH:
/usr/local/llvm80/lib
to the file:
/tmp/usr/ports/lang/zig-devel/work/stage/usr/local/bin/zig
No valid ELF RPATH or RUNPATH entry exists in the file;
FAILED: CMakeFiles/install/strip.util
cd /tmp/usr/ports/lang/zig-devel/work/.build && /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
ninja: build stopped: subcommand failed.
*** Error code 1
Stop.
make: stopped in /usr/ports/lang/zig-devel
```
NB zig produces a statically linked ELF without dependencies
```
> file zig
/tmp/usr/ports/lang/zig-devel/work/stage/usr/local/bin/zig:
ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD),
statically linked, for FreeBSD 13.0 (1300029),
FreeBSD-style, with debug_info, not stripped
```
and readelf output:
```
> readelf -e /tmp/usr/ports/lang/zig-devel/work/stage/usr/local/bin/zig
ELF Header:
Magic: 7f 45 4c 46 02 01 01 09 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: FreeBSD
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices x86-64
Version: 0x1
Entry point address: 0x1517000
Start of program headers: 64 (bytes into file)
Start of section headers: 105676480 (bytes into file)
Flags: 0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 9
Size of section headers: 64 (bytes)
Number of section headers: 37
Section header string table index: 35
Elf file type is EXEC (Executable file)
Entry point 0x1517000
There are 9 program headers, starting at offset 64
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flg Align
PHDR 0x0000000000000040 0x0000000000200040 0x0000000000200040
0x00000000000001f8 0x00000000000001f8 R 0x8
LOAD 0x0000000000000000 0x0000000000200000 0x0000000000200000
0x0000000001316d24 0x0000000001316d24 R 0x1000
LOAD 0x0000000001317000 0x0000000001517000 0x0000000001517000
0x0000000003678e90 0x0000000003678e90 R E 0x1000
LOAD 0x0000000004990000 0x0000000004b90000 0x0000000004b90000
0x000000000052d978 0x00000000007d9749 RW 0x1000
TLS 0x000000000499d000 0x0000000004b9d000 0x0000000004b9d000
0x0000000000001810 0x0000000000001840 R 0x10
GNU_RELRO 0x000000000499d000 0x0000000004b9d000 0x0000000004b9d000
0x0000000000520978 0x0000000000521000 R 0x1
GNU_EH_FRAME 0x0000000000e66910 0x0000000001066910 0x0000000001066910
0x00000000000bab2c 0x00000000000bab2c R 0x4
GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 RW 0
NOTE 0x0000000000000238 0x0000000000200238 0x0000000000200238
0x0000000000000048 0x0000000000000048 R 0x4
Section to Segment mapping:
Segment Sections...
00
01 .note.tag .rela.plt .rodata .gcc_except_table .eh_frame_hdr .eh_frame
02 .text .init .fini .plt
03 .data .got.plt .tdata .tbss .ctors .dtors .jcr .init_array .data.rel.ro .fini_array .got .bss
04 .tdata .tbss
05 .tdata .tbss .ctors .dtors .jcr .init_array .data.rel.ro .fini_array .got
06 .eh_frame_hdr
07
08 .note.tag
There are 37 section headers, starting at offset 0x64c7ec0:
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .note.tag NOTE 0000000000200238 00000238
0000000000000048 0000000000000000 A 0 0 4
[ 2] .rela.plt RELA 0000000000200280 00000280
0000000000000060 0000000000000018 A 0 12 8
[ 3] .rodata PROGBITS 0000000000200300 00000300
0000000000e620b0 0000000000000000 AMS 0 0 64
[ 4] .gcc_except_table PROGBITS 00000000010623b0 00e623b0
0000000000004560 0000000000000000 A 0 0 4
[ 5] .eh_frame_hdr PROGBITS 0000000001066910 00e66910
00000000000bab2c 0000000000000000 A 0 0 4
[ 6] .eh_frame PROGBITS 0000000001121440 00f21440
00000000003f58e4 0000000000000000 A 0 0 8
[ 7] .text PROGBITS 0000000001517000 01317000
0000000003678e2c 0000000000000000 AX 0 0 16
[ 8] .init PROGBITS 0000000004b8fe2c 0498fe2c
000000000000000e 0000000000000000 AX 0 0 4
[ 9] .fini PROGBITS 0000000004b8fe3c 0498fe3c
000000000000000e 0000000000000000 AX 0 0 4
[10] .plt PROGBITS 0000000004b8fe50 0498fe50
0000000000000040 0000000000000000 AX 0 0 16
[11] .data PROGBITS 0000000004b90000 04990000
000000000000c1a0 0000000000000000 WA 0 0 16
[12] .got.plt PROGBITS 0000000004b9c1a0 0499c1a0
0000000000000020 0000000000000000 WA 0 0 8
[13] .tdata PROGBITS 0000000004b9d000 0499d000
0000000000001810 0000000000000000 WAT 0 0 16
[14] .tbss NOBITS 0000000004b9e810 0499e810
0000000000000030 0000000000000000 WAT 0 0 8
[15] .ctors PROGBITS 0000000004b9e810 0499e810
0000000000000010 0000000000000000 WA 0 0 8
[16] .dtors PROGBITS 0000000004b9e820 0499e820
0000000000000010 0000000000000000 WA 0 0 8
[17] .jcr PROGBITS 0000000004b9e830 0499e830
0000000000000008 0000000000000000 WA 0 0 8
[18] .init_array INIT_ARRAY 0000000004b9e838 0499e838
0000000000000e38 0000000000000000 WA 0 0 8
[19] .data.rel.ro PROGBITS 0000000004b9f670 0499f670
0000000000514cf8 0000000000000000 WA 0 0 16
[20] .fini_array FINI_ARRAY 00000000050b4368 04eb4368
0000000000000008 0000000000000000 WA 0 0 8
[21] .got PROGBITS 00000000050b4370 04eb4370
0000000000009608 0000000000000000 WA 0 0 8
[22] .bss NOBITS 00000000050be000 04ebd978
00000000002ab749 0000000000000000 WA 0 0 64
[23] .comment PROGBITS 0000000000000000 04ebd978
0000000000000088 0000000000000001 MS 0 0 1
[24] .debug_str PROGBITS 0000000000000000 04ebda00
0000000000087ebc 0000000000000001 MS 0 0 1
[25] .debug_loc PROGBITS 0000000000000000 04f458bc
0000000000345172 0000000000000000 0 0 1
[26] .debug_abbrev PROGBITS 0000000000000000 0528aa2e
000000000003a246 0000000000000000 0 0 1
[27] .debug_info PROGBITS 0000000000000000 052c4c74
00000000002c7017 0000000000000000 0 0 1
[28] .debug_ranges PROGBITS 0000000000000000 0558bc8b
0000000000073010 0000000000000000 0 0 1
[29] .debug_macinfo PROGBITS 0000000000000000 055fec9b
0000000000000259 0000000000000000 0 0 1
[30] .debug_line PROGBITS 0000000000000000 055feef4
000000000012a288 0000000000000000 0 0 1
[31] .debug_aranges PROGBITS 0000000000000000 0572917c
0000000000001a30 0000000000000000 0 0 1
[32] .gnu.warning.mkte PROGBITS 0000000000000000 0572abac
0000000000000043 0000000000000000 0 0 1
[33] .gnu.warning.f_pr PROGBITS 0000000000000000 0572abef
0000000000000043 0000000000000000 0 0 1
[34] .symtab SYMTAB 0000000000000000 0572ac38
0000000000321768 0000000000000018 36 74941 8
[35] .shstrtab STRTAB 0000000000000000 05a4c3a0
0000000000000173 0000000000000000 0 0 1
[36] .strtab STRTAB 0000000000000000 05a4c513
0000000000a7b9a8 0000000000000000 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)
```