Restructure the readme wrt the use of docker
This commit is contained in:
1 parent
7c91fd6120
commit
a30166a84f
1 file changed
+34
-18
@@ -33,24 +33,6 @@ To build, just do:
|
|||||||
This will download and build all parts of the toolchain, and build a few
|
This will download and build all parts of the toolchain, and build a few
|
||||||
demo apps to show and verify that the toolchain works.
|
demo apps to show and verify that the toolchain works.
|
||||||
|
|
||||||
The produced toolchain can be extracted by running this command with the
|
|
||||||
image id from the `docker build` command above (ending with e.g.
|
|
||||||
`Successfully built d8b13aad965a`):
|
|
||||||
|
|
||||||
./extract-docker.sh d8b13aad965a prefix
|
|
||||||
|
|
||||||
This copies the directory `prefix` (which contains the whole toolchain,
|
|
||||||
with headers and link libraries for all four architectures) from the
|
|
||||||
built docker image into the current directory.
|
|
||||||
The Dockerfile currently builds in an Ubuntu 16.04 environment, so the
|
|
||||||
extracted toolchain can at least be used in such an environment.
|
|
||||||
|
|
||||||
The extracted toolchain can be used by adding `prefix/bin` to `$PATH`
|
|
||||||
and calling e.g. `x86_64-w64-ming32-clang`.
|
|
||||||
(If using the extracted toolchain in an environment that already have
|
|
||||||
got a normal GCC based MinGW toolchain with the same triplet prefix in
|
|
||||||
the same path, you may need to add
|
|
||||||
`--sysroot=path/to/prefix/x86_64-w64-mingw32` to the clang commands.)
|
|
||||||
|
|
||||||
Other branches in this repo contain patches that might not have been
|
Other branches in this repo contain patches that might not have been
|
||||||
merged upstream yet, and tests of building third party projects using
|
merged upstream yet, and tests of building third party projects using
|
||||||
@@ -59,6 +41,11 @@ usual binutils names, to allow using it as a drop-in replacement for
|
|||||||
a normal MinGW toolchain.
|
a normal MinGW toolchain.
|
||||||
|
|
||||||
|
|
||||||
|
If the toolchain is used in an environment that already have got a
|
||||||
|
normal GCC based MinGW toolchain with the same triplet prefix in
|
||||||
|
the same path, you may need to add
|
||||||
|
`--sysroot=path/to/prefix/x86_64-w64-mingw32` to the clang commands.
|
||||||
|
|
||||||
Status
|
Status
|
||||||
------
|
------
|
||||||
|
|
||||||
@@ -87,3 +74,32 @@ normal GCC/binutils based MinGW.
|
|||||||
- The ARM64 target doesn't support thread local variables.
|
- The ARM64 target doesn't support thread local variables.
|
||||||
|
|
||||||
Additionally, one may run into other minor differences between GCC and clang.
|
Additionally, one may run into other minor differences between GCC and clang.
|
||||||
|
|
||||||
|
|
||||||
|
Use outside of Docker
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
To use a similar toolchain outside of Docker, you can run the same build
|
||||||
|
commands as the dockerfile in probably most recent linux distributions.
|
||||||
|
The build procedure is currently only maintained as a Dockerfile, for ease
|
||||||
|
of verification, reproducibility and ease of maintainance though.
|
||||||
|
|
||||||
|
The toolchain that was built within the docker image can also be
|
||||||
|
extracted from the image into the surrounding host environment.
|
||||||
|
The `extract-docker.sh` script can copy out a directory from a
|
||||||
|
built docker image, either for getting the toolchain or built test
|
||||||
|
binaries, when given a docker tag or image id.
|
||||||
|
|
||||||
|
If the `docker build` command ended with e.g.
|
||||||
|
`Successfully built d8b13aad965a`, you can run:
|
||||||
|
|
||||||
|
./extract-docker.sh d8b13aad965a prefix
|
||||||
|
|
||||||
|
This copies the directory `prefix` (which contains the whole toolchain,
|
||||||
|
with headers and link libraries for all four architectures) from the
|
||||||
|
built docker image into the current directory.
|
||||||
|
The Dockerfile currently builds in an Ubuntu 16.04 environment, so the
|
||||||
|
extracted toolchain can at least be used in such an environment.
|
||||||
|
|
||||||
|
The extracted toolchain can be used by adding `prefix/bin` to `$PATH`
|
||||||
|
and calling e.g. `x86_64-w64-ming32-clang`.
|
||||||
Reference in new issue
Block a user