Skip to content

Conversation

@EangJS
Copy link
Contributor

@EangJS EangJS commented Nov 12, 2025

Optimize the CFLAGS length

Currently, there are many -I include paths appended to CFLAGS. This may cause the limit of 4096 to exceed.
This PR would edit the Makefile to generate a temporary response file containing all the CFLAGS instead of loading an entire CFLAGS string directly.


Verification

Before
CFLAGS length: 3777 / 4096

After
CFLAGS length: 28 / 4096

Built with before and after modification, MD5 sum of TizenRT/build/output/bin/kernel_rtl8730e_200204.trpk match.

Generate a response file containing all the CFLAGS instead of loading an entire CFLAGS string directly.

---

> Before
CFLAGS length: 3777 / 4096

> After
CFLAGS length: 28 / 4096

Built with before and after modification, MD5 sum of TizenRT/build/output/bin/kernel_rtl8730e_200204.trpk match.
@EangJS EangJS force-pushed the bugfix/Reduce-CFLAGS-Length branch from cff45b9 to 87195cb Compare November 12, 2025 05:56
@EangJS EangJS marked this pull request as ready for review November 12, 2025 06:03
endif

# Generate response file containing all CFLAGS
CFLAGS_FILE := $(TOPDIR)/cflags.rsp
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CFLAGS response file approach is a valid solution for addressing command line length limitations. However, the implementation should be carefully integrated with the existing build system to ensure robustness and maintainability. The approach is particularly useful for complex builds with many include paths and definitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants