-
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
P8 build fixes for modern GCC #193
base: master-p8
Are you sure you want to change the base?
Conversation
ifcompiler/initCompiler.C: In constructor ‘init::Parser::Parser(int, char**)’: ifcompiler/initCompiler.C:311:18: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘std::ostringstream’ {aka ‘std::__cxx11::basic_ostringstream<char>’}) 311 | cout << stats; | ~~~~ ^~ ~~~~~ | | | | | std::ostringstream {aka std::__cxx11::basic_ostringstream<char>} | std::ostream {aka std::basic_ostream<char>} Change-Id: I563b5008050b2ea2baa456226cc2afbdbd63805d Signed-off-by: Joel Stanley <[email protected]>
Resolve warnings when compiling with gcc 4.8. Compiled with GCC 7.3, no more compile errors/warnings; build ends with caught exception from linker. This commit compiles with GCC 8.2, no more error/warnings; except for a linking warning. Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72271 (cherry picked from p9 branch) Signed-off-by: Joel Stanley <[email protected]> Change-Id: Iff33e15367cea0b8693709941592a2275efac589
Change-Id: I52e002a2f7085baa5b6b5d536e5aa95a5fab2c0d RTC: 123492 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26507 Tested-by: Jenkins Server <[email protected]> Tested-by: FSP CI Jenkins <[email protected]> Reviewed-by: Christian R. Geddes <[email protected]> Reviewed-by: William G. Hoffa <[email protected]> Reviewed-by: Matthew A. Ploetz <[email protected]> Signed-off-by: Joel Stanley <[email protected]>
Change-Id: Id8c8be0ef1d5e9f3ca377c4a89715c9c46d17a38 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38304 Reviewed-by: Prachi Gupta <[email protected]> Tested-by: Jenkins Server <[email protected]> Reviewed-by: Elizabeth K. Liner <[email protected]> Tested-by: FSP CI Jenkins <[email protected]> Tested-by: Jenkins OP Build CI <[email protected]> Reviewed-by: Matthew A. Ploetz <[email protected]> Signed-off-by: Joel Stanley <[email protected]>
Change-Id: I381732be6facd25fb27bbd1f8ac0d75eb5b4980e
GCC4.9 defaults to ELFv2 ABI support but we do not have all of the needed tools to suppor this. Change-Id: Iacf49c46b1fb25776ba60d6506ccadff7b46bf60 RTC: 123430
Seeing as no C++ dialect was previously selected, GCC < 6 defaulted to GNU++98 as the standard C++ mode. However... it seems that C++03 is a better match for HostBoot code (confirmed by Patrick Williams in open-power#62 (comment) ) Change-Id: I6661b5b61319c85c2a90926beb6e2662e96dcf06 Signed-off-by: Stewart Smith <[email protected]>
… 'void' Change-Id: I9dc8b698fec95488e209cbc40b928769a26b6de6 Signed-off-by: Stewart Smith <[email protected]>
…ules Change-Id: I63accd3e881c941736ece4b4498c2c9d06ff8761 Signed-off-by: Stewart Smith <[email protected]>
GCC6 throws the following error: operand type ‘bool*’ is incompatible with argument 1 of ‘__sync_fetch_and_and’ GCC documents that bool is invalid for __sync builtins over at: https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html#g_t_005f_005fsync-Builtins " GCC allows any scalar type that is 1, 2, 4 or 8 bytes in size other than the C type _Bool or the C++ type bool" Change-Id: Iab6415348cb19f590921d8ccc5349867fa57a42d Signed-off-by: Stewart Smith <[email protected]>
…NULL PRDF_ASSERT( &r != NULL ); Change-Id: I2d60075f9e2232512efe45a5c6aa5563f3a565f5 Signed-off-by: Stewart Smith <[email protected]>
So, it turns out that relying on the address of something passed by reference being able to be NULL isn't exactly a good idea, or remotely obvious code. So, instead, do the sane thing and pass a pointer and check it. ../../../../src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H: In constructor ‘PRDF::AttnTypeRegister::AttnTypeRegister(PRDF::SCAN_COMM_REGISTE R_CLASS&, PRDF::SCAN_COMM_REGISTER_CLASS&, PRDF::SCAN_COMM_REGISTER_CLASS&, PRDF ::SCAN_COMM_REGISTER_CLASS&)’: ../../../../src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H:4 42:21: error: the compiler can assume that the address of ‘i_check’ will never b e NULL [-Werror=address] iv_check( NULL == &i_check ? &cv_null : &i_check), ~~^~~~~~~~~~~ ../../../../src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H:4 43:21: error: the compiler can assume that the address of ‘i_recov’ will never b e NULL [-Werror=address] iv_recov( NULL == &i_recov ? &cv_null : &i_recov), ~~^~~~~~~~~~~ ../../../../src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H:4 44:22: error: the compiler can assume that the address of ‘i_special’ will never be NULL [-Werror=address] iv_special(NULL == &i_special ? &cv_null : &i_special), ~~^~~~~~~~~~~~~ ../../../../src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H:4 45:22: error: the compiler can assume that the address of ‘i_proccs’ will never be NULL [-Werror=address] iv_proccs( NULL == &i_proccs ? &cv_null : &i_proccs), ~~^~~~~~~~~~~~ Change-Id: Iecd8636da67aac24f64f73fd82b1f7ccbfced900 Signed-off-by: Stewart Smith <[email protected]>
fix GCC6 thrown error Change-Id: I9aa508843f54c99ebb59822c39590811423ad0b1 Signed-off-by: Stewart Smith <[email protected]>
Seeing as the ancient GCC on RHEL6 doesn't actually support -std=gnu++03 we have to go through some hoops to detect it (we use the same magic Make as we use in skiboot to do the same) Change-Id: I338560ae2ebdac842c8055c07519d542564c3923 Signed-off-by: Stewart Smith <[email protected]>
From Linux 80f23935cadb ("powerpc: Convert cmp to cmpd in idle enter sequence"): PowerPC's "cmp" instruction has four operands. Normally people write "cmpw" or "cmpd" for the second cmp operand 0 or 1. But, frequently people forget, and write "cmp" with just three operands. With older binutils this is silently accepted as if this was "cmpw", while often "cmpd" is wanted. With newer binutils GAS will complain about this for 64-bit code. For 32-bit code it still silently assumes "cmpw" is what is meant. The first two instances are dealing with SPRs, which are 32-bit, so cmpw is correct. It is not clear what to do in the third use of cmp, but given old toolchains have generated cmpw lets assume that we should maintain the behaviour. Change-Id: Iee5dd5903dcd7ac4028bab0176e08ce3db23b2d5 Signed-off-by: Joel Stanley <[email protected]>
FYI - Not ignoring this, but some of these changes are incompatible with the GCC we're using internally. Trying to figure out how to conditionally include some of the GCC flags, e.g. -mabi=elfv1 |
Would this work?
|
Any new news here @dcrowell77 ? Have these been integrated? |
No news, haven't had time to dig in. |
@@ -117,7 +117,7 @@ namespace CONSOLE | |||
// Wait for transmit FIFO to have space. | |||
{ | |||
const uint64_t DELAY_NS = 100; | |||
const uint64_t DELAY_LOOPS = 10000; | |||
const uint64_t DELAY_LOOPS = 100000000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add an explanation for this in the commit message please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got no idea why this was done. The commit message from 2014 was as follows:
Changes for Habanero bringup, uart delay and centaur/vddr
Note that every openpower machine has carried this change. It was placed in the op-build tree instead of committed to the hostboot repository for unknown reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no explanation beyond wishful thinking on why it remained as a patch for so long.
No description provided.