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

Auto-handling of the gcc version through TC_GCC #5099

Merged
merged 3 commits into from
Mar 19, 2022

Conversation

th0ma7
Copy link
Contributor

@th0ma7 th0ma7 commented Jan 25, 2022

Description

While working on a build issue with comcerto2k on DSM7 where it uses an older gcc version than other archs (ref. #5096), I thought of removing the manually provided TC_GCC to the benefit of automating it.

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • Bug fix
  • New Package
  • Package update
  • Includes small framework changes
  • This change requires a documentation update (e.g. Wiki)

@th0ma7 th0ma7 requested a review from hgy59 January 25, 2022 00:56
@th0ma7 th0ma7 self-assigned this Jan 25, 2022
@th0ma7
Copy link
Contributor Author

th0ma7 commented Jan 25, 2022

@hgy59 if I recall you're the one that last played with this code. I came accros this and thought that would eliminate any remaining potential false-positives.

Note that I tried finding something similar for GLIBC but that ain't as easy as I thought. That may be for another time.

@ymartin59
Copy link
Contributor

I wonder if it would be "enough" to retrieve information from gcc -dumpversion dynamically?

@th0ma7
Copy link
Contributor Author

th0ma7 commented Mar 7, 2022

@ymartin59 its exactly that:

	  if [ "$${target}" = "cc" ] ; then \
	    gcc_version=`eval $$(echo $(WORK_DIR)/$(TC_TARGET)/bin/$(TC_PREFIX)$${source} -dumpversion)` ; \
	  fi ; \

@th0ma7 th0ma7 requested a review from ymartin59 March 7, 2022 13:42
When invoking make download from spksrc/kernel/syno-* directories
the resulting tc_vars.mk cannot fetch gcc's version as the
toolchain hasn't been extracted yet.  The following ensure it does
not fail and simply produce an empty TC_GCC variable in tc_vars.mk
@th0ma7
Copy link
Contributor Author

th0ma7 commented Mar 19, 2022

@hgy59 and @ymartin59 this is ready for merge. I've rebased against master and recent changes on the toolchain & kernel. This really is a relatively trivial change that removes all TC_GCC in favor of calling gcc -dumpversion, removing both cruft in our configurations and false-positives.

Before merging a quick review from on of you would be appreciated.

Copy link
Contributor

@hgy59 hgy59 left a comment

Choose a reason for hiding this comment

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

LGTM

was just wondering whether it would be possible to get the glibc version from the executables too.

(tried https://stackoverflow.com/questions/15134548/which-glibc-version-is-using-my-toolchain and https://stackoverflow.com/questions/9705660/check-glibc-version-for-a-particular-gcc-compiler but didn't find the matching version).

@th0ma7
Copy link
Contributor Author

th0ma7 commented Mar 19, 2022

I also tried but failed miserably in doing so for GLIBC... perhaps in a subsequent PR.
Thnx for your review.

@th0ma7 th0ma7 merged commit d07fbfe into SynoCommunity:master Mar 19, 2022
@th0ma7 th0ma7 deleted the gcc-version branch March 19, 2022 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants