Skip to content

Conversation

kjbracey
Copy link
Contributor

@kjbracey kjbracey commented May 20, 2019

Description

Planning to update to supporting GCC 9 as found in GNU Tools for Arm Embedded Processors 9-2019q4-major.

Newer GCC in particular supports ARMv8-M security extensions, and link-time optimisation - two areas of interest.

Should be no code changes required, but need to change the warning in the toolchain script.

Docs update: ARMmbed/mbed-os-5-docs#1073

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[X] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@bulislaw

Release Notes

  • GCC 9 is now the officially-supported compiler version for the GCC_ARM toolchain

@ciarmcom
Copy link
Member

@kjbracey-arm, thank you for your changes.
@bulislaw @ARMmbed/mbed-os-tools @ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested review from bulislaw and a team May 20, 2019 13:00
@0xc0170
Copy link
Contributor

0xc0170 commented May 20, 2019

Thanks @mark-edgeworth for quick review!

@0xc0170 0xc0170 requested a review from OPpuolitaival May 20, 2019 13:44
Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

Initial approval for the update, it has been due.

Docs and CI needs to have this update integrated

@cmonr
Copy link
Contributor

cmonr commented May 20, 2019

@kjbracey-arm Any reason for jumping straight to GCC 8?
The last time I looked at building w/ multiple GCC versions, compile times increased about ~25% w/ GCC8.

(Can dig up older Travis CI builds if needed)

@kjbracey
Copy link
Contributor Author

@kjbracey-arm Any reason for jumping straight to GCC 8?
The last time I looked at building w/ multiple GCC versions, compile times increased about ~25% w/ GCC8.

No specific reason, beyond it being the current version, and not totally new and raw (ARM embedded release was in December, first update release due in June). And a general assumption that newer = better. (I'm optimistic sometimes!)

I don't see any particular merit in choosing an old version to test against, unless we do actually know of problems with GCC 8.

In terms of features, LTO is usable in GCC 7, but I don't know if GCC 7 is sufficient for ARMv8-M CMSE. It probably is, but can anyone confirm?

@kjbracey
Copy link
Contributor Author

Also, I was comparing against IAR and ARM Compiler 6, where both versions we're using are of similar age to the GCC 8 ARM embedded release, so it felt like making it catch up.

@0xc0170
Copy link
Contributor

0xc0170 commented May 21, 2019

The last time I looked at building w/ multiple GCC versions, compile times increased about ~25% w/ GCC8.

I've checked Travis, it fetches still 6.x version - it should be updated and we can compare the time to older logs

@cmonr
Copy link
Contributor

cmonr commented May 21, 2019

@0xc0170 @kjbracey-arm
Feel free to review: https://travis-ci.org/cmonr/mbed-os/builds/496577264

Not conclusive by any means, but it was an interesting to observe.

Also, for updating the GCC version, you should only need to change this line: https://github.com/ARMmbed/mbed-os/blob/master/tools/test/travis-ci/functions.sh#L62

@jeromecoutant
Copy link
Collaborator

Hi

Any update ?

GCC6 cannot compile TFM.
TFM needs GCC7 at least

@Devran01

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 24, 2019

Also, for updating the GCC version, you should only need to change this line: https://github.com/ARMmbed/mbed-os/blob/master/tools/test/travis-ci/functions.sh#L62

@kjbracey-arm Can you update?

What about CI update, tracking issue for this to happen?

@kjbracey
Copy link
Contributor Author

We have a JIRA PREQ: https://jira.arm.com/browse/ISGDEVPREQ-1487 - no tasks created there yet, and not sure what planning status is for the CI guys.

@urutva
Copy link
Contributor

urutva commented Jul 11, 2019

@bulislaw @kjbracey-arm @Patater
We have identified a compiler issue with GCC6.3.1 while building secure side. It looks like the compiler is generating a branch instruction before expanding CMSE related instructions which is causing the assembler to fail with "branch out of range". But it happens only with specific pattern of code which involves multiple if statements.
More info in issue #10887.

While analysing the issue I observed that we are using v7-M FPU flags for v8-M as well.
For both GCC and ARMCC, we are setting -mfpu=fpv5-sp-d16 in case of v8-M. I've created a PR #11024. This solves the issue on few targets but not all.

The issue is not seen with GCC7. Can we prioritise this PR and switch to either GCC7 or GCC8?

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 14, 2019

@Devran01 Please update also ticket 1487 referenced above in our internal tracker. I would like to understand what we are doing with this update in the next release or we don't.

@urutva
Copy link
Contributor

urutva commented Aug 19, 2019

@0xc0170 I've updated https://jira.arm.com/browse/ISGDEVPREQ-1487 with relavent details.

@OPpuolitaival
Copy link
Contributor

GCC version updated in CI. Triggering CI for this.

@kjbracey
Copy link
Contributor Author

I think this can proceed to merge now. CI is on GCC 8, and I'm seeing the warnings in the logs.

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 25, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Oct 25, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 4
Build artifacts

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 28, 2019

@OPpuolitaival Just to confirm, this is ready for integration ?

@OPpuolitaival
Copy link
Contributor

We can merge this from my point of view

@bulislaw
Copy link
Member

Does that need to be updated to 9?

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 13, 2019

I would probably wait for 9 to be out at least one more quarter as it was just released. @kjbracey-arm what do you think?

@kjbracey
Copy link
Contributor Author

kjbracey commented Nov 14, 2019

I have no particularly strong feelings. If specifying 9, would we be open to moving to requiring later update releases based on 9 during LTS? If so, taking the first 9 is probably no biggy.

This should just follow whatever decision is being made - let me know :)

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 26, 2019

@kjbracey-arm This shall be updated to 9 version and CI started to get in 5.15?

@kjbracey
Copy link
Contributor Author

Will do.

Planning to update to supporting GCC 9 as found in GNU Tools for Arm
Embedded Processors 9-2019q4-major.

Newer GCC in particular supports ARMv8-M security extensions, and
link-time optimisation - two areas of interest.

Should be no code changes required, but need to change the warning in
the toolchain script.
@kjbracey kjbracey changed the title Tools: check for GCC 8, rather than 6 Tools: check for GCC 9, rather than 6 Nov 26, 2019
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 26, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Nov 26, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 5
Build artifacts

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.