@@ -63,6 +63,34 @@ mkdir /usr/ports
63
63
mount <ip_addr_of_server>:/home/.../freebsd/fs/ports /var/ports
64
64
```
65
65
66
+ # Compiling ports
67
+
68
+ Generally you do
69
+
70
+ ```
71
+ $ cd /usr/ports/<package>
72
+ $ make install clean
73
+ ```
74
+
75
+ You can find dpendancies with targets like
76
+
77
+ ```
78
+ $ make missing
79
+ $ make build-depends-list
80
+ $ make run-depends-list
81
+ ```
82
+
83
+ This is useful to plan your day...some stuff takes * forever* to build.
84
+
85
+ Once you have some packages you can
86
+
87
+ ```
88
+ $ pkg create -a -o <dir>
89
+ ```
90
+
91
+ To generate binary packages which should be installable with the ` pkg ` util
92
+ on a clean build.
93
+
66
94
# Compiling OCaml
67
95
68
96
I am using the official 4.01.0 release tarball initially.
@@ -96,7 +124,7 @@ and preprocess. Changing to `cc` gets this compiled.
96
124
cc -c -DSYS_freebsd -DMODEL_armv6 -o arm.o arm.S
97
125
```
98
126
99
- Finally we modify asmcomp/arch.ml at the very top so that ` Config.sysytem = "freebsd" `
127
+ Finally we modify asmcomp/arm/ arch.ml at the very top so that ` Config.system = "freebsd" `
100
128
maps to EABI.
101
129
102
130
Now we can run ` make opt ` and get a native code compiler. However, on running it we get
@@ -128,3 +156,26 @@ File "caml_startup", line 1:
128
156
Error: Error during linking
129
157
```
130
158
159
+ ## Fixes
160
+
161
+ Created a new section at the top of arm.S specifically for SYS_freebsd which sets
162
+ armv6 + softfp.
163
+
164
+ Change the configure script to use ` cc -c ` for both AS and ASPP.
165
+
166
+ This now builds an ocamlopt which generates binaries - and they run!
167
+
168
+ Not much testing yet but I have built OPAM and it will at least print
169
+ its help screen.
170
+
171
+ ## Next steps
172
+
173
+ * Release the freebsd opam binaries on the github page.
174
+ * Compile ocaml with world.opt to get the native ` .opt ` compilers
175
+ * Create a patch for 4.01.0 so I can push a compiler target for
176
+ freebsd 10-release to opam and actually ` -init ` it.
177
+ * binary compiler release as per 4.01.0+ocp-bin
178
+ * Compile git
179
+ * See if there is somewhere we can store binary packages
180
+
181
+
0 commit comments