-
Notifications
You must be signed in to change notification settings - Fork 97
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
Linker error with GCC 7 #141
Comments
Do you happen to know anything knew about GCC7 that would lead to new symbol names? How much tweaking is required to compile with GCC7 locally? |
For ubuntu, https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test there is gcc-7/gcc-8 (and other) packages that are quite stable. There's also docker images for gcc. |
Daniel Black <notifications@github.com> writes:
For ubuntu,
https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test there
is gcc-7/gcc-8 (and other) packages that are quite stable. There's
also docker images for gcc.
For hostboot you need the custom compiled linker though (to then build
the custom linker), so I think the best route is probably tweaking the
config in an op-build to get you a more recent gcc.
(it'd be good if we could not require a custom built linker at some
point though).
…--
Stewart Smith
OPAL Architect, IBM.
|
Thanks @grooverdan and @stewart-ibm. @dcrowell77 To do a GCC 7 build, make this change to your defconfig (eg
Otherwise, you can grab my gcc-7 branch from here which has that change already applied: https://github.com/shenki/op-build/tree/gcc-7
|
I spoke to @segher, one of our toolchain people, and they said it was luck that previous versions of the compiler did not emit the R_PPC64_RELATIVE entries. They said there was nothing specifically that changed between GCC 6 and GCC 7 that would have caused it to start doing that. |
Noted... but there are things that it does that the regular linker doesn't do since we have a static memory space with no dynamic linking. For planning purposes, how important is moving to GCC7? |
So what are the GCC 6 and GCC 7 compiler versions? And, what does (My suspicion is your GCC 7 enables |
We use buildroot to generate the compiler. Neither appear to have
|
@dcrowell77 can you explain why "static memory space with no dynamic linking" stops hostboot from being able to use the binutils linker? Being stuck on GCC 6 means the rest of the firmware doesn't get to benefit from the past couple of years of compiler development. This isn't ideal, but there are no known compiler issues affecting the firmware at this stage. We need a solution for before buildroot removes support for GCC 6. I don't think they plan to do this with their next quarterly release (September), but it would be on the cards. |
Sadly no... This was all built by someone (Patrick) who isn't here anymore and I don't have the background without digging into things for awhile. He is a smart guy so I assume there was a good reason to be non-standard. A couple things I do see:
I have no familiarity with binutils either so I can't give a quick diff between them. |
When building hostboot with GCC 7 we see these errors at link time:
These messages come from here: https://github.com/open-power/hostboot/blob/master/src/build/linker/linker.C#L834
The build command is this:
It is very verbose. Just before the failure, it's doing this:
Then we see this:
The "working" print is showing:
The error case looks like this:
Back to the bad entry, hex(63308) = f74c
The text was updated successfully, but these errors were encountered: