xref: /aosp_15_r20/external/cronet/build/toolchain/linux/unbundle/README.md (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1*6777b538SAndroid Build Coastguard Worker# Overview
2*6777b538SAndroid Build Coastguard Worker
3*6777b538SAndroid Build Coastguard WorkerThis directory contains files that make it possible for Linux
4*6777b538SAndroid Build Coastguard Workerdistributions to build Chromium using system toolchain.
5*6777b538SAndroid Build Coastguard Worker
6*6777b538SAndroid Build Coastguard WorkerFor more info on established way such builds are configured,
7*6777b538SAndroid Build Coastguard Workerplease read the following:
8*6777b538SAndroid Build Coastguard Worker
9*6777b538SAndroid Build Coastguard Worker - https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
10*6777b538SAndroid Build Coastguard Worker
11*6777b538SAndroid Build Coastguard WorkerWhy do distros want CFLAGS, LDFLAGS, etc? Please read the following
12*6777b538SAndroid Build Coastguard Workerfor some examples. This is not an exhaustive list.
13*6777b538SAndroid Build Coastguard Worker
14*6777b538SAndroid Build Coastguard Worker - https://wiki.debian.org/Hardening
15*6777b538SAndroid Build Coastguard Worker - https://wiki.ubuntu.com/DistCompilerFlags
16*6777b538SAndroid Build Coastguard Worker - https://fedoraproject.org/wiki/Changes/Harden_All_Packages
17*6777b538SAndroid Build Coastguard Worker - https://fedoraproject.org/wiki/Changes/Modernise_GCC_Flags
18*6777b538SAndroid Build Coastguard Worker - https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags
19*6777b538SAndroid Build Coastguard Worker - https://blog.flameeyes.eu/2010/09/are-we-done-with-ldflags/
20*6777b538SAndroid Build Coastguard Worker - https://blog.flameeyes.eu/2008/08/flags-and-flags/
21*6777b538SAndroid Build Coastguard Worker
22*6777b538SAndroid Build Coastguard Worker# Usage
23*6777b538SAndroid Build Coastguard Worker
24*6777b538SAndroid Build Coastguard WorkerAdd the following to GN args:
25*6777b538SAndroid Build Coastguard Worker
26*6777b538SAndroid Build Coastguard Worker```
27*6777b538SAndroid Build Coastguard Workercustom_toolchain="//build/toolchain/linux/unbundle:default"
28*6777b538SAndroid Build Coastguard Workerhost_toolchain="//build/toolchain/linux/unbundle:default"
29*6777b538SAndroid Build Coastguard Worker```
30*6777b538SAndroid Build Coastguard Worker
31*6777b538SAndroid Build Coastguard WorkerSee [more docs on GN](https://gn.googlesource.com/gn/+/main/docs/quick_start.md).
32*6777b538SAndroid Build Coastguard Worker
33*6777b538SAndroid Build Coastguard WorkerTo cross-compile (not fully tested), add the following:
34*6777b538SAndroid Build Coastguard Worker
35*6777b538SAndroid Build Coastguard Worker```
36*6777b538SAndroid Build Coastguard Workerhost_toolchain="//build/toolchain/linux/unbundle:host"
37*6777b538SAndroid Build Coastguard Workerv8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"
38*6777b538SAndroid Build Coastguard Worker```
39*6777b538SAndroid Build Coastguard Worker
40*6777b538SAndroid Build Coastguard WorkerNote: when cross-compiling for a 32-bit target, a matching 32-bit toolchain
41*6777b538SAndroid Build Coastguard Workermay be needed.
42