Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Alternate Toolchain gcc and binutils #4063

Merged
merged 1 commit into from
Apr 8, 2021
Merged

Introduce Alternate Toolchain gcc and binutils #4063

merged 1 commit into from
Apr 8, 2021

Conversation

klauskiwi
Copy link

Hostboot, OCC and potentially other packages are VERY sensitive to
GCC+binutils combinations (specially due to the use of libbfd to feed
the custom linker/loader script). That means that the default buildroot
toolchain can't be easily upgraded without risking hard-to-debug build
and runtime issues that might be caused by the change of the compiler +
binutils combination.

Address this by creating (yet another) GCC + Binutils host packages pair
that can be used, as an alternative to the one provided by buildroot.

Doing so would allow such packages to stay (indefinitely) using their
choice of gcc+binutils, while still allowing buildroot (and the Skiroot
environment) to evolve and use newer versions / releases.

Signed-off-by: Klaus Heinrich Kiwi [email protected]

@dcrowell77 dcrowell77 requested a review from ibmzach April 7, 2021 18:08
@@ -46,6 +46,7 @@ BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_OPENPOWER_PLATFORM=y
BR2_OPENPOWER_POWER9=y
# BR2_PACKAGE_PPE42_TOOLCHAIN is not set
BR2_PACKAGE_ALTERNATE_GCC=y
Copy link
Member

Choose a reason for hiding this comment

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

Are we going to set this variable for P10 configs too?

Copy link
Author

Choose a reason for hiding this comment

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

we could if necessary... I believe we should strive to use buildroot's gcc + binutils the best we can, but if for some reason we need to update buildroot (say to fix security holes or bugs that are only fixed in more modern versions), we could set this setting, as well as the ALTERNATE_*_VERSION to keep hostboot and occ behind if necessary

@@ -0,0 +1,56 @@
################################################################################
#
# alternate-binutils
Copy link
Member

Choose a reason for hiding this comment

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

assuming all of this is identical to the current "primary" toolchain

Copy link
Author

Choose a reason for hiding this comment

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

seem my other comment

HOST_ALTERNATE_GCC_CONF_OPTS += \
$(call qstrip,$(BR2_ALTERNATE_GCC_EXTRA_CONFIG_OPTIONS))

define HOST_ALTERNATE_GCC_CONFIGURE_CMDS
Copy link
Member

Choose a reason for hiding this comment

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

assuming this is all the same

Copy link
Author

Choose a reason for hiding this comment

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

I tried to make it as close to buildroot's as "necessary" - problem is that they are pretty spread out, and of course, possibly changing with each buildroot release.. see references at https://github.com/open-power/buildroot/blob/a84aaaeacbd1a69053cde2e50f26250e9328de1e/package/gcc/gcc.mk#L73 and https://github.com/open-power/buildroot/blob/a84aaaeacbd1a69053cde2e50f26250e9328de1e/package/gcc/gcc-final/gcc-final.mk#L62

We can probably make the conf command completely static and mimic the buildroot's command verbatin.. if we think this is necessary

Copy link
Author

Choose a reason for hiding this comment

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

there's also the possibility of adjusting per-config options using BR2_ALTERNATE_GCC_EXTRA_CONFIG_OPTIONS

Hostboot, OCC and potentially other packages are *VERY* sensitive to
GCC+binutils combinations (specially due to the use of libbfd to feed
the custom linker/loader script). That means that the default buildroot
toolchain can't be easily upgraded without risking hard-to-debug build
and runtime issues that might be caused by the change of the compiler +
binutils combination.

Address this by creating (yet another) GCC + Binutils host packages pair
that can be used, as an alternative to the one provided by buildroot.

Doing so would allow such packages to stay (indefinitely) using their
choice of gcc+binutils, while still allowing buildroot (and the Skiroot
environment) to evolve and use newer versions / releases.

Signed-off-by: Klaus Heinrich Kiwi <[email protected]>
@klauskiwi klauskiwi marked this pull request as ready for review April 8, 2021 11:31
@klauskiwi
Copy link
Author

@dcrowell77 @zane131 should we merge this and monitor CI for the next few weeks? I guess we could revert it if anything...

@klauskiwi klauskiwi requested a review from ibmzach April 8, 2021 18:54
Copy link
Member

@ibmzach ibmzach left a comment

Choose a reason for hiding this comment

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

sounds fine

@dcrowell77
Copy link
Contributor

Sounds okay to me

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.

3 participants