diff options
| author | Patrick Williams <iawillia@us.ibm.com> | 2014-07-03 00:58:04 -0500 | 
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-07-03 01:47:06 -0500 | 
| commit | 38a5b53f55fbccced9b6f4bc0134dcbfe5fe39d0 (patch) | |
| tree | 9762f40846b6b1a45661d37c86fe1d0913c40e35 | |
| parent | ce5d000adc777eab31a578cf33dcaf97aa108517 (diff) | |
| download | blackbird-hostboot-38a5b53f55fbccced9b6f4bc0134dcbfe5fe39d0.tar.gz blackbird-hostboot-38a5b53f55fbccced9b6f4bc0134dcbfe5fe39d0.zip | |
Fix compile for endian calls on old host GCC
Change-Id: I27e18a424ba4bad7dbd33cd17a5c23c65269f51a
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11958
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
| -rw-r--r-- | src/build/linker/gensyms.C | 14 | ||||
| -rwxr-xr-x | src/usr/diag/prdf/common/framework/rule/prdrRegister.H | 12 | ||||
| -rw-r--r-- | src/usr/errl/parser/makefile | 10 | 
3 files changed, 32 insertions, 4 deletions
| diff --git a/src/build/linker/gensyms.C b/src/build/linker/gensyms.C index 5c4a3d608..acd1f8d3e 100644 --- a/src/build/linker/gensyms.C +++ b/src/build/linker/gensyms.C @@ -5,7 +5,9 @@  /*                                                                        */  /* OpenPOWER HostBoot Project                                             */  /*                                                                        */ -/* COPYRIGHT International Business Machines Corp. 2013,2014              */ +/* Contributors Listed Below - COPYRIGHT 2013,2014                        */ +/* [+] International Business Machines Corp.                              */ +/*                                                                        */  /*                                                                        */  /* Licensed under the Apache License, Version 2.0 (the "License");        */  /* you may not use this file except in compliance with the License.       */ @@ -34,6 +36,16 @@  #include <fcntl.h>  #include <sys/mman.h> +#ifndef be64toh +    #include <byteswap.h> +    #if __BYTE_ORDER == __LITTLE_ENDIAN +        #define be64toh(x) __bswap_64(x) +    #else +        #define be64toh(x) (x) +    #endif +#endif + +  using namespace std;  /** Print tool usage */ diff --git a/src/usr/diag/prdf/common/framework/rule/prdrRegister.H b/src/usr/diag/prdf/common/framework/rule/prdrRegister.H index 8bfe4cae4..746427591 100755 --- a/src/usr/diag/prdf/common/framework/rule/prdrRegister.H +++ b/src/usr/diag/prdf/common/framework/rule/prdrRegister.H @@ -5,7 +5,9 @@  /*                                                                        */  /* OpenPOWER HostBoot Project                                             */  /*                                                                        */ -/* COPYRIGHT International Business Machines Corp. 2004,2014              */ +/* Contributors Listed Below - COPYRIGHT 2012,2014                        */ +/* [+] International Business Machines Corp.                              */ +/*                                                                        */  /*                                                                        */  /* Licensed under the Apache License, Version 2.0 (the "License");        */  /* you may not use this file except in compliance with the License.       */ @@ -45,6 +47,14 @@  #ifdef __HOSTBOOT_MODULE    #include <endian.h>    # define htonll(x) htobe64(x) +  #ifndef htobe64 +    #include <byteswap.h> +    #if __BYTE_ORDER == __LITTLE_ENDIAN +        #define htobe64(x) __bswap_64(x) +    #else +        #define htobe64(x) (x) +    #endif +  #endif  #else    #include <utilendian.H>  #endif diff --git a/src/usr/errl/parser/makefile b/src/usr/errl/parser/makefile index d7d8ece74..e008e6974 100644 --- a/src/usr/errl/parser/makefile +++ b/src/usr/errl/parser/makefile @@ -5,7 +5,9 @@  #  # OpenPOWER HostBoot Project  # -# COPYRIGHT International Business Machines Corp. 2011,2014 +# Contributors Listed Below - COPYRIGHT 2011,2014 +# [+] International Business Machines Corp. +#  #  # Licensed under the Apache License, Version 2.0 (the "License");  # you may not use this file except in compliance with the License. @@ -43,7 +45,11 @@ ERRLPARSE_TARGETS = \  	${GENDIR}/plugins/hbfwUdIds.H \      ${GENDIR}/plugins/makefile -CC=$(HOST_PREFIX)g++ -m32 -static +ifndef OPENPOWER_BUILD +    ERRL_LINK_STATIC = -static +endif + +CC=$(HOST_PREFIX)g++ -m32 $(ERRL_LINK_STATIC)  CFLAGS:=-g -O0   -I $(ROOTPATH)/src/include/usr -I ${GENDIR}  all: GEN_PASS CODE_PASS | 

