├── .gitignore
├── cross-packaging
├── .gitignore
├── welcome.html-tmpl
├── readme.html-tmpl
├── conclusion.html-tmpl
├── license.html-tmpl
├── distribution.xml-tmpl
└── Makefile
├── native-packaging
├── .gitignore
├── welcome.html-tmpl
├── readme.html-tmpl
├── license.html-tmpl
├── conclusion.html-tmpl
├── distribution.xml-tmpl
└── Makefile
├── README.md
└── LICENSE
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
3 | *~
4 |
--------------------------------------------------------------------------------
/cross-packaging/.gitignore:
--------------------------------------------------------------------------------
1 | package/
2 | product/
3 | resources/
4 | scripts/
5 |
6 | distribution.xml
7 |
--------------------------------------------------------------------------------
/native-packaging/.gitignore:
--------------------------------------------------------------------------------
1 | package/
2 | product/
3 | scripts/
4 | resources/
5 |
6 | distribution.xml
7 |
--------------------------------------------------------------------------------
/native-packaging/welcome.html-tmpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Install GCC RELEASE (ARCH)
5 |
6 |
7 | Welcome to the GCC RELEASE (ARCH) installer
8 | This installer will install GCC RELEASE (ARCH) on your computer.
9 |
10 |
11 |
--------------------------------------------------------------------------------
/cross-packaging/welcome.html-tmpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Install GCC RELEASE (ARCH on HOST)
5 |
6 |
7 | Welcome to the GCC RELEASE (ARCH on HOST) installer
8 | This installer will install GCC RELEASE (ARCH on HOST) on your computer.
9 |
10 |
11 |
--------------------------------------------------------------------------------
/native-packaging/readme.html-tmpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | README for GCC RELEASE (ARCH)
5 |
6 |
7 | README for GCC RELEASE (ARCH)
8 |
9 | This is GCC RELEASE built on macOS Sonoma (14, Darwin 23) for Apple silicon (M1), with Command Line Utilities 15.3.0 and Python 3.9.13.
10 |
11 | Please see the build notes for full details.
12 |
13 |
14 |
--------------------------------------------------------------------------------
/cross-packaging/readme.html-tmpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | README for GCC RELEASE (ARCH on HOST)
5 |
6 |
7 |
8 | README for GCC RELEASE (ARCH on HOST)
9 |
10 | This is GCC RELEASE built as a cross-compiler from macOS to ARCH, on macOS Sonoma (14, Darwin 23) but able to run on Monterey, for HOST silicon, with Command Line Tools 15.3.0 and Python 3.9.13.
11 |
12 | Please see the build notes for full details.
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/native-packaging/license.html-tmpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | LICENSE for GCC RELEASE (ARCH)
5 |
6 |
7 |
8 | LICENSE for GCC RELEASE (ARCH)
9 |
10 | The compiler is licensed under the GPL version 3.
11 |
12 |
The included source code is licensed with the GCC Runtime Library Exception, so executables built with it can be released on proprietary terms.
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/native-packaging/conclusion.html-tmpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | SUMMARY for GCC RELEASE (ARCH)
5 |
6 |
7 |
8 | Summary for GCC RELEASE (ARCH)
9 |
10 | The compiler is now installed under /opt/gcc-RELEASE-ARCH.
11 |
12 |
See the Wiki for
13 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/cross-packaging/conclusion.html-tmpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | SUMMARY for GCC RELEASE (ARCH on HOST)
5 |
6 |
7 |
8 | Summary for GCC RELEASE (ARCH on HOST)
9 |
10 | The compiler is now installed under TARGET_ROOT/COMPILER-HOST.
11 |
12 |
See the Wiki for
13 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/cross-packaging/license.html-tmpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | LICENSE for GCC RELEASE (ARCH on HOST)
5 |
6 |
7 |
8 | LICENSE for GCC RELEASE (ARCH on HOST)
9 |
10 | The compiler itself, binutils, and the debugger GDB, are licensed
11 | under the GPL
12 | version 3.
13 |
14 |
Newlib is licensed under various MIT/BSD-like licenses.
15 |
16 |
The licensing terms of other software used, in particular the Ada
17 | runtime system, will govern whether executables built with it can be
18 | released on proprietary terms.
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Having built a suite of software, in this case GCC, it needs to be packaged so that it can be installed on users' systems.
2 |
3 | Find packaged releases in [Releases](https://github.com/simonjwright/distributing-gcc/releases).
4 |
5 | For notes on installation, paths etc see the [Wiki](https://github.com/simonjwright/distributing-gcc/wiki).
6 |
7 | The build scripts are available in these repositories:
8 | * [for native compilers](https://github.com/simonjwright/building-gcc-macos-native), both Intel and Apple silicon, and
9 | * [for cross-compilers](https://github.com/simonjwright/building-gcc-macos-arm-eabi) to ARM Cortex (`arm-eabi`) and RISC-V (`riscv64-elf`) MCUs.
10 |
11 | _This_ repository contains the scripts used to create the packaged releases.
12 |
--------------------------------------------------------------------------------
/native-packaging/distribution.xml-tmpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
25 | COMPILER-MACHINE.pkg
26 |
27 |
28 |
--------------------------------------------------------------------------------
/cross-packaging/distribution.xml-tmpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
25 | COMPILER-HOST-MACHINE.pkg
26 |
27 |
28 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (C) Simon Wright .
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above copyright
9 | notice, this list of conditions and the following disclaimer in the
10 | documentation and/or other materials provided with the distribution.
11 | * Neither the name of the copyright holder nor the
12 | names of its contributors may be used to endorse or promote products
13 | derived from this software without specific prior written permission.
14 |
15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 | DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY
19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/native-packaging/Makefile:
--------------------------------------------------------------------------------
1 | BUILD_ROOT = /Volumes/Miscellaneous3/$(ARCH)
2 | BUILD_NOTES = https://github.com/simonjwright/building-gcc-macos-native/releases/tag/gcc-14.2.0-3-aarch64
3 | COMPILER = gcc-$(RELEASE)
4 | RELEASE = 14.2.0-3
5 | VERSION = 1
6 | ARCH = aarch64
7 | MACHINE = $(ARCH)-apple-darwin23
8 | TARGET_ROOT = /opt
9 | PKG_NAME = $(COMPILER)-$(MACHINE)
10 |
11 | all: $(PWD)/product/$(PKG_NAME).pkg
12 |
13 | $(PWD)/package/$(PKG_NAME).pkg:
14 | rm -rf package
15 | mkdir package
16 | pkgbuild \
17 | --root $(BUILD_ROOT)/$(COMPILER)-$(ARCH) \
18 | --identifier $(PKG_NAME) \
19 | --version $(VERSION) \
20 | --install-location $(TARGET_ROOT)/$(COMPILER)-$(ARCH) \
21 | --ownership recommended \
22 | $@
23 |
24 | distribution.xml: distribution.xml-tmpl Makefile
25 | sed \
26 | -e "s|BUILD_NOTES|$(BUILD_NOTES)|g" \
27 | -e "s|COMPILER|$(COMPILER)|g" \
28 | -e "s|ARCH|$(ARCH)|g" \
29 | -e "s|MACHINE|$(MACHINE)|g" \
30 | -e "s|RELEASE|$(RELEASE)|g" \
31 | -e "s|VERSION|$(VERSION)|g" \
32 | <$< \
33 | >$@
34 |
35 | resources/en.lproj/%.html: %.html-tmpl Makefile
36 | sed \
37 | -e "s|BUILD_NOTES|$(BUILD_NOTES)|g" \
38 | -e "s|COMPILER|$(COMPILER)|g" \
39 | -e "s|ARCH|$(ARCH)|g" \
40 | -e "s|MACHINE|$(MACHINE)|g" \
41 | -e "s|RELEASE|$(RELEASE)|g" \
42 | -e "s|VERSION|$(VERSION)|g" \
43 | <$< \
44 | >$@
45 |
46 | html::
47 | -mkdir -p resources/en.lproj
48 | html:: resources/en.lproj/welcome.html
49 | html:: resources/en.lproj/license.html
50 | html:: resources/en.lproj/readme.html
51 | html:: resources/en.lproj/conclusion.html
52 |
53 | $(PWD)/product/$(PKG_NAME).pkg: \
54 | $(PWD)/package/$(PKG_NAME).pkg distribution.xml html
55 | find . -name \*~ | xargs rm
56 | rm -rf product
57 | mkdir product
58 | productbuild \
59 | --distribution distribution.xml \
60 | --package-path $$PWD/package \
61 | --resources $$PWD/resources \
62 | $@
63 | clean:
64 | rm -rf resources package product distribution.xml
65 |
66 | .PHONY: all package product clean
67 |
--------------------------------------------------------------------------------
/cross-packaging/Makefile:
--------------------------------------------------------------------------------
1 | BUILD_ROOT = /Volumes/Miscellaneous3/$(ARCH)
2 | BUILD_NOTES = https://github.com/simonjwright/building-gcc-macos-cross/releases/tag/gcc-14.2.0-3-aarch64
3 | COMPILER = gcc-$(RELEASE)
4 | RELEASE = 14.2.0-3
5 | VERSION = 1
6 | HOST = aarch64
7 | #ifndef ARCH
8 | ARCH = arm-eabi
9 | #endif
10 | MACHINE = $(ARCH)
11 | TARGET_ROOT = /opt
12 | PKG_NAME = $(COMPILER)-$(HOST)-$(MACHINE)
13 |
14 | all: $(PWD)/product/$(PKG_NAME).pkg
15 |
16 | $(PWD)/package/$(PKG_NAME).pkg:
17 | rm -f distribution.xml
18 | rm -rf package
19 | mkdir package
20 | pkgbuild \
21 | --root $(BUILD_ROOT)/$(COMPILER)-$(HOST) \
22 | --identifier $(PKG_NAME) \
23 | --version $(VERSION) \
24 | --install-location $(TARGET_ROOT)/$(COMPILER)-$(HOST) \
25 | --ownership recommended \
26 | $@
27 |
28 | distribution.xml: distribution.xml-tmpl Makefile
29 | sed \
30 | -e "s|BUILD_NOTES|$(BUILD_NOTES)|g" \
31 | -e "s|COMPILER|$(COMPILER)|g" \
32 | -e "s|ARCH|$(ARCH)|g" \
33 | -e "s|HOST|$(HOST)|g" \
34 | -e "s|TARGET_ROOT|$(TARGET_ROOT)|g" \
35 | -e "s|MACHINE|$(MACHINE)|g" \
36 | -e "s|RELEASE|$(RELEASE)|g" \
37 | -e "s|VERSION|$(VERSION)|g" \
38 | <$< \
39 | >$@
40 |
41 | resources/en.lproj/%.html: %.html-tmpl Makefile
42 | sed \
43 | -e "s|BUILD_NOTES|$(BUILD_NOTES)|g" \
44 | -e "s|COMPILER|$(COMPILER)|g" \
45 | -e "s|ARCH|$(ARCH)|g" \
46 | -e "s|HOST|$(HOST)|g" \
47 | -e "s|TARGET_ROOT|$(TARGET_ROOT)|g" \
48 | -e "s|MACHINE|$(MACHINE)|g" \
49 | -e "s|RELEASE|$(RELEASE)|g" \
50 | -e "s|VERSION|$(VERSION)|g" \
51 | <$< \
52 | >$@
53 |
54 | html::
55 | -mkdir -p resources/en.lproj
56 | html:: resources/en.lproj/welcome.html
57 | html:: resources/en.lproj/license.html
58 | html:: resources/en.lproj/readme.html
59 | html:: resources/en.lproj/conclusion.html
60 |
61 | $(PWD)/product/$(PKG_NAME).pkg: \
62 | $(PWD)/package/$(PKG_NAME).pkg distribution.xml html
63 | find . -name \*~ | xargs rm
64 | rm -rf product
65 | mkdir product
66 | productbuild \
67 | --distribution distribution.xml \
68 | --package-path $$PWD/package \
69 | --resources $$PWD/resources \
70 | $@
71 |
72 | clean:
73 | rm -rf resources package product distribution.xml
74 |
75 | .PHONY: all package product clean
76 |
--------------------------------------------------------------------------------