diff mbox series

[15/17] crc32: Exclude crc32 from TPL

Message ID 20210114032957.483086-16-sjg@chromium.org
State Accepted
Commit ec5f101a3794396fed93e480ebcf8d389041b30e
Delegated to: Tom Rini
Headers show
Series Various minor clean-ups and improvements | expand

Commit Message

Simon Glass Jan. 14, 2021, 3:29 a.m. UTC
Unfortunately the toolchain often brings in the crc32 table even if the
function is not actually used. For now, exclude it from the TPL build,
which is very sensitive to size.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 lib/Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Tom Rini Jan. 28, 2021, 11:58 p.m. UTC | #1
On Wed, Jan 13, 2021 at 08:29:55PM -0700, Simon Glass wrote:

> Unfortunately the toolchain often brings in the crc32 table even if the
> function is not actually used. For now, exclude it from the TPL build,
> which is very sensitive to size.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/lib/Makefile b/lib/Makefile
index 851a80ef3bf..edc1c3dd4f9 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -92,7 +92,9 @@  obj-y += display_options.o
 CFLAGS_display_options.o := $(if $(BUILD_TAG),-DBUILD_TAG='"$(BUILD_TAG)"')
 obj-$(CONFIG_BCH) += bch.o
 obj-$(CONFIG_MMC_SPI) += crc7.o
+#ifndef CONFIG_TPL_BUILD
 obj-y += crc32.o
+#endif
 obj-$(CONFIG_CRC32C) += crc32c.o
 obj-y += ctype.o
 obj-y += div64.o