Repository navigation
Commit 645df53
build(frr): skip the libgccjit build on x86_64 glibc
`fancy.libatomic` is one file copied out of a full libgccjit build:
gcc from source, the longest step in an image build. No FRR object
on x86_64 glibc references libatomic (every atomic is inlined), yet
FRR linked it, named it in its buildInputs and kept it through
nuke-refs, so gcc was built anyway. Worse, `fancy.libxcrypt` is
overridden per sanitizer, which gives libgccjit a new hash in every
sanitizer flavour: an ASan or TSan build rebuilds gcc.
Stop linking libatomic on x86_64 glibc and pass it to FRR only where
it is linked. That takes two cuts: our own -latomic in LDFLAGS, and
the -latomic configure appends to LIBS when the build toolchain has
one (which would otherwise leave a DT_NEEDED nothing in the closure
provides). `--as-needed` cannot do this for us: libtool hoists the
`-l` flags of a shared-library link ahead of every `-Wl,` flag. A
postInstall check fails the build if any output still names
libatomic. aarch64 and musl are unchanged.
The x86_64 glibc FRR build graph (default, release and ASan) loses
libgccjit and libatomic entirely.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>1 parent 655ddd8 commit 645df53
2 files changed
Lines changed: 40 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
63 | 69 | | |
64 | 70 | | |
65 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
66 | 76 | | |
67 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
68 | 80 | | |
69 | 81 | | |
70 | 82 | | |
| |||
83 | 95 | | |
84 | 96 | | |
85 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
86 | 114 | | |
87 | 115 | | |
88 | 116 | | |
| |||
104 | 132 | | |
105 | 133 | | |
106 | 134 | | |
107 | | - | |
| 135 | + | |
108 | 136 | | |
109 | 137 | | |
110 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| |||
0 commit comments