Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions build-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,16 @@ function make_br_fragment {
else
echo "# BR2_TOOLCHAIN_EXTERNAL_FORTRAN is not set" >> ${fragment_file}
fi
if grep -q "BR2_TOOLCHAIN_BUILDROOT_DLANG=y" ${configfile}; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

BR2_TOOLCHAIN_HAS_DLANG ?

echo "BR2_TOOLCHAIN_EXTERNAL_DLANG=y" >> ${fragment_file}
else
echo "# BR2_TOOLCHAIN_EXTERNAL_DLANG is not set" >> ${fragment_file}
fi
if grep -q "BR2_GCC_ENABLE_OPENMP=y" ${configfile}; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should be BR2_TOOLCHAIN_HAS_OPENMP ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So
if grep -q "BR2_TOOLCHAIN_BUILDROOT_FORTRAN=y" ${configfile}; then
should be
if grep -q "BR2_TOOLCHAIN_HAS_FORTRAN=y" ${configfile}; then

It seems this script is not really accurate...
Should we use BR2_TOOLCHAIN_BUILDROOT_xxx or BR2_TOOLCHAIN_HAS_xxx ?

Copy link
Copy Markdown
Contributor Author

@vfazio vfazio Jun 27, 2023

Choose a reason for hiding this comment

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

I think we have to use BR2_TOOLCHAIN_BUILDROOT_*

we're looking for the features the buildroot tool chain is being built with so that we can then flag the EXTERNAL flags when it's used by subsequent BR project as an external toolchain. The BR2_TOOLCHAIN_BUILDROOT_xxx and BR2_TOOLCHAIN_EXTERNAL_xxx (depending on the BR config) drive the unified BR2_TOOLCHAIN_HAS_xxx option for packages to check to see if a feature is enabled

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You're right but my comment is about how the script is written, the generated config fragment should be the same with either BR2_TOOLCHAIN_BUILDROOT_xxx or BR2_TOOLCHAIN_HAS_xxx.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note: BR2_TOOLCHAIN_EXTERNAL_DLANG will no longer be a problem since gcc 12 requires a D compiler on the host. Currently Buildroot doesn't check for DLANG on the host, so we can't enable the D backend on gcc 12.
See: https://gitlab.com/buildroot.org/buildroot/-/commit/6bd0cc0cb8a9a3016ca4970a21ebbf7f497dfe96

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

echo "BR2_TOOLCHAIN_EXTERNAL_OPENMP=y" >> ${fragment_file}
else
echo "# BR2_TOOLCHAIN_EXTERNAL_OPENMP is not set" >> ${fragment_file}
fi
if grep -q "BR2_TOOLCHAIN_HAS_SSP=y" ${configfile}; then
echo "BR2_TOOLCHAIN_EXTERNAL_HAS_SSP=y" >> ${fragment_file}
else
Expand Down